Bläddra i källkod

王耀栋--工作台模块测试报告bug修改

wangyaodong 3 år sedan
förälder
incheckning
365bc91937

+ 3 - 0
api-common/src/main/java/api/common/pojo/vo/project/ProjectDetailsVo.java

@@ -87,5 +87,8 @@ public class ProjectDetailsVo {
     //是否生成报告
     private boolean createReport;
 
+    //场景包名
+    private String packageName;
+
 
 }

+ 3 - 0
api-common/src/main/java/api/common/pojo/vo/project/ProjectReportVo.java

@@ -56,6 +56,9 @@ public class ProjectReportVo {
 
     private List<SceneScListVo> sceneScoreLi;
 
+    //场景包名
+    private String packageName;
+
 
 }
 

+ 7 - 3
simulation-resource-server/src/main/java/com/css/simulation/resource/project/impl/SimulationProjectServiceImpl.java

@@ -393,7 +393,10 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
 
         }
 
+        //获取场景包信息
+        ScenePackagePO scenePackagePO = simulationProjectMapper.selectScenePackageInfoById(poParam.getScene());
 
+        projectDetailsVo.setPackageName(scenePackagePO.getPackageName());
 
         //评测等级
         String s = getEvaluationLevel(poParam);
@@ -751,7 +754,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
             algorithmScoreVo.setWeight("100");
             algorithmScoreVo.setScore(saveTwoDecimalPlaces(totalScore));
 
-//            totalScoreRatio = Double.valueOf(totalSceneScoreNum)/Double.valueOf(totalSceneNum)*100;
+            totalScoreRatio = Double.valueOf(totalSceneScoreNum)/Double.valueOf(totalSceneNum)*100;
             //汇总得分率计算方式修改
             Double d = 0D;
             if(!isEmpty(algorithmScoreVoList)){
@@ -759,7 +762,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
                     d +=a.getScoreRatio();
                 }
                 totalScoreRatio = saveTwoDecimalPlaces(d/algorithmScoreVoList.size());*/
-                totalScoreRatio = saveTwoDecimalPlaces(totalScoreRatio/algorithmScoreVoList.size());
+//                totalScoreRatio = saveTwoDecimalPlaces(totalScoreRatio/algorithmScoreVoList.size());
             }
 
             algorithmScoreVo.setScoreRatio(saveTwoDecimalPlaces(totalScoreRatio));
@@ -768,7 +771,8 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
             projectReportVo.setScoreRatio(saveTwoDecimalPlaces(totalScoreRatio));
 
             projectReportVo.setAlgorithmScore(saveTwoDecimalPlaces(totalScore));
-            evaluationLevelReport = getEvaluationLevelReport(saveTwoDecimalPlaces(totalScore));
+//            evaluationLevelReport = getEvaluationLevelReport(saveTwoDecimalPlaces(totalScore));
+            evaluationLevelReport = poParam.getEvaluationLevel();
             projectReportVo.setEvaluationLevel(evaluationLevelReport);
 
             sceneNames = stringBuffer.substring(0,stringBuffer.lastIndexOf("、"));

+ 2 - 0
simulation-resource-server/src/main/java/com/css/simulation/resource/project/mapper/SimulationProjectMapper.java

@@ -47,6 +47,8 @@ public interface SimulationProjectMapper {
 
     List<ScenePackagePO> selectScenePackageBaseById(ScenePackagePO scenePackagePO);
 
+    ScenePackagePO selectScenePackageInfoById(String id);
+
     List<ConfigSensorPO> selectVehicleSensor(String id);
 
     SensorBaseInfoVo selectSensorCamera(String id);

+ 1 - 1
simulation-resource-server/src/main/resources/mapper/project/SimulationAutomaticSubProjectMapper.xml

@@ -90,7 +90,7 @@
     <select id="selectProjectInfo" parameterType="api.common.pojo.param.project.SimulationManualProjectParam" resultType="api.common.pojo.vo.project.SimulationManualProjectVo">
         select s.id, p.scene, s.project_id, p.project_name, p.algorithm, p.algorithm_type,
         p.vehicle, p.project_describe, s.start_time, s.finish_time, s.now_run_state,
-        p.parallelism, p.max_simulation_time, p.is_choice_gpu
+        p.parallelism, p.max_simulation_time, p.is_choice_gpu, s.evaluation_level
         from simulation_automatic_subproject s
         left join simulation_automatic_project p on s.parent_id = p.id
         where s.id=#{id,jdbcType=VARCHAR}

+ 7 - 2
simulation-resource-server/src/main/resources/mapper/project/SimulationProjectMapper.xml

@@ -182,7 +182,7 @@
 
     <!--根据id查询基本信息-->
     <select id="selectProjectBaseById" parameterType="api.common.pojo.param.project.SimulationManualProjectParam" resultType="api.common.pojo.po.project.SimulationManualProjectPo">
-        select id,algorithm,scene,algorithm_score,project_name,project_id,algorithm_type
+        select id,algorithm,scene,algorithm_score,project_name,project_id,algorithm_type,evaluation_level
         from simulation_manual_project where id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
     </select>
 
@@ -290,6 +290,11 @@
          order by modify_time desc
     </select>
 
+    <!--根据id查询场景包信息-->
+    <select id="selectScenePackageInfoById" parameterType="string" resultType="api.common.pojo.po.scene.ScenePackagePO">
+        select a.package_id,a.package_name, a.scene_num from scene_package a where a.package_id = #{id,jdbcType=VARCHAR}
+    </select>
+
     <!--查询车辆与传感器关联信息-->
     <select id="selectVehicleSensor" parameterType="string" resultType="api.common.pojo.po.model.ConfigSensorPO">
         select
@@ -364,7 +369,7 @@
     <select id="selectSubSceneByPid" parameterType="string" resultType="api.common.pojo.vo.project.ScenePackageSubListVO">
         select sublist_id,sublist_name,scene_num,weight,parent_id,scene_natural_ids,scene_traffic_ids,scene_statue_ids,scene_generalization_ids
         from scene_package_sublist
-        where parent_id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
+        where parent_id = #{id,jdbcType=VARCHAR}
         order by seq
     </select>