|
@@ -11,6 +11,7 @@ import api.common.pojo.param.project.*;
|
|
|
import api.common.pojo.po.algorithm.AlgorithmPO;
|
|
|
import api.common.pojo.po.model.ConfigPO;
|
|
|
import api.common.pojo.po.project.MultiSimulationProjectPO;
|
|
|
+import api.common.pojo.po.project.MultiSimulationProjectTaskRecordPO;
|
|
|
import api.common.pojo.po.project.MultiSimulationScenePO;
|
|
|
import api.common.pojo.po.project.SimulationManualProjectPO;
|
|
|
import api.common.pojo.vo.map.SimulationMapPathVO;
|
|
@@ -33,9 +34,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Objects;
|
|
|
+import java.util.*;
|
|
|
|
|
|
@Service
|
|
|
@Slf4j
|
|
@@ -44,6 +43,8 @@ public class MultiSimulationProjectServiceImpl implements MultiSimulationProject
|
|
|
@Resource
|
|
|
private MultiSimulationProjectMapper multiSimulationProjectMapper;
|
|
|
@Resource
|
|
|
+ private MultiSimulationProjectTaskRecordMapper taskRecordMapper;
|
|
|
+ @Resource
|
|
|
private MultiSimulationSceneMapper simulationSceneMapper;
|
|
|
|
|
|
@Resource
|
|
@@ -324,6 +325,19 @@ public class MultiSimulationProjectServiceImpl implements MultiSimulationProject
|
|
|
if (StringUtils.isBlank(param.getProjectId())) {
|
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.CLIENT_FAILURE, "查询失败,id为空");
|
|
|
}
|
|
|
+ String projectId = param.getProjectId();
|
|
|
+ MultiSimulationProjectVO projectVO = multiSimulationProjectMapper.selectMultiSimulationProjectById(projectId);
|
|
|
+ Integer status = projectVO.getProjectStatus();
|
|
|
+ boolean isNeedStatus = status == MultiSimulationStatusEnum.INIT_STATUS.getProjectStatus() ? false : true;
|
|
|
+ Map<String, Integer> sceneIdStatusMap = new HashMap<>();
|
|
|
+ if (isNeedStatus){
|
|
|
+ List<MultiSimulationProjectTaskRecordPO> recordPOList = taskRecordMapper.selectMultiSimulationProjectTaskRecordList(projectId);
|
|
|
+ if (!CollectionUtils.isEmpty(recordPOList)){
|
|
|
+ for (MultiSimulationProjectTaskRecordPO taskRecord: recordPOList) {
|
|
|
+ sceneIdStatusMap.put(taskRecord.getSceneId(), taskRecord.getStatus());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if (Objects.isNull(param.getPageNum())) {
|
|
|
param.setPageNum(1);
|
|
|
}
|
|
@@ -346,6 +360,9 @@ public class MultiSimulationProjectServiceImpl implements MultiSimulationProject
|
|
|
continue;
|
|
|
}
|
|
|
scene.setMapName(simulationMapVO.getMapName());
|
|
|
+ if (isNeedStatus){
|
|
|
+ scene.setTaskStatus(sceneIdStatusMap.get(sceneId));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
PageInfo<MultiSimulationSceneVO> pageInfo = new PageInfo<>(multiSimulationSceneVOS);
|