|
@@ -20,10 +20,12 @@ 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.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.domain.service.UserDomainService;
|
|
|
import com.css.simulation.resource.server.infra.db.mysql.mapper.*;
|
|
@@ -125,6 +127,9 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
@Resource
|
|
|
private SceneEvaluationRuleMapper sceneEvaluationRuleMapper;
|
|
|
|
|
|
+ @Resource
|
|
|
+ ScenePackageMapper scenePackageMapper;
|
|
|
+
|
|
|
// * -------------------------------- Comment --------------------------------
|
|
|
|
|
|
private final String[] dateFmtArr = new String[]{"yyyyMMdd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd"};
|
|
@@ -5201,6 +5206,40 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.SERVER_FAILURE, "操作失败");
|
|
|
}
|
|
|
|
|
|
+ @SneakyThrows
|
|
|
+ @Override
|
|
|
+ public ResponseBodyVO<SimulationManualProjectEvaluationRuleVo> getEvaluationRuleDetail(SimulationManualProjectParam param) {
|
|
|
+ if (isEmpty(param.getId()) || isEmpty(param.getProjectType())) {
|
|
|
+ return new ResponseBodyVO<>(ResponseBodyVO.Response.CLIENT_FAILURE, "id或类型不能为空");
|
|
|
+ }
|
|
|
+ SimulationManualProjectEvaluationRuleVo po = simulationManualProjectMapper.selectEvaluationDetailByProjectId(param);
|
|
|
+ if (po == null) {
|
|
|
+ return new ResponseBodyVO<>(ResponseBodyVO.Response.SERVER_FAILURE, "数据没有找到");
|
|
|
+ }
|
|
|
+ if (po.getComplexityEvaluationRuleId() != null) {
|
|
|
+ SceneEvaluationRulePO sceneCompRule = sceneEvaluationRuleMapper.querySceneEvaluationPyById(po.getComplexityEvaluationRuleId());
|
|
|
+ po.setComplexityEvaluationRuleName(sceneCompRule == null ? null : sceneCompRule.getRuleName());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (po.getRiskEvaluationRuleId() != null) {
|
|
|
+ SceneEvaluationRulePO sceneRiskRule = sceneEvaluationRuleMapper.querySceneEvaluationPyById(po.getRiskEvaluationRuleId());
|
|
|
+ po.setRiskEvaluationRuleName(sceneRiskRule == null ? null : sceneRiskRule.getRuleName());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (po.getCoverageRateEvaluationRuleId() != null) {
|
|
|
+ SceneEvaluationRulePO sceneCoverRule = sceneEvaluationRuleMapper.querySceneEvaluationPyById(po.getCoverageRateEvaluationRuleId());
|
|
|
+ po.setCoverageRateEvaluationRuleName(sceneCoverRule == null ? null : sceneCoverRule.getRuleName());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (po.getExposureRateEvaluationRuleId() != null) {
|
|
|
+ SceneEvaluationRulePO sceneExRule = sceneEvaluationRuleMapper.querySceneEvaluationPyById(po.getExposureRateEvaluationRuleId());
|
|
|
+ po.setExposureRateEvaluationRuleName(sceneExRule == null ? null : sceneExRule.getRuleName());
|
|
|
+ }
|
|
|
+ ScenePackageNewVO scenePackagePO = scenePackageMapper.queryScenePackageBySublist(po.getScene());
|
|
|
+ po.setSceneNum(scenePackagePO.getSceneNum());
|
|
|
+ return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, po);
|
|
|
+ }
|
|
|
+
|
|
|
private void convertPoToVo(SimulationAutomaticProjectPO po, SimulationManualProjectSingleVo vo) {
|
|
|
vo.setId(po.getId());
|
|
|
vo.setProjectName(po.getProjectName());
|