Ver Fonte

Merge remote-tracking branch 'origin/master'

martin há 3 anos atrás
pai
commit
30fde9c3cf

+ 6 - 0
api-common/src/main/java/api/common/pojo/constants/DictConstants.java

@@ -60,4 +60,10 @@ public class DictConstants {
     public static final String FILE = "1"; //文件上传
     public static final String GIT = "2"; //仓库地址
 
+    //报告评测等级
+    public static final String REPORT_LEVEL_G = "G";
+    public static final String REPORT_LEVEL_A = "A";
+    public static final String REPORT_LEVEL_M = "M";
+    public static final String REPORT_LEVEL_P = "P";
+
 }

+ 13 - 0
api-common/src/main/java/api/common/pojo/param/project/DictParam.java

@@ -0,0 +1,13 @@
+package api.common.pojo.param.project;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class DictParam {
+
+    private String type;
+
+    private String code;
+}

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

@@ -10,5 +10,5 @@ import lombok.Setter;
 @Setter
 public class SensorBaseInfoVo {
     //名称
-    private String name;
+    private String sensorName;
 }

+ 16 - 3
simulation-resource-server/src/main/java/com/css/simulation/resource/project/ctrl/SimulationProjectCtrl.java

@@ -1,13 +1,13 @@
 package com.css.simulation.resource.project.ctrl;
 
 import api.common.pojo.common.ResponseBodyVO;
+import api.common.pojo.param.project.DictParam;
 import api.common.pojo.param.project.SimulationManualProjectParam;
 import com.css.simulation.resource.project.service.SimulationProjectService;
+import com.fasterxml.jackson.core.JsonProcessingException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.*;
 
 /**
  * 工作台模块--项目运行
@@ -127,6 +127,19 @@ public class SimulationProjectCtrl {
         return service.selectMaxParallelism();
     }
 
+    /**
+     * 根据字典类型和code获取name(测试方法)
+     * @param param
+     * @return
+     */
+    @RequestMapping("getDictName")
+    @ResponseBody
+    public ResponseBodyVO getDictName(@RequestBody DictParam param) {
+        String dictName = service.getDictName(param.getType(), param.getCode());
+        return new ResponseBodyVO(ResponseBodyVO.Response.SUCCESS,null,dictName);
+
+    }
+
 
 
 }

+ 0 - 36
simulation-resource-server/src/main/java/com/css/simulation/resource/project/enums/EvaluationLevelEnum.java

@@ -1,36 +0,0 @@
-package com.css.simulation.resource.project.enums;
-
-import lombok.Getter;
-
-/**
- * 项目评测等级枚举
- */
-@Getter
-public enum  EvaluationLevelEnum {
-
-    G("10","G"),
-    A("20","A"),
-    M("30","M"),
-    P("30","P");
-
-    private String code;
-
-    private String state;
-
-    EvaluationLevelEnum(String code, String state){
-        this.code = code;
-        this.state = state;
-    }
-
-    public static String getState(String code){
-        if(code == null){
-            return "";
-        }
-        for(EvaluationLevelEnum e :  EvaluationLevelEnum.values()){
-            if(e.code.equals(code)){
-                return e.state;
-            }
-        }
-        return "";
-    }
-}

+ 0 - 34
simulation-resource-server/src/main/java/com/css/simulation/resource/project/enums/WhetherEnum.java

@@ -1,34 +0,0 @@
-package com.css.simulation.resource.project.enums;
-
-import lombok.Getter;
-
-/**
- * 是否
- */
-@Getter
-public enum  WhetherEnum {
-
-    YES("0","是"),
-    NO("1","否");
-
-    private String code;
-
-    private String state;
-
-    WhetherEnum(String code, String state){
-        this.code = code;
-        this.state = state;
-    }
-
-    public static String getState(String code){
-        if(code == null){
-            return "";
-        }
-        for(WhetherEnum e :  WhetherEnum.values()){
-            if(e.code.equals(code)){
-                return e.state;
-            }
-        }
-        return "";
-    }
-}

+ 160 - 28
simulation-resource-server/src/main/java/com/css/simulation/resource/project/impl/SimulationProjectServiceImpl.java

