李春阳 1 rok temu
rodzic
commit
d8a9ef5d6f

+ 2 - 2
api-common/src/main/java/api/common/pojo/enums/SceneEvaluationEnum.java

@@ -31,7 +31,7 @@ public enum SceneEvaluationEnum {
                 return enums.getLevel();
             }
         }
-        return null;
+        return levelValue;
     }
 
     public static String matchLevelEnumByLevel(String level) {
@@ -43,6 +43,6 @@ public enum SceneEvaluationEnum {
                 return enums.getLevelValue();
             }
         }
-        return null;
+        return level;
     }
 }

+ 1 - 0
api-common/src/main/java/api/common/pojo/param/scene/SceneReferenceLibSelectParam.java

@@ -59,6 +59,7 @@ public class SceneReferenceLibSelectParam extends PageVO implements Serializable
     // 用于批量删除的名称列表
     private List<String> sceneNameList;
     private String[] ids; //回显数组
+    private String[] names;
     private List<String> AllIds; //权限集合
     private String userId;
     private String needComplexity;

+ 57 - 0
api-common/src/main/java/api/common/pojo/vo/project/ProjectReportForReferenceVO.java

@@ -0,0 +1,57 @@
+package api.common.pojo.vo.project;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.Map;
+
+/**
+ * 工作报告
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+public class ProjectReportForReferenceVO {
+    private String projectName; //项目名称
+    private String projectId; //项目id
+    private String algorithmName; //算法名称
+    private String sceneNum;
+    private String scenePassNum;
+    private String passRate;
+    private String packageName; //场景包名
+    private String finishTime; //测试时间(开始时间)
+    Map<String, Integer> compRange;
+    Map<String, Integer> riskRange;
+    Map<String, Map<String, Integer>> compLevelForPassNum;
+    Map<String, Map<String, Integer>> riskLevelForPassNum;
+    Map<String, Integer> otherBehaviorTypeForNum;
+    Map<String, Map<String, Integer>> otherBehaviorForCompLevelNum ;
+    Map<String, Map<String, Integer>> otherBehaviorForRiskLevelNum;
+
+    Map<String, Integer> weatherTypeForNum;
+    Map<String, Map<String, Integer>> weatherForCompLevelNum;
+    Map<String, Map<String, Integer>> weatherForRiskLevelNum ;
+
+    Map<String, Integer> roadTypeForNum;
+
+    Map<String, Integer> operationAreaTypeForNum;
+    Map<String, Map<String, Integer>> operationAreaForCompLevelNum;
+    Map<String, Map<String, Integer>> operationAreaForRiskLevelNum;
+
+    Map<String, Integer> roadGeometryPlaneTypeForNum;
+    Map<String, Map<String, Integer>> roadGeometryPlaneForCompLevelNum;
+    Map<String, Map<String, Integer>> roadGeometryPlaneForRiskLevelNum;
+
+    Map<String, Integer> roadGeometryVerticalTypeForNum;
+    Map<String, Map<String, Integer>> roadGeometryVerticalForCompLevelNum;
+    Map<String, Map<String, Integer>> roadGeometryVerticalForRiskLevelNum;
+
+    Map<String, Map<String, Integer>> otherBehaviorAndAreaPassNum;
+    Map<String, Map<String, Integer>> weatherAndAreaPassNum;
+    Map<String, Map<String, Integer>> roadPlanePassNum;
+}
+
+

+ 1 - 0
api-common/src/main/java/api/common/pojo/vo/project/SimulationManualProjectEvaluationRuleVo.java

@@ -33,5 +33,6 @@ public class SimulationManualProjectEvaluationRuleVo {
     // 覆盖率
     private String coverageRateEvaluationRuleId;
     private String coverageRateEvaluationRuleName;
+    private String finishTime;
 
 }

+ 9 - 0
simulation-resource-server/src/main/java/com/css/simulation/resource/server/adapter/controller/job_manage/JobManageController.java

@@ -64,6 +64,15 @@ public class JobManageController {
     simulationProjectService.exportProjectReport(param);
   }
 
+  /**
+   * 获取测试报告数据
+   *
+   */
+  @RequestMapping("getProjectReportForAllReferenceScene")
+  public ResponseBodyVO<ProjectReportForReferenceVO> getProjectReportForAllReferenceScene(@RequestBody SimulationManualProjectParam param) {
+    return simulationProjectService.getProjectReportForAllReferenceScene(param);
+  }
+
   //* -------------------------------- Comment --------------------------------
 
   /**

+ 161 - 76
simulation-resource-server/src/main/java/com/css/simulation/resource/server/app/impl/SimulationProjectServiceImpl.java

@@ -5,11 +5,13 @@ 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.*;
 import api.common.pojo.param.scene.SceneEvaluationForListParam;
+import api.common.pojo.param.scene.ScenePackageParam;
 import api.common.pojo.param.scene.SceneReferenceLibSelectParam;
 import api.common.pojo.param.system.DictParam;
 import api.common.pojo.po.algorithm.AlgorithmPO;
@@ -22,7 +24,6 @@ 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.alibaba.fastjson.JSONObject;
 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.*;
@@ -2962,35 +2963,56 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
         return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, maps);
     }
 
-    public void getProjectReportForAllReferenceScene(SimulationManualProjectParam param) {
+    @Override
+    @SneakyThrows
+    public ResponseBodyVO<ProjectReportForReferenceVO> getProjectReportForAllReferenceScene(SimulationManualProjectParam param) {
+        ProjectReportForReferenceVO projectReportForReferenceVO = new ProjectReportForReferenceVO();
         // 获取要生成的数据
         ResponseBodyVO<ProjectReportVO> bodyVO = selectProjectReportById(param);
         ProjectReportVO vo = bodyVO.getInfo();
         String algorithmName = vo.getAlgorithmName();
-        String algorithmScore = vo.getAlgorithmScore().toString();
-        String evaluationLevel = vo.getEvaluationLevel();
         double passNum = 0;
-        List<AlgorithmScoreVO> algorithmScoreList = vo.getAlgorithmScoreList();
-        double size = algorithmScoreList.size();
-        for (AlgorithmScoreVO v : algorithmScoreList) {
-            if (v.getScore() >= 80) {
-                passNum++;
+        double passRate;
+        double sceneNum = 0;
+        String formattedNumber = "0";
+        List<SceneScListVo> sceneScoreLi = vo.getSceneScoreLi();
+
+        ProjectTaskParam projectTaskParam = new ProjectTaskParam();
+        projectTaskParam.setPId(param.getId());
+        List<ManualProjectTaskVo> tasks = simulationManualProjectTaskMapper.selectProjectTaskByProjectId(projectTaskParam);
+        SimulationManualProjectEvaluationRuleVo simulationManualProjectEvaluationRuleVo = simulationManualProjectMapper.selectEvaluationDetailByProjectId(param);
+        ScenePackagePO scenePackagePO = scenePackageMapper.queryScenePackage(ScenePackageParam.builder().packageId(simulationManualProjectEvaluationRuleVo.getScene()).build());
+        Map<String, ManualProjectTaskVo> taskMap = null;
+        if (CollectionUtil.isNotEmpty(tasks)) {
+            taskMap = tasks.stream().collect(Collectors.toMap(ManualProjectTaskVo::getSceneId, Function.identity()));
+            for (ManualProjectTaskVo task : tasks) {
+                if (task.getScore() >= 80) {
+                    passNum++;
+                }
             }
+            sceneNum = tasks.size();
+            passRate = passNum / sceneNum;
+            DecimalFormat df = new DecimalFormat("#.###");
+            formattedNumber = df.format(passRate);
         }
-        DecimalFormat df = new DecimalFormat("#.###");
 
-        double passRate = passNum / size;
-        String formattedNumber = df.format(passRate);
-        List<SceneScListVo> sceneScoreLi = vo.getSceneScoreLi();
+        projectReportForReferenceVO.setProjectName(vo.getProjectName());
+        projectReportForReferenceVO.setFinishTime(simulationManualProjectEvaluationRuleVo.getFinishTime());
+        projectReportForReferenceVO.setAlgorithmName(algorithmName);
+        projectReportForReferenceVO.setScenePassNum(String.valueOf(passNum));
+        projectReportForReferenceVO.setPackageName(scenePackagePO.getPackageName());
+        projectReportForReferenceVO.setProjectId(vo.getProjectId());
+        projectReportForReferenceVO.setPassRate(formattedNumber);
+        projectReportForReferenceVO.setSceneNum(String.valueOf(sceneNum));
+
 
         // 场景评价
-        List<String> sceneIds = sceneScoreLi.stream().map(SceneScListVo::getSceneId).collect(Collectors.toList());
-        List<SceneReferenceLibPO> sceneReferenceLibPOS = sceneReferenceLibMapper.querySceneReferenceLibList(SceneReferenceLibSelectParam.builder().ids(sceneIds.toArray(new String[sceneIds.size()])).build());
+        List<SceneReferenceLibPO> sceneReferenceLibPOS = sceneReferenceLibMapper.querySceneReferenceLibList(SceneReferenceLibSelectParam.builder().names(sceneScoreLi.stream().map(SceneScListVo::getSceneId).toArray(String[]::new)).build());
         // 查询复杂度和危险度
-        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())));
+        List<SceneComplexityPO> sceneComplexityPOS = sceneComplexityMapper.selectSceneComplexityEvaluationForExport(param.getId(), null);
+        sceneComplexityPOS.forEach(sceneComplexityPO -> sceneComplexityPO.setComplexityLevel(SceneEvaluationEnum.matchLevelEnumByLevelValue(sceneComplexityPO.getComplexityLevel())));
+        List<SceneRiskPO> sceneRiskPOS = sceneRiskMapper.selectSceneRiskEvaluationForExport(param.getId(), null);
+        sceneRiskPOS.forEach(sceneRiskPO -> sceneRiskPO.setRiskLevel(SceneEvaluationEnum.matchLevelEnumByLevelValue(sceneRiskPO.getRiskLevel())));
         Map<String, SceneComplexityPO> compPOMap = null;
         Map<String, SceneRiskPO> riskPOMap = null;
         if (CollectionUtil.isNotEmpty(sceneComplexityPOS)) {
@@ -3002,8 +3024,8 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
 
         Map<String, Integer> compRangeFor10 = new HashMap<>();
         Map<String, Integer> riskRangeFor10 = new HashMap<>();
-        Map<String, Integer> compLevelForPassNum = new HashMap<>();
-        Map<String, Integer> riskLevelForPassNum = new HashMap<>();
+        Map<String, Map<String, Integer>> compLevelForPassNum = new HashMap<>();
+        Map<String, Map<String, Integer>> riskLevelForPassNum = new HashMap<>();
         Map<String, Integer> otherBehaviorTypeForNum = new HashMap<>();
         Map<String, Map<String, Integer>> otherBehaviorForCompLevelNum = new HashMap<>();
         Map<String, Map<String, Integer>> otherBehaviorForRiskLevelNum = new HashMap<>();
@@ -3013,8 +3035,6 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
         Map<String, Map<String, Integer>> weatherForRiskLevelNum = new HashMap<>();
 
         Map<String, Integer> roadTypeForNum = new HashMap<>();
-//        Map<String, Map<String, Integer>> roadTypeForCompLevelNum = new HashMap<>();
-//        Map<String, Map<String, Integer>> roadTypeForRiskLevelNum = new HashMap<>();
 
         Map<String, Integer> operationAreaTypeForNum = new HashMap<>();
         Map<String, Map<String, Integer>> operationAreaForCompLevelNum = new HashMap<>();
@@ -3028,55 +3048,107 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
         Map<String, Map<String, Integer>> roadGeometryVerticalForCompLevelNum = new HashMap<>();
         Map<String, Map<String, Integer>> roadGeometryVerticalForRiskLevelNum = new HashMap<>();
 
-        JSONObject jsonObject = new JSONObject();
-        jsonObject.put("otherBehavior", new JSONObject());
-        sceneComplexityPOS.forEach(sceneComplexityPO -> checkAndSetDataSetValue(jsonObject, sceneComplexityPO.getComplexity(), sceneComplexityPO.getComplexityLevel()));
-        sceneRiskPOS.forEach(sceneRiskPO -> checkAndSetDataSetValue(jsonObject, sceneRiskPO.getRisk(), sceneRiskPO.getRiskLevel()));
+        Map<String, Map<String, Integer>> otherBehaviorAndAreaPassNum = new HashMap<>();
+        Map<String, Map<String, Integer>> weatherAndAreaPassNum = new HashMap<>();
+        Map<String, Map<String, Integer>> roadPlanePassNum = new HashMap<>();
+        projectReportForReferenceVO.setCompRange(compRangeFor10);
+        projectReportForReferenceVO.setRiskRange(riskRangeFor10);
+        projectReportForReferenceVO.setCompLevelForPassNum(compLevelForPassNum);
+        projectReportForReferenceVO.setRiskLevelForPassNum(riskLevelForPassNum);
+        projectReportForReferenceVO.setOtherBehaviorTypeForNum(otherBehaviorTypeForNum);
+        projectReportForReferenceVO.setOtherBehaviorForCompLevelNum(otherBehaviorForCompLevelNum);
+        projectReportForReferenceVO.setOtherBehaviorForRiskLevelNum(otherBehaviorForRiskLevelNum);
+
+        projectReportForReferenceVO.setWeatherTypeForNum(weatherTypeForNum);
+        projectReportForReferenceVO.setWeatherForCompLevelNum(weatherForCompLevelNum);
+        projectReportForReferenceVO.setWeatherForRiskLevelNum(weatherForRiskLevelNum);
+
+        projectReportForReferenceVO.setRoadTypeForNum(roadTypeForNum);
+        projectReportForReferenceVO.setOperationAreaTypeForNum(operationAreaTypeForNum);
+        projectReportForReferenceVO.setOperationAreaForCompLevelNum(operationAreaForCompLevelNum);
+        projectReportForReferenceVO.setOperationAreaForRiskLevelNum(operationAreaForRiskLevelNum);
+        projectReportForReferenceVO.setRoadGeometryPlaneTypeForNum(roadGeometryPlaneTypeForNum);
+        projectReportForReferenceVO.setRoadGeometryPlaneForCompLevelNum(roadGeometryPlaneForCompLevelNum);
+        projectReportForReferenceVO.setRoadGeometryPlaneForRiskLevelNum(roadGeometryPlaneForRiskLevelNum);
+        projectReportForReferenceVO.setRoadGeometryVerticalTypeForNum(roadGeometryVerticalTypeForNum);
+        projectReportForReferenceVO.setRoadGeometryVerticalForCompLevelNum(roadGeometryVerticalForCompLevelNum);
+        projectReportForReferenceVO.setRoadGeometryVerticalForRiskLevelNum(roadGeometryVerticalForRiskLevelNum);
+        projectReportForReferenceVO.setOtherBehaviorAndAreaPassNum(otherBehaviorAndAreaPassNum);
+        projectReportForReferenceVO.setWeatherAndAreaPassNum(weatherAndAreaPassNum);
+        projectReportForReferenceVO.setRoadPlanePassNum(roadPlanePassNum);
+
+        sceneComplexityPOS.forEach(sceneComplexityPO -> checkAndSetDataSetValue(compRangeFor10, compLevelForPassNum, sceneComplexityPO.getComplexity(), sceneComplexityPO.getComplexityLevel()));
+        sceneRiskPOS.forEach(sceneRiskPO -> checkAndSetDataSetValue(riskRangeFor10, riskLevelForPassNum, sceneRiskPO.getRisk(), sceneRiskPO.getRiskLevel()));
         for (SceneReferenceLibPO sceneReferenceLibPO : sceneReferenceLibPOS) {
             String sceneId = sceneReferenceLibPO.getSceneId();
             String otherBehavior = sceneReferenceLibPO.getOtherBehavior();
             if (StringUtil.isNotEmpty(otherBehavior)) {
-                int num = otherBehaviorTypeForNum.putIfAbsent(otherBehavior, 0);
+                int num = otherBehaviorTypeForNum.computeIfAbsent(otherBehavior, s -> 0);
                 otherBehaviorTypeForNum.put(otherBehavior, ++num);
                 if (compPOMap != null && compPOMap.get(sceneId) != null) {
                     SceneComplexityPO sceneComplexityPO = compPOMap.get(sceneId);
-                    Map<String, Integer> levelNumMap = otherBehaviorForCompLevelNum.putIfAbsent(otherBehavior, new HashMap<>());
+                    Map<String, Integer> levelNumMap = otherBehaviorForCompLevelNum.computeIfAbsent(otherBehavior, s -> new HashMap<>());
                     String level = sceneComplexityPO.getComplexityLevel();
-                    int tempNum = levelNumMap.putIfAbsent(level, 0);
+                    int tempNum = levelNumMap.computeIfAbsent(level, s -> 0);
                     levelNumMap.put(level, ++tempNum);
                 }
                 if (riskPOMap != null && riskPOMap.get(sceneId) != null) {
                     SceneRiskPO sceneRiskPO = riskPOMap.get(sceneId);
-                    Map<String, Integer> levelNumMap = otherBehaviorForRiskLevelNum.putIfAbsent(otherBehavior, new HashMap<>());
+                    Map<String, Integer> levelNumMap = otherBehaviorForRiskLevelNum.computeIfAbsent(otherBehavior, s -> new HashMap<>());
                     String level = sceneRiskPO.getRiskLevel();
-                    int tempNum = levelNumMap.putIfAbsent(level, 0);
+                    int tempNum = levelNumMap.computeIfAbsent(level, s -> 0);
                     levelNumMap.put(level, ++tempNum);
                 }
+
+                String area = sceneReferenceLibPO.getOperationArea();
+                if (StringUtil.isNotEmpty(area) && (taskMap != null && taskMap.get(sceneId) != null)) {
+                    Map<String, Integer> numMap = otherBehaviorAndAreaPassNum.computeIfAbsent("(" + area + ", " + otherBehavior + ")", s -> new HashMap<>());
+                    double score = taskMap.get(sceneId).getScore();
+                    if (score >= 80) {
+                        int tempNum = numMap.computeIfAbsent("passNum", s -> 0);
+                        numMap.put("passNum", ++tempNum);
+                    } else {
+                        int tempNum = numMap.computeIfAbsent("unPassNum", s -> 0);
+                        numMap.put("unPassNum", ++tempNum);
+                    }
+                }
             }
 
             String weather = sceneReferenceLibPO.getWeather();
             if (StringUtil.isNotEmpty(weather)) {
-                int num = weatherTypeForNum.putIfAbsent(weather, 0);
+                int num = weatherTypeForNum.computeIfAbsent(weather, s -> 0);
                 weatherTypeForNum.put(weather, ++num);
                 if (compPOMap != null && compPOMap.get(sceneId) != null) {
                     SceneComplexityPO sceneComplexityPO = compPOMap.get(sceneId);
-                    Map<String, Integer> levelNumMap = weatherForCompLevelNum.putIfAbsent(weather, new HashMap<>());
+                    Map<String, Integer> levelNumMap = weatherForCompLevelNum.computeIfAbsent(weather, s -> new HashMap<>());
                     String level = sceneComplexityPO.getComplexityLevel();
-                    int tempNum = levelNumMap.putIfAbsent(level, 0);
+                    int tempNum = levelNumMap.computeIfAbsent(level, s -> 0);
                     levelNumMap.put(level, ++tempNum);
                 }
                 if (riskPOMap != null && riskPOMap.get(sceneId) != null) {
                     SceneRiskPO sceneRiskPO = riskPOMap.get(sceneId);
-                    Map<String, Integer> levelNumMap = weatherForRiskLevelNum.putIfAbsent(weather, new HashMap<>());
+                    Map<String, Integer> levelNumMap = weatherForRiskLevelNum.computeIfAbsent(weather, s -> new HashMap<>());
                     String level = sceneRiskPO.getRiskLevel();
-                    int tempNum = levelNumMap.putIfAbsent(level, 0);
+                    int tempNum = levelNumMap.computeIfAbsent(level, s -> 0);
                     levelNumMap.put(level, ++tempNum);
                 }
+                String area = sceneReferenceLibPO.getOperationArea();
+                if (StringUtil.isNotEmpty(area) && (taskMap != null && taskMap.get(sceneId) != null)) {
+                    Map<String, Integer> numMap = weatherAndAreaPassNum.computeIfAbsent("(" + area + ", " + weather + ")", s -> new HashMap<>());
+                    double score = taskMap.get(sceneId).getScore();
+                    if (score >= 80) {
+                        int tempNum = numMap.computeIfAbsent("passNum", s -> 0);
+                        numMap.put("passNum", ++tempNum);
+                    } else {
+                        int tempNum = numMap.computeIfAbsent("unPassNum", s -> 0);
+                        numMap.put("unPassNum", ++tempNum);
+                    }
+                }
             }
 
             String roadType = sceneReferenceLibPO.getRoadType();
             if (StringUtil.isNotEmpty(roadType)) {
-                int num = roadTypeForNum.putIfAbsent(roadType, 0);
+                int num = roadTypeForNum.computeIfAbsent(roadType, s -> 0);
                 roadTypeForNum.put(roadType, ++num);
 //                if (compPOMap != null && compPOMap.get(sceneId) != null) {
 //                    SceneComplexityPO sceneComplexityPO = compPOMap.get(sceneId);
@@ -3097,65 +3169,79 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
 
             String operationArea = sceneReferenceLibPO.getOperationArea();
             if (StringUtil.isNotEmpty(operationArea)) {
-                int num = operationAreaTypeForNum.putIfAbsent(operationArea, 0);
+                int num = operationAreaTypeForNum.computeIfAbsent(operationArea, s -> 0);
                 operationAreaTypeForNum.put(operationArea, ++num);
                 if (compPOMap != null && compPOMap.get(sceneId) != null) {
                     SceneComplexityPO sceneComplexityPO = compPOMap.get(sceneId);
-                    Map<String, Integer> levelNumMap = operationAreaForCompLevelNum.putIfAbsent(operationArea, new HashMap<>());
+                    Map<String, Integer> levelNumMap = operationAreaForCompLevelNum.computeIfAbsent(operationArea, s -> new HashMap<>());
                     String level = sceneComplexityPO.getComplexityLevel();
-                    int tempNum = levelNumMap.putIfAbsent(level, 0);
+                    int tempNum = levelNumMap.computeIfAbsent(level, s -> 0);
                     levelNumMap.put(level, ++tempNum);
                 }
                 if (riskPOMap != null && riskPOMap.get(sceneId) != null) {
                     SceneRiskPO sceneRiskPO = riskPOMap.get(sceneId);
-                    Map<String, Integer> levelNumMap = operationAreaForRiskLevelNum.putIfAbsent(operationArea, new HashMap<>());
+                    Map<String, Integer> levelNumMap = operationAreaForRiskLevelNum.computeIfAbsent(operationArea, s -> new HashMap<>());
                     String level = sceneRiskPO.getRiskLevel();
-                    int tempNum = levelNumMap.putIfAbsent(level, 0);
+                    int tempNum = levelNumMap.computeIfAbsent(level, s -> 0);
                     levelNumMap.put(level, ++tempNum);
                 }
             }
 
             String roadGeometryPlane = sceneReferenceLibPO.getRoadGeometryPlane();
             if (StringUtil.isNotEmpty(roadGeometryPlane)) {
-                int num = roadGeometryPlaneTypeForNum.putIfAbsent(roadGeometryPlane, 0);
+                int num = roadGeometryPlaneTypeForNum.computeIfAbsent(roadGeometryPlane, s -> 0);
                 roadGeometryPlaneTypeForNum.put(roadGeometryPlane, ++num);
                 if (compPOMap != null && compPOMap.get(sceneId) != null) {
                     SceneComplexityPO sceneComplexityPO = compPOMap.get(sceneId);
-                    Map<String, Integer> levelNumMap = roadGeometryPlaneForCompLevelNum.putIfAbsent(roadGeometryPlane, new HashMap<>());
+                    Map<String, Integer> levelNumMap = roadGeometryPlaneForCompLevelNum.computeIfAbsent(roadGeometryPlane, s -> new HashMap<>());
                     String level = sceneComplexityPO.getComplexityLevel();
-                    int tempNum = levelNumMap.putIfAbsent(level, 0);
+                    int tempNum = levelNumMap.computeIfAbsent(level, s -> 0);
                     levelNumMap.put(level, ++tempNum);
                 }
                 if (riskPOMap != null && riskPOMap.get(sceneId) != null) {
                     SceneRiskPO sceneRiskPO = riskPOMap.get(sceneId);
-                    Map<String, Integer> levelNumMap = roadGeometryPlaneForRiskLevelNum.putIfAbsent(roadGeometryPlane, new HashMap<>());
+                    Map<String, Integer> levelNumMap = roadGeometryPlaneForRiskLevelNum.computeIfAbsent(roadGeometryPlane, s -> new HashMap<>());
                     String level = sceneRiskPO.getRiskLevel();
-                    int tempNum = levelNumMap.putIfAbsent(level, 0);
+                    int tempNum = levelNumMap.computeIfAbsent(level, s -> 0);
                     levelNumMap.put(level, ++tempNum);
                 }
+
+                String roadGeometryVertical = sceneReferenceLibPO.getRoadGeometryVertical();
+                if (StringUtil.isNotEmpty(roadGeometryVertical) && (taskMap != null && taskMap.get(sceneId) != null)) {
+                    Map<String, Integer> numMap = roadPlanePassNum.computeIfAbsent("(" + roadGeometryPlane + ", " + roadGeometryVertical + ")", s -> new HashMap<>());
+                    double score = taskMap.get(sceneId).getScore();
+                    if (score >= 80) {
+                        int tempNum = numMap.computeIfAbsent("passNum", s -> 0);
+                        numMap.put("passNum", ++tempNum);
+                    } else {
+                        int tempNum = numMap.computeIfAbsent("unPassNum", s -> 0);
+                        numMap.put("unPassNum", ++tempNum);
+                    }
+                }
             }
 
 
             String roadGeometryVertical = sceneReferenceLibPO.getRoadGeometryVertical();
             if (StringUtil.isNotEmpty(roadGeometryVertical)) {
-                int num = roadGeometryVerticalTypeForNum.putIfAbsent(roadGeometryVertical, 0);
+                int num = roadGeometryVerticalTypeForNum.computeIfAbsent(roadGeometryVertical, s -> 0);
                 roadGeometryVerticalTypeForNum.put(roadGeometryVertical, ++num);
                 if (compPOMap != null && compPOMap.get(sceneId) != null) {
                     SceneComplexityPO sceneComplexityPO = compPOMap.get(sceneId);
-                    Map<String, Integer> levelNumMap = roadGeometryVerticalForCompLevelNum.putIfAbsent(roadGeometryVertical, new HashMap<>());
+                    Map<String, Integer> levelNumMap = roadGeometryVerticalForCompLevelNum.computeIfAbsent(roadGeometryVertical, s -> new HashMap<>());
                     String level = sceneComplexityPO.getComplexityLevel();
-                    int tempNum = levelNumMap.putIfAbsent(level, 0);
+                    int tempNum = levelNumMap.computeIfAbsent(level, s -> 0);
                     levelNumMap.put(level, ++tempNum);
                 }
                 if (riskPOMap != null && riskPOMap.get(sceneId) != null) {
                     SceneRiskPO sceneRiskPO = riskPOMap.get(sceneId);
-                    Map<String, Integer> levelNumMap = roadGeometryVerticalForRiskLevelNum.putIfAbsent(roadGeometryVertical, new HashMap<>());
+                    Map<String, Integer> levelNumMap = roadGeometryVerticalForRiskLevelNum.computeIfAbsent(roadGeometryVertical, s -> new HashMap<>());
                     String level = sceneRiskPO.getRiskLevel();
-                    int tempNum = levelNumMap.putIfAbsent(level, 0);
+                    int tempNum = levelNumMap.computeIfAbsent(level, s -> 0);
                     levelNumMap.put(level, ++tempNum);
                 }
             }
         }
+        return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, projectReportForReferenceVO);
     }
 
     @Override
@@ -4129,44 +4215,43 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
     }
 
 
-    private void checkAndSetDataSetValue(JSONObject jsonObject, String value, String valueLevel) {
-        int valInt = Integer.parseInt(value);
-        jsonObject.computeIfAbsent(valueLevel, k -> new JSONObject());
-        if (Integer.parseInt(value) >= 80) {
-            jsonObject.getJSONObject(valueLevel).putIfAbsent("passNum", 0);
-            int tempNum = jsonObject.getJSONObject(valueLevel).getIntValue("passNum");
-            jsonObject.getJSONObject(valueLevel).put("passNum", ++tempNum);
+    private void checkAndSetDataSetValue(Map<String, Integer> desTriMap, Map<String, Map<String, Integer>> levelMap, String value, String valueLevel) {
+        double valDouble = Double.parseDouble(value);
+        Map<String, Integer> tempLevelMap = levelMap.computeIfAbsent(valueLevel, s -> new HashMap<>());
+        if (Double.parseDouble(value) >= 80) {
+            int tempNum = tempLevelMap.computeIfAbsent("passNum", s -> 0);
+            tempLevelMap.put("passNum", ++tempNum);
         } else {
-            jsonObject.getJSONObject(valueLevel).putIfAbsent("unPassNum", 0);
-            int tempNum = jsonObject.getJSONObject(valueLevel).getIntValue("unPassNum");
-            jsonObject.getJSONObject(valueLevel).put("unPassNum", ++tempNum);
+            int tempNum = tempLevelMap.computeIfAbsent("unPassNum", s -> 0);
+            tempLevelMap.put("unPassNum", ++tempNum);
         }
 
         String rangeVal = "";
-        if (valInt >= 0 && valInt <= 10) {
+        if (valDouble >= 0 && valDouble <= 10) {
             rangeVal = "[0,10]";
-        } else if (valInt > 10 && valInt <= 20) {
+        } else if (valDouble > 10 && valDouble <= 20) {
             rangeVal = "(10,20]";
-        } else if (valInt > 20 && valInt <= 30) {
+        } else if (valDouble > 20 && valDouble <= 30) {
             rangeVal = "(20,30]";
-        } else if (valInt > 30 && valInt <= 40) {
+        } else if (valDouble > 30 && valDouble <= 40) {
             rangeVal = "(30,40]";
-        } else if (valInt > 40 && valInt <= 50) {
+        } else if (valDouble > 40 && valDouble <= 50) {
             rangeVal = "(40,50]";
-        } else if (valInt > 50 && valInt <= 60) {
+        } else if (valDouble > 50 && valDouble <= 60) {
             rangeVal = "(50,60]";
-        } else if (valInt > 60 && valInt <= 70) {
+        } else if (valDouble > 60 && valDouble <= 70) {
             rangeVal = "(60,70]";
-        } else if (valInt > 70 && valInt <= 80) {
+        } else if (valDouble > 70 && valDouble <= 80) {
             rangeVal = "(70,80]";
-        } else if (valInt > 80 && valInt <= 90) {
+        } else if (valDouble > 80 && valDouble <= 90) {
             rangeVal = "(80,90]";
-        } else if (valInt > 90 && valInt <= 100) {
+        } else if (valDouble > 90 && valDouble <= 100) {
             rangeVal = "(90,100]";
+        } else if (valDouble > 100) {
+            rangeVal = "(100,+∞)";
         }
-        jsonObject.putIfAbsent(rangeVal, 0);
-        int newVal = jsonObject.getInteger(rangeVal);
-        jsonObject.put(rangeVal, ++newVal);
+        int newVal = desTriMap.computeIfAbsent(rangeVal, s -> 0);
+        desTriMap.put(rangeVal, ++newVal);
     }
 
     /**

+ 2 - 0
simulation-resource-server/src/main/java/com/css/simulation/resource/server/app/service/job_manage/SimulationProjectService.java

@@ -53,6 +53,8 @@ public interface SimulationProjectService {
 
   void exportProjectReport(SimulationManualProjectParam param);
 
+  ResponseBodyVO<ProjectReportForReferenceVO> getProjectReportForAllReferenceScene(SimulationManualProjectParam param);
+
   String selectLastProjectIdByAlgorithmId(String algorithmId);
 
   ResponseBodyVO<String> saveEvaluationLevel(String id);

+ 7 - 0
simulation-resource-server/src/main/resources/mysql/mapper/SceneReferenceLibMapper.xml

@@ -103,6 +103,13 @@
                     #{item}
                 </foreach>
             </if>
+            <if test="names != null and names.length>0">
+                and scene_name in
+                <foreach collection="names" item="item" index="index"
+                         separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </if>
             <if test="sceneName != null and sceneName != ''">
                 AND scene_name LIKE CONCAT('%',#{sceneName,jdbcType=VARCHAR},'%')
             </if>

+ 1 - 1
simulation-resource-server/src/main/resources/mysql/mapper/SimulationManualProjectMapper.xml

@@ -77,7 +77,7 @@
 
     <!--根据id查询工作信息-->
     <select id="selectEvaluationDetailByProjectId" parameterType="api.common.pojo.param.project.SimulationManualProjectParam" resultType="api.common.pojo.vo.project.SimulationManualProjectEvaluationRuleVo">
-        select id,project_name,project_describe,scene,coverage_rate_evaluation_rule_id,exposure_rate_evaluation_rule_id,complexity_evaluation_rule_id,risk_evaluation_rule_id
+        select id,project_name,project_describe,scene,coverage_rate_evaluation_rule_id,exposure_rate_evaluation_rule_id,complexity_evaluation_rule_id,risk_evaluation_rule_id,finish_time
         from simulation_manual_project
         where id = #{id,jdbcType=VARCHAR}
     </select>