|
@@ -35,7 +35,6 @@ import com.css.simulation.resource.project.service.SimulationProjectService;
|
|
|
import com.css.simulation.resource.scene.mapper.ScenePackageMapper;
|
|
|
import com.css.simulation.resource.system.service.DictService;
|
|
|
import com.css.simulation.resource.util.ProjectUtil;
|
|
|
-import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import com.google.common.collect.ImmutableMap;
|
|
|
import com.itextpdf.text.*;
|
|
@@ -3994,8 +3993,10 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
throw new RuntimeException("id 不能为空。");
|
|
|
}
|
|
|
SimulationAutomaticProjectPo po = simulationAutomaticProjectMapper.selectById(param.getId());
|
|
|
+ // 校验项目信息
|
|
|
+ projectUtil.checkProject(po.getAlgorithm(), po.getVehicle(), po.getScene());
|
|
|
+ // 组装数据
|
|
|
String projectName = po.getProjectName();
|
|
|
-
|
|
|
SimulationAutomaticSubProjectPo subprojectPo = new SimulationAutomaticSubProjectPo();
|
|
|
subprojectPo.createPo(po.getCreateUserId());
|
|
|
subprojectPo.setParentId(po.getId());
|
|
@@ -4021,7 +4022,6 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
}
|
|
|
simulationAutomaticProjectMapper.updateAutomaticRunTimes(po);
|
|
|
int i = simulationAutomaticSubProjectMapper.addAutomaticSubProject(subprojectPo);
|
|
|
- // 校验项目信息
|
|
|
// 查询详情信息并保存
|
|
|
String projectId = subprojectPo.getId();
|
|
|
ProjectDetailsVo info = selectProjectDetailsByIdBackUp(SimulationManualProjectParam.builder().id(projectId)
|
|
@@ -4037,7 +4037,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, null);
|
|
|
}
|
|
|
|
|
|
- private void autoProjectRunToKafka(SimulationAutomaticProjectPo po, String subId) throws JsonProcessingException {
|
|
|
+ private void autoProjectRunToKafka(SimulationAutomaticProjectPo po, String subId) {
|
|
|
SimulationManualProjectKafkaParam kafkaParam = new SimulationManualProjectKafkaParam();
|
|
|
kafkaParam.setProjectId(subId); //子任务id
|
|
|
kafkaParam.setAlgorithmId(po.getAlgorithm());
|
|
@@ -4074,7 +4074,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
|
|
|
String ids = param.getIds();
|
|
|
if (isEmpty(ids)) {
|
|
|
- return new ResponseBodyVO<String>(ResponseBodyVO.Response.CLIENT_FAILURE);
|
|
|
+ return new ResponseBodyVO<>(ResponseBodyVO.Response.CLIENT_FAILURE);
|
|
|
}
|
|
|
String[] idArr = ids.split(",");
|
|
|
//仅有执行中的不能删除
|
|
@@ -4097,9 +4097,6 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
|
|
|
/**
|
|
|
* 自动项目父项目信息
|
|
|
- *
|
|
|
- * @param param
|
|
|
- * @return
|
|
|
*/
|
|
|
@Override
|
|
|
public ResponseBodyVO<AutomaticProjectVo> selectSubProjectInfo(SimulationManualProjectParam param) {
|