@@ -8,18 +8,19 @@ 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.system.DictParam;
 import api.common.pojo.po.project.*;
 import api.common.pojo.vo.project.*;
 import api.common.util.JsonUtil;
 import com.css.simulation.resource.common.utils.AuthUtil;
 import com.css.simulation.resource.common.utils.PageUtil;
 import com.css.simulation.resource.project.constants.ProjectConstants;
-import com.css.simulation.resource.project.enums.EvaluationLevelEnum;
 import com.css.simulation.resource.project.enums.ProjectRunStateEnum;
 import com.css.simulation.resource.project.enums.SceneTypeEnum;
 import com.css.simulation.resource.project.feign.KafkaService;
 import com.css.simulation.resource.project.mapper.SimulationProjectMapper;
 import com.css.simulation.resource.project.service.SimulationProjectService;
+import com.css.simulation.resource.system.service.DictService;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.github.pagehelper.PageInfo;
 import lombok.SneakyThrows;
@@ -29,10 +30,7 @@ import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 @Service
 public class SimulationProjectServiceImpl implements SimulationProjectService {
@@ -43,6 +41,9 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
     @Autowired
     private KafkaService kafkaService;
 
+    @Autowired
+    DictService dictService;
+
     private String[] dateFmtArr= new String[]{"yyyyMMdd", "yyyy-MM-dd HH:mm:ss","yyyy-MM-dd"};
 
     @Override
@@ -247,11 +248,18 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
             return new ResponseBodyVO(ResponseBodyVO.Response.CLIENT_FAILURE);
         }
         ProjectDetailsVo projectDetailsVo = new ProjectDetailsVo();
+
+
+
         //项目基本信息
         SimulationManualProjectPo po = simulationProjectMapper.selectProjectById(param);
         if(po == null){
             return new ResponseBodyVO(ResponseBodyVO.Response.SERVER_FAILURE, "没有获取到数据");
         }
+
+        //评测等级
+        String s = getEvaluationLevel(po);
+
         //算法配置
         String algorithmId = po.getAlgorithm();
         AlgorithmBaseInfoVo algorithmBaseInfoVo = simulationProjectMapper.selectAlgorithmBaseInfoById(algorithmId).get(0);
@@ -345,8 +353,9 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
         projectDetailsVo.setProjectDescribe(po.getProjectDescribe());
         projectDetailsVo.setStartTime(getRqStr(po.getStartTime(),1));
         projectDetailsVo.setFinishTime(getRqStr(po.getFinishTime(),1));
