|
@@ -5,28 +5,23 @@ import api.common.pojo.common.ResponseBodyVO;
|
|
|
import api.common.pojo.constants.DictConstants;
|
|
|
import api.common.pojo.constants.ProjectConstants;
|
|
|
import api.common.pojo.constants.StateConstant;
|
|
|
-import api.common.pojo.enums.SceneEvaluationEnum;
|
|
|
import api.common.pojo.param.KafkaParameter;
|
|
|
import api.common.pojo.param.MinioParameter;
|
|
|
import api.common.pojo.param.algorithm.AlgorithmParameter;
|
|
|
-import api.common.pojo.param.project.ProjectTaskParam;
|
|
|
-import api.common.pojo.param.project.SceneScoreParam;
|
|
|
-import api.common.pojo.param.project.SimulationManualProjectKafkaParam;
|
|
|
-import api.common.pojo.param.project.SimulationManualProjectParam;
|
|
|
+import api.common.pojo.param.project.*;
|
|
|
+import api.common.pojo.param.scene.SceneEvaluationForListParam;
|
|
|
import api.common.pojo.param.system.DictParam;
|
|
|
import api.common.pojo.po.algorithm.AlgorithmPO;
|
|
|
import api.common.pojo.po.model.ConfigPO;
|
|
|
import api.common.pojo.po.model.ConfigSensorPO;
|
|
|
import api.common.pojo.po.model.VehiclePO;
|
|
|
import api.common.pojo.po.project.*;
|
|
|
-import api.common.pojo.po.scene.SceneComplexityPO;
|
|
|
-import api.common.pojo.po.scene.SceneEvaluationRulePO;
|
|
|
-import api.common.pojo.po.scene.ScenePackagePO;
|
|
|
-import api.common.pojo.po.scene.SceneRiskPO;
|
|
|
+import api.common.pojo.po.scene.*;
|
|
|
import api.common.pojo.vo.algorithm.AlgorithmVO;
|
|
|
import api.common.pojo.vo.project.*;
|
|
|
import api.common.pojo.vo.scene.ScenePackageNewVO;
|
|
|
import api.common.util.*;
|
|
|
+import com.css.simulation.resource.server.app.service.SceneEvaluationRuleService;
|
|
|
import com.css.simulation.resource.server.domain.service.UserDomainService;
|
|
|
import com.css.simulation.resource.server.infra.db.mysql.mapper.*;
|
|
|
import com.css.simulation.resource.server.app.service.AlgorithmService;
|
|
@@ -38,6 +33,7 @@ import com.css.simulation.resource.server.app.constant.ProjectRunStateEnum;
|
|
|
import com.css.simulation.resource.server.app.constant.SceneTypeEnum;
|
|
|
import com.css.simulation.resource.server.app.service.job_manage.SimulationProjectService;
|
|
|
import com.css.simulation.resource.server.app.service.DictService;
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import com.google.common.collect.ImmutableMap;
|
|
|
import com.itextpdf.text.*;
|
|
@@ -121,9 +117,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
@Resource
|
|
|
private UserDomainService userDomainService;
|
|
|
@Resource
|
|
|
- private SceneComplexityMapper sceneComplexityMapper;
|
|
|
- @Resource
|
|
|
- private SceneRiskMapper sceneRiskMapper;
|
|
|
+ private SceneEvaluationRuleService sceneEvaluationRuleService;
|
|
|
@Resource
|
|
|
private SceneEvaluationRuleMapper sceneEvaluationRuleMapper;
|
|
|
|
|
@@ -1942,6 +1936,11 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
vo.setSceneName(sceneBaseInfoVo.getSceneName());
|
|
|
}
|
|
|
|
|
|
+ } else if (DictConstants.SCENE_REFERENCE_LIB.equals(sceneType)) {
|
|
|
+ sceneBaseInfoVo = simulationManualProjectMapper.selectSceneReferenceLibDataById(sceneId);
|
|
|
+ if (sceneBaseInfoVo != null) {
|
|
|
+ vo.setSceneName(sceneBaseInfoVo.getSceneName());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -3046,7 +3045,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
List<AlgorithmScoreVO> algorithmScoreList = vo.getAlgorithmScoreList();
|
|
|
|
|
|
StringBuilder stringBuilder = new StringBuilder(" " + vo.getAlgorithmName() + "在");
|
|
|
- int totalSceneNum = vo.getSceneScoreLi().size();
|
|
|
+// int totalSceneNum = vo.getSceneScoreLi().size();
|
|
|
for (AlgorithmScoreVO v : algorithmScoreList) {
|
|
|
if ("汇总".equals(v.getProjectName())) {
|
|
|
continue;
|
|
@@ -3181,20 +3180,20 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
document.add(pdfPTable2);
|
|
|
List<SceneScListVo> sceneScoreLi = vo.getSceneScoreLi();
|
|
|
|
|
|
- if ("1".equals(param.getProjectType())) {
|
|
|
- // 场景评价
|
|
|
- List<String> sceneIds = sceneScoreLi.stream().map(SceneScListVo::getSceneId).collect(Collectors.toList());
|
|
|
- // 查询复杂度和危险度
|
|
|
- List<SceneComplexityPO> sceneComplexityPOS = sceneComplexityMapper.selectSceneComplexityEvaluationForExport(param.getProjectId(), sceneIds);
|
|
|
- sceneComplexityPOS.forEach(sceneComplexityPO -> sceneComplexityPO.setComplexityLevel(SceneEvaluationEnum.matchLevelEnumByLevelValue(sceneComplexityPO.getComplexityLevel())));
|
|
|
- List<SceneRiskPO> sceneRiskPOS = sceneRiskMapper.selectSceneRiskEvaluationForExport(param.getProjectId(), sceneIds);
|
|
|
- sceneRiskPOS.forEach(sceneRiskPO -> sceneRiskPO.setRiskLevel(SceneEvaluationEnum.matchLevelEnumByLevelValue(sceneRiskPO.getRiskLevel())));
|
|
|
- if (CollectionUtil.isNotEmpty(sceneComplexityPOS) || CollectionUtil.isNotEmpty(sceneRiskPOS)) {
|
|
|
- addElement(document, "场景评价", null, bf3, 15, false, 30, true);
|
|
|
- addElement(document, " 场景测试包共包含" + totalSceneNum + "个场景.", null, bf3, 15, false, 30, false);
|
|
|
- createBarAndPieImg(document, sceneComplexityPOS, sceneRiskPOS);
|
|
|
- }
|
|
|
- }
|
|
|
+// if ("1".equals(param.getProjectType())) {
|
|
|
+// // 场景评价
|
|
|
+// List<String> sceneIds = sceneScoreLi.stream().map(SceneScListVo::getSceneId).collect(Collectors.toList());
|
|
|
+// // 查询复杂度和危险度
|
|
|
+// List<SceneComplexityPO> sceneComplexityPOS = sceneComplexityMapper.selectSceneComplexityEvaluationForExport(param.getProjectId(), sceneIds);
|
|
|
+// sceneComplexityPOS.forEach(sceneComplexityPO -> sceneComplexityPO.setComplexityLevel(SceneEvaluationEnum.matchLevelEnumByLevelValue(sceneComplexityPO.getComplexityLevel())));
|
|
|
+// List<SceneRiskPO> sceneRiskPOS = sceneRiskMapper.selectSceneRiskEvaluationForExport(param.getProjectId(), sceneIds);
|
|
|
+// sceneRiskPOS.forEach(sceneRiskPO -> sceneRiskPO.setRiskLevel(SceneEvaluationEnum.matchLevelEnumByLevelValue(sceneRiskPO.getRiskLevel())));
|
|
|
+// if (CollectionUtil.isNotEmpty(sceneComplexityPOS) || CollectionUtil.isNotEmpty(sceneRiskPOS)) {
|
|
|
+// addElement(document, "场景评价", null, bf3, 15, false, 30, true);
|
|
|
+// addElement(document, " 场景测试包共包含" + totalSceneNum + "个场景.", null, bf3, 15, false, 30, false);
|
|
|
+// createBarAndPieImg(document, sceneComplexityPOS, sceneRiskPOS);
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
// ------- 4.详细得分说明 -------
|
|
|
|
|
@@ -5240,6 +5239,41 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, po);
|
|
|
}
|
|
|
|
|
|
+ @SneakyThrows
|
|
|
+ @Override
|
|
|
+ public ResponseBodyVO<PageInfo<ManualProjectTaskVo>> querySceneEvaluationDetail(SimulationManualProjectEvaluationDetailParam param) {
|
|
|
+ setPage(param.getCurrentPage() == null ? 1 : param.getCurrentPage(), param.getPageSize() == null ? 10 : param.getPageSize());
|
|
|
+ // 获取任务包信息
|
|
|
+ ProjectTaskParam projectTaskParam = new ProjectTaskParam();
|
|
|
+ projectTaskParam.setPId(param.getId());
|
|
|
+ List<ManualProjectTaskVo> tasks = simulationManualProjectTaskMapper.selectProjectTaskByProjectId(projectTaskParam);
|
|
|
+
|
|
|
+ PageInfo<ManualProjectTaskVo> pageInfo = new PageInfo<>(tasks);
|
|
|
+ PageHelper.clearPage();
|
|
|
+ if (pageInfo.getList() != null) {
|
|
|
+ // 添加复杂度 危险度数据
|
|
|
+ List<String> sceneIdList = pageInfo.getList().stream().map(ManualProjectTaskVo::getSceneId).collect(Collectors.toList());
|
|
|
+ SceneEvaluationForListParam sceneEvaluationForListParam = new SceneEvaluationForListParam();
|
|
|
+ sceneEvaluationForListParam.setSceneIdList(sceneIdList);
|
|
|
+ sceneEvaluationForListParam.setTaskId(param.getId());
|
|
|
+ SceneEvaluationOperatePO sceneEvaluationOperatePO = sceneEvaluationRuleService.getSceneEvaluationFirst(sceneEvaluationForListParam);
|
|
|
+ Map<String, SceneComplexityPO> complexityPOMap = sceneEvaluationOperatePO.getSceneComplexityPOMap();
|
|
|
+ Map<String, SceneRiskPO> riskPOMap = sceneEvaluationOperatePO.getSceneRiskPOMap();
|
|
|
+ for (ManualProjectTaskVo po : pageInfo.getList()) {
|
|
|
+ if (complexityPOMap.get(po.getSceneId()) != null) {
|
|
|
+ po.setComplexity(String.valueOf(complexityPOMap.get(po.getSceneId()).getComplexity()));
|
|
|
+ po.setComplexityLevel(String.valueOf(complexityPOMap.get(po.getSceneId()).getComplexityLevel()));
|
|
|
+ }
|
|
|
+ if (riskPOMap.get(po.getSceneId()) != null) {
|
|
|
+ po.setRisk(String.valueOf(riskPOMap.get(po.getSceneId()).getRisk()));
|
|
|
+ po.setRiskLevel(String.valueOf(riskPOMap.get(po.getSceneId()).getRiskLevel()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, pageInfo);
|
|
|
+ }
|
|
|
+
|
|
|
private void convertPoToVo(SimulationAutomaticProjectPO po, SimulationManualProjectSingleVo vo) {
|
|
|
vo.setId(po.getId());
|
|
|
vo.setProjectName(po.getProjectName());
|