|
@@ -426,7 +426,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
List<AlgorithmScoreVo> firstTargetScore = getFirstTargetScore(param.getId());
|
|
|
projectDetailsVo.setAlgorithmScoreList(firstTargetScore);
|
|
|
//任务运行状态统计
|
|
|
- List<ProjectRunStateNumVo> projectRunStateNumVos = null;
|
|
|
+ List<ProjectRunStateNumVo> states = null;
|
|
|
|
|
|
//任务运行结果统计
|
|
|
List<ProjectRunResultRatioNumVo> resultScoreList = null;
|
|
@@ -437,8 +437,8 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
List<ProjectRunResultRatioNumVo> projectRunResultRatioNumVos = null;
|
|
|
Integer size = simulationProjectTaskMapper.selectProjectTaskNumByProjectId(projectTaskParam);
|
|
|
if (size > 0) {
|
|
|
- projectRunStateNumVos = simulationProjectTaskMapper.selectRunStateCount(param.getId());
|
|
|
- taskRunState(projectRunStateNumVos, size);
|
|
|
+ states = simulationProjectTaskMapper.selectRunStateCount(param.getId());
|
|
|
+ taskRunState(states, size);
|
|
|
projectRunResultRatioNumVos = simulationProjectTaskMapper.selectRunResultCount(param.getId());
|
|
|
taskResultState(projectRunResultRatioNumVos, size);
|
|
|
|
|
@@ -453,7 +453,36 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
}
|
|
|
projectDetailsVo.setResultList(projectRunResultRatioNumVos);
|
|
|
projectDetailsVo.setResultScoreList(resultScoreList);
|
|
|
- projectDetailsVo.setStateList(projectRunStateNumVos);
|
|
|
+ // 汉化
|
|
|
+ if (CollectionUtil.isNotEmpty(states)) {
|
|
|
+ states.forEach(state -> {
|
|
|
+ if (StateConstant.Aborted.getEnglish().equals(state.getStateName())) {
|
|
|
+ state.setStateName(StateConstant.Aborted.getChinese());
|
|
|
+ }
|
|
|
+ if (StateConstant.PendingAnalysis.getEnglish().equals(state.getStateName())) {
|
|
|
+ state.setStateName(StateConstant.PendingAnalysis.getChinese());
|
|
|
+ }
|
|
|
+ if (StateConstant.Running.getEnglish().equals(state.getStateName())) {
|
|
|
+ state.setStateName(StateConstant.Running.getChinese());
|
|
|
+ }
|
|
|
+ if (StateConstant.Analysing.getEnglish().equals(state.getStateName())) {
|
|
|
+ state.setStateName(StateConstant.Analysing.getChinese());
|
|
|
+ }
|
|
|
+ if (StateConstant.Completed.getEnglish().equals(state.getStateName())) {
|
|
|
+ state.setStateName(StateConstant.Completed.getChinese());
|
|
|
+ }
|
|
|
+ if (StateConstant.Terminated.getEnglish().equals(state.getStateName())) {
|
|
|
+ state.setStateName(StateConstant.Terminated.getChinese());
|
|
|
+ }
|
|
|
+ if (StateConstant.Terminating.getEnglish().equals(state.getStateName())) {
|
|
|
+ state.setStateName(StateConstant.Terminating.getChinese());
|
|
|
+ }
|
|
|
+ if (StateConstant.Pending.getEnglish().equals(state.getStateName())) {
|
|
|
+ state.setStateName(StateConstant.Pending.getChinese());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ projectDetailsVo.setStateList(states);
|
|
|
|
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, projectDetailsVo);
|
|
|
}
|
|
@@ -1290,24 +1319,53 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
|
|
|
@Override
|
|
|
@SneakyThrows
|
|
|
- public ResponseBodyVO<String> analysisVehicleCoord(){
|
|
|
+ public ResponseBodyVO<String> analysisVehicleCoord() {
|
|
|
analysisCsvFile("E:\\仿真云平台\\三维还原视频说明\\360ogt.csv", new int[]{6, 7, 9});
|
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS);
|
|
|
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public ResponseBodyVO selectProjectTaskList(SimulationManualProjectParam param) {
|
|
|
- if (isEmpty(param.getId())) {
|
|
|
- return new ResponseBodyVO(ResponseBodyVO.Response.CLIENT_FAILURE);
|
|
|
- }
|
|
|
+ public ResponseBodyVO<PageInfo<ManualProjectTaskVo>> selectProjectTaskList(SimulationManualProjectParam param) {
|
|
|
//查询任务信息
|
|
|
ProjectTaskParam projectTaskParam = new ProjectTaskParam();
|
|
|
projectTaskParam.setPId(param.getId());
|
|
|
setPage(param.getCurrentPage() == null ? 1 : param.getCurrentPage(), param.getPageSize() == null ? 10 : param.getPageSize());
|
|
|
- List<ManualProjectTaskVo> manualProjectTaskVos = simulationProjectTaskMapper.selectProjectTaskByProjectId(projectTaskParam);
|
|
|
+ List<ManualProjectTaskVo> tasks = simulationProjectTaskMapper.selectProjectTaskByProjectId(projectTaskParam);
|
|
|
+ tasks.forEach(task -> {
|
|
|
+ if (StateConstant.Aborted.getEnglish().equals(task.getRunState())) {
|
|
|
+ task.setRunState(StateConstant.Aborted.getChinese());
|
|
|
+ }
|
|
|
+ if (StateConstant.PendingAnalysis.getEnglish().equals(task.getRunState())) {
|
|
|
+ task.setRunState(StateConstant.PendingAnalysis.getChinese());
|
|
|
+ }
|
|
|
+ if (StateConstant.Running.getEnglish().equals(task.getRunState())) {
|
|
|
+ task.setRunState(StateConstant.Running.getChinese());
|
|
|
+ }
|
|
|
+ if (StateConstant.Analysing.getEnglish().equals(task.getRunState())) {
|
|
|
+ task.setRunState(StateConstant.Analysing.getChinese());
|
|
|
+ }
|
|
|
+ if (StateConstant.Completed.getEnglish().equals(task.getRunState())) {
|
|
|
+ task.setRunState(StateConstant.Completed.getChinese());
|
|
|
+ }
|
|
|
+ if (StateConstant.Terminated.getEnglish().equals(task.getRunState())) {
|
|
|
+ task.setRunState(StateConstant.Terminated.getChinese());
|
|
|
+ }
|
|
|
+ if (StateConstant.Terminating.getEnglish().equals(task.getRunState())) {
|
|
|
+ task.setRunState(StateConstant.Terminating.getChinese());
|
|
|
+ }
|
|
|
+ if (StateConstant.Pending.getEnglish().equals(task.getRunState())) {
|
|
|
+ task.setRunState(StateConstant.Pending.getChinese());
|
|
|
+ }
|
|
|
+ if (StateConstant.Success.getEnglish().equals(task.getRunResult())) {
|
|
|
+ task.setRunResult(StateConstant.Success.getChinese());
|
|
|
+ }
|
|
|
+ if (StateConstant.Failed.getEnglish().equals(task.getRunResult())) {
|
|
|
+ task.setRunResult(StateConstant.Failed.getChinese());
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- PageInfo<ManualProjectTaskVo> pageInfo = new PageInfo(manualProjectTaskVos);
|
|
|
+ PageInfo<ManualProjectTaskVo> pageInfo = new PageInfo<>(tasks);
|
|
|
|
|
|
if (pageInfo.getList() != null) {
|
|
|
for (ManualProjectTaskVo task : pageInfo.getList()) {
|
|
@@ -1317,7 +1375,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- return new ResponseBodyVO(ResponseBodyVO.Response.SUCCESS, pageInfo);
|
|
|
+ return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, pageInfo);
|
|
|
}
|
|
|
|
|
|
private void analysisCsvFile(String filePath, int[] analysisFields) throws Exception {
|