-        projectDetailsVo.setNowRunState(ProjectRunStateEnum.getState(po.getNowRunState()));
-        projectDetailsVo.setEvaluationLevel(EvaluationLevelEnum.getState(po.getEvaluationLevel()));
+        projectDetailsVo.setNowRunState(getDictName(DictConstants.PROJECT_RUN_STATE, po.getNowRunState()));
+//        projectDetailsVo.setEvaluationLevel(getDictName(DictConstants.EVALUATION_LEVEL, po.getEvaluationLevel()));
+        projectDetailsVo.setEvaluationLevel(s);
         if(algorithmBaseInfoVo != null){
             projectDetailsVo.setAlgorithmName(algorithmBaseInfoVo.getAlgorithmName());
             projectDetailsVo.setAlgorithmDescribe(algorithmBaseInfoVo.getDescription());
@@ -418,7 +427,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
             Integer totalSceneScoreNum = 0;
 
             for(ScenePackageSubListVO v : scenePackageSubListVOS){
-                stringBuffer.append(v+"、");
+                stringBuffer.append(v.getSublistName()+"、");
                 AlgorithmScoreVo algorithmScoreVo = new AlgorithmScoreVo();
                 algorithmScoreVo.setProjectName(v.getSublistName());
                 Integer sceneNum = v.getSceneNum();
@@ -430,15 +439,17 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
                 SimulationMptFirstTargetScorePo simulationMptFirstTargetScorePo = new SimulationMptFirstTargetScorePo();
                 simulationMptFirstTargetScorePo.setPId(po.getId());
                 simulationMptFirstTargetScorePo.setTarget(v.getSublistId());
+                //单个二级指标得分
                 SimulationMptFirstTargetScorePo simulationMptFirstTargetScorePo1 = simulationProjectMapper.selectFirstTargetScore(simulationMptFirstTargetScorePo);
                 Double score = simulationMptFirstTargetScorePo1.getScore();
-                totalScore += score*weightDouble;
+                totalScore += score*(weightDouble/100);
                 algorithmScoreVo.setScore(saveTwoDecimalPlaces(score));
 //                totalWeight +=aDouble;
-                Integer num = v.getSceneNum();
-                Integer scoreNum = getSetScoreNum(po.getId());
+//                Integer num = v.getSceneNum();
+                //获取得分不为0的场景数量
+                Integer scoreNum = getSetScoreNum(v.getSublistId(),po.getId());
                 totalSceneScoreNum += scoreNum;
-                algorithmScoreVo.setScoreRatio(saveTwoDecimalPlaces(Double.valueOf(num/scoreNum)));
+                algorithmScoreVo.setScoreRatio(saveTwoDecimalPlaces(Double.valueOf(scoreNum)/Double.valueOf(sceneNum)*100));
                 algorithmScoreVoList.add(algorithmScoreVo);
             }
             //汇总
@@ -446,10 +457,10 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
             algorithmScoreVo.setProjectName("汇总");
             algorithmScoreVo.setSceneNum(totalSceneNum);
 //            algorithmScoreVo.setWeight(saveTwoDecimalPlaces(totalWeight).toString());
-            //指标权重总和默认是1
-            algorithmScoreVo.setWeight("1");
+            //指标权重总和默认是100%
+            algorithmScoreVo.setWeight("100");
             algorithmScoreVo.setScore(saveTwoDecimalPlaces(totalScore));
-            totalScoreRatio = Double.valueOf(totalSceneScoreNum/totalSceneNum);
+            totalScoreRatio = Double.valueOf(totalSceneScoreNum)/Double.valueOf(totalSceneNum)*100;
             algorithmScoreVo.setScoreRatio(saveTwoDecimalPlaces(totalScoreRatio));
             algorithmScoreVoList.add(algorithmScoreVo);
 
@@ -471,7 +482,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
         projectReportVo.setEvaluationGrade(evaluationLevelReport);
 
         //算法测试评分细则、详细得分情况
-        List<ScenePackageSubListVO> scenePackageSubListVOS1 = selectScenePackageSubListTreeAndSetScore(null, true, po.getScene(), po.getId(), 1);
+        List<ScenePackageSubListVO> scenePackageSubListVOS1 = selectScenePackageSubListTreeAndSetScore(null, true, po.getScene(), po.getId(), 2);
         projectReportVo.setSceneScoreList(scenePackageSubListVOS1);
 
         return new ResponseBodyVO(ResponseBodyVO.Response.SUCCESS, projectReportVo);
@@ -559,6 +570,18 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
         return new ResponseBodyVO(ResponseBodyVO.Response.SUCCESS,null,systemUserVo.getCpuAvailableNumber());
     }
 
+    @Override
+    public String getDictName(String type, String code) {
+        DictParam dictParam = new DictParam();
+        dictParam.setDictTypes(type);
+        Map<String, Map<String, String>> dictMapsByTypes = dictService.getDictMapsByTypes(dictParam);
+        Map<String, String> stringStringMap = dictMapsByTypes.get(type);
+        if(stringStringMap != null && stringStringMap.size() > 0){
+            return stringStringMap.get(code);
+        }
+        return "";
+    }
+
     /**
      * 根据场景id和场景类型获取场景名
      * @return
@@ -676,8 +699,8 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
             AlgorithmBaseInfoVo algorithmBaseInfoVo = algorithmBaseInfoVos.get(0);
             vo.setAlgorithm(algorithmBaseInfoVo.getAlgorithmName());
         }
-        vo.setNowRunStateDict(ProjectRunStateEnum.getState(vo.getNowRunState()));
-        vo.setEvaluationLevelDict(EvaluationLevelEnum.getState(vo.getEvaluationLevel()));
+        vo.setNowRunStateDict(getDictName(DictConstants.PROJECT_RUN_STATE, vo.getNowRunState()));
+        vo.setEvaluationLevelDict(getDictName(DictConstants.EVALUATION_LEVEL,vo.getEvaluationLevel()));
         return vo;
     }
 
@@ -901,6 +924,9 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
 
             //获取子节点集合
             for(ScenePackageSubListVO pvo : parentVoList){
+
+                pvo.setLevel(level);
+
                 //二级指标获取总分
                 if(level == 2){
                     setFirstTargetScore(pvo,pId);
@@ -910,10 +936,10 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
                 if(!isEmpty(cvoList)){
                     //存入父节点集合中
                     pvo.setChildScenePackageSubListVOList(cvoList);
-                    pvo.setLevel(level);
                     //继续查找下一节点
                     selectScenePackageSubListTreeAndSetScore(cvoList,false, null, pId, level+1);
                 }else{
+
                     //没有子节点;最后一级,获取指标得分和指标下场景得分
                     setScore(pvo,pId);
                 }
@@ -934,15 +960,23 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
         String sceneNaturalIds = vo.getSceneNaturalIds();
         String sceneTrafficIds = vo.getSceneTrafficIds();
         String sceneStatueIds = vo.getSceneStatueIds();
+        List<SceneScoreVo> sceneScoreVos = new ArrayList<>();
         List<SceneScoreVo> NaturalSceneScoreVos = setSceneScore(vo, sceneNaturalIds, "1", pId);
         List<SceneScoreVo> StatueSceneScoreVos = setSceneScore(vo, sceneStatueIds, "2", pId);
         List<SceneScoreVo> TrafficSceneScoreVos = setSceneScore(vo, sceneTrafficIds, "3", pId);
         ///TODO 暂不支持泛化场景
 
         //合成一个list
-        NaturalSceneScoreVos.addAll(StatueSceneScoreVos);
-        NaturalSceneScoreVos.addAll(TrafficSceneScoreVos);
-        vo.setSceneScoreList(NaturalSceneScoreVos);
+        if(!isEmpty(NaturalSceneScoreVos)){
+            sceneScoreVos.addAll(NaturalSceneScoreVos);
+        }
+        if(!isEmpty(StatueSceneScoreVos)){
+            sceneScoreVos.addAll(StatueSceneScoreVos);
+        }
+        if(!isEmpty(TrafficSceneScoreVos)){
+            sceneScoreVos.addAll(TrafficSceneScoreVos);
+        }
+        vo.setSceneScoreList(sceneScoreVos);
     }
     private void setLastTargetScore(ScenePackageSubListVO vo, String pId){
         SimulationMptLastTargetScorePo poParam = new SimulationMptLastTargetScorePo();
@@ -1009,24 +1043,122 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
     private String getEvaluationLevelReport(Double algorithmScore){
         String evaluationLevelReport = "";
         if(algorithmScore >= 90){
-            evaluationLevelReport = "G";
+            evaluationLevelReport = DictConstants.REPORT_LEVEL_G;
         }else if(algorithmScore >= 80 && algorithmScore < 90){
-            evaluationLevelReport = "A";
+            evaluationLevelReport = DictConstants.REPORT_LEVEL_A;
         }else if(algorithmScore >= 70 && algorithmScore < 80){
-            evaluationLevelReport = "M";
+            evaluationLevelReport = DictConstants.REPORT_LEVEL_M;
         }else if(algorithmScore < 70){
-            evaluationLevelReport = "P";
+            evaluationLevelReport = DictConstants.REPORT_LEVEL_P;
         }
         return evaluationLevelReport;
     }
 
-    private Integer getSetScoreNum(String pId){
+    /**
+     * 获取二级场景下所有得分不为0的场景数量
+     * @param sublistId
+     * @param pId
+     * @return
+     */
+    private Integer getSetScoreNum(String sublistId,String pId){
+        SceneScoreVo vo = selectScoreNum(null, null, true, pId, sublistId);
+        return vo.getNum();
+    }
+
+
+    /**
+     * 获取一级指标下所有得分不为0的场景总数
+     * @param resultVo 返回值,返回统计数量,首次传null
+     * @param parentVoList 首次传null
+     * @param isRoot 首次传true
+     * @param pId 项目表id,用于统计得分使用
+     * @param sublistId 指标id(用户查询指标下的所有场景)
+     * @return
+     */
+    private SceneScoreVo selectScoreNum(SceneScoreVo resultVo, List<ScenePackageSubListVO> parentVoList,
+                                                                                 boolean isRoot, String pId,String sublistId){
+        if(isRoot){
+            //初始化返回值
+            resultVo = new SceneScoreVo();
+            resultVo.setNum(0);
+
+            //查找下一级指标
+            parentVoList = simulationProjectMapper.selectSubSceneByPid(sublistId);
+            if(!isEmpty(parentVoList)){
+                selectScoreNum(resultVo, parentVoList, false, pId,null);
+            }else{
+                //当前指标为最后一级指标,获取当前指标,统计得分场景数
+                setScoreNum(sublistId, pId, resultVo);
+            }
+
+        }else{
+
+            //获取子节点集合
+            for(ScenePackageSubListVO pvo : parentVoList){
+
+                List<ScenePackageSubListVO> cvoList = simulationProjectMapper.selectSubSceneByPid(pvo.getSublistId());
+                if(!isEmpty(cvoList)){
+                    //存入父节点集合中
+                    pvo.setChildScenePackageSubListVOList(cvoList);
+                    //继续查找下一节点
+                    selectScoreNum(resultVo, cvoList,false, pId, null);
+                }else{
+                    //没有子节点;获取最后一级的得分场景数量
+                    setScoreNum(pvo.getSublistId(), pId, resultVo);
+
+                }
+
+            }
+        }
+
+        return resultVo;
+    }
+
+    private void setScoreNum(String sublistId, String pId, SceneScoreVo resultVo){
+//        ScenePackageSubListVO scenePackageSubListVO = simulationProjectMapper.selectsublistBySublistId(sublistId);
         SimulationMptSceneScorePo po = new SimulationMptSceneScorePo();
         po.setPId(pId);
+//        po.setLastTargerId(scenePackageSubListVO.getSublistId());
+        po.setLastTargerId(sublistId);
         SceneScoreVo sceneScoreVo = simulationProjectMapper.selectSceneScoreNumQuery(po);
-        return sceneScoreVo.getNum();
+        resultVo.setNum(resultVo.getNum()+sceneScoreVo.getNum());
     }
 
 
+    /**
+     * 计算评测等级
+     * @return
+     */
+    private String getEvaluationLevel(SimulationManualProjectPo po){
+        /*
+        汇总测试得分(计算评级)计算方法:(每一项一级指标的测试得分*测试权重)累加
+         */
+        List<ScenePackageSubListVO> scenePackageSubListVOS = simulationProjectMapper.selectSubSceneByPid(po.getScene());
+
+        String evaluationLevelReport = "";
+        if(!isEmpty(scenePackageSubListVOS)){
+            //汇总数据初始化
+            Double totalScore = 0D;
+
+            for(ScenePackageSubListVO v : scenePackageSubListVOS){
+                String weight = v.getWeight();
+                Double weightDouble = Double.valueOf(weight);
+                SimulationMptFirstTargetScorePo simulationMptFirstTargetScorePo = new SimulationMptFirstTargetScorePo();
+                simulationMptFirstTargetScorePo.setPId(po.getId());
+                simulationMptFirstTargetScorePo.setTarget(v.getSublistId());
+                //单个二级指标得分
+                SimulationMptFirstTargetScorePo simulationMptFirstTargetScorePo1 = simulationProjectMapper.selectFirstTargetScore(simulationMptFirstTargetScorePo);
+                Double score = simulationMptFirstTargetScorePo1.getScore();
+                totalScore += score*(weightDouble/100);
+            }
+
+            evaluationLevelReport = getEvaluationLevelReport(saveTwoDecimalPlaces(totalScore));
+            return evaluationLevelReport;
+        }
+
+        return evaluationLevelReport;
+
+    }
+
 
 }

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

@@ -66,6 +66,8 @@ public interface SimulationProjectMapper {
 
     List<ScenePackageSubListVO> selectSubSceneByPid(String id);
 
+    ScenePackageSubListVO selectsublistBySublistId(String id);
+
     List<ScenePackageSubListVO> selectSubListByPid(String id);
 
     int insertSimulationMptLastTargetScorePo(SimulationMptLastTargetScorePo po);

+ 3 - 0
simulation-resource-server/src/main/java/com/css/simulation/resource/project/service/SimulationProjectService.java

@@ -2,6 +2,7 @@ package com.css.simulation.resource.project.service;
 
 import api.common.pojo.common.ResponseBodyVO;
 import api.common.pojo.param.project.SimulationManualProjectParam;
+import com.fasterxml.jackson.core.JsonProcessingException;
 
 public interface SimulationProjectService {
 
@@ -25,4 +26,6 @@ public interface SimulationProjectService {
 
     ResponseBodyVO selectMaxParallelism();
 
+    String getDictName(String type, String code);
+
 }

+ 18 - 10
simulation-resource-server/src/main/resources/mapper/project/SimulationProjectMapper.xml

@@ -278,33 +278,33 @@
 
     <!--摄像头基本信息-->
     <select id="selectSensorCamera" parameterType="string" resultType="api.common.pojo.vo.project.SensorBaseInfoVo">
-        select a.name
+        select a.sensor_name
         from model_sensor_camera a
-        where a.id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
+        where a.id = #{id,jdbcType=VARCHAR} and a.is_deleted = '0'
     </select>
 
     <!--完美传感器基本信息-->
     <select id="selectSensorOgt" parameterType="string" resultType="api.common.pojo.vo.project.SensorBaseInfoVo">
-        select a.name
+        select a.sensor_name
         from model_sensor_ogt a
-        where a.id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
+        where a.id = #{id,jdbcType=VARCHAR} and a.is_deleted = '0'
     </select>
 
     <!--激光雷达基本信息-->
     <select id="selectSensorLidar" parameterType="string" resultType="api.common.pojo.vo.project.SensorBaseInfoVo">
-        select a.name
+        select a.sensor_name
         from model_sensor_lidar a
         where a.id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
     </select>
     <!--毫米波雷达基本信息-->
     <select id="selectSensorRadar" parameterType="string" resultType="api.common.pojo.vo.project.SensorBaseInfoVo">
-        select a.name
+        select a.name as sensor_name
         from model_sensor_radar a
         where a.id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
     </select>
     <!--gps基本信息-->
     <select id="selectSensorGps" parameterType="string" resultType="api.common.pojo.vo.project.SensorBaseInfoVo">
-        select a.name
+        select a.sensor_name
         from model_sensor_gps a
         where a.id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
     </select>
@@ -364,12 +364,20 @@
 
     <!--根据场景包id获取场景子集-->
     <select id="selectSubSceneByPid" parameterType="string" resultType="api.common.pojo.vo.project.ScenePackageSubListVO">
-        select sublist_id,sublist_name,scene_num,weight,parent_id
+        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'
         order by seq desc
     </select>
 
+    <!--获取指标信息-->
+    <select id="selectsublistBySublistId" 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 sublist_id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
+        order by seq desc
+    </select>
+
     <!--查询场景包id下最后一级所有指标和场景-->
     <select id="selectSubListByPid" parameterType="string" resultType="api.common.pojo.vo.project.ScenePackageSubListVO">
         select
@@ -493,8 +501,8 @@
     <!--查询场景不等于0的得分的数量-->
     <select id="selectSceneScoreNumQuery" parameterType="api.common.pojo.po.project.SimulationMptSceneScorePo" resultType="api.common.pojo.vo.project.SceneScoreVo">
         select count(*) as num
-        from simulation_mpt_scene_score
-        where p_id = #{pId,jdbcType=VARCHAR}
+        from simulation_manual_project_task
+        where p_id = #{pId,jdbcType=VARCHAR} and last_targer_id = #{lastTargerId}
         and score != 0 and is_deleted = '0'
     </select>