|
@@ -59,6 +59,20 @@ public class SceneReferenceLibService {
|
|
return sceneEvaluationRuleService.getSceneEvaluationFirst(sceneEvaluationForListParam);
|
|
return sceneEvaluationRuleService.getSceneEvaluationFirst(sceneEvaluationForListParam);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void copyEvaluationParams(SceneReferenceLibParam params, SceneReferenceLibSelectParam po) {
|
|
|
|
+ po.setComplexityLevel(params.getComplexityLevel());
|
|
|
|
+ po.setMinComplexity(params.getMinComplexity());
|
|
|
|
+ po.setMaxComplexity(params.getMaxComplexity());
|
|
|
|
+ po.setRiskLevel(params.getRiskLevel());
|
|
|
|
+ po.setMinRisk(params.getMinRisk());
|
|
|
|
+ po.setMaxRisk(params.getMaxRisk());
|
|
|
|
+ if (StringUtil.isNotEmpty(params.getComplexityLevel()) || StringUtil.isNotEmpty(params.getMinComplexity()) || StringUtil.isNotEmpty(params.getMaxComplexity())) {
|
|
|
|
+ po.setNeedComplexity("1");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtil.isNotEmpty(params.getRiskLevel()) || StringUtil.isNotEmpty(params.getMinRisk()) || StringUtil.isNotEmpty(params.getMaxRisk())) {
|
|
|
|
+ po.setNeedRisk("1");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
/**
|
|
/**
|
|
* 获取基准场景库列表
|
|
* 获取基准场景库列表
|
|
*
|
|
*
|
|
@@ -68,6 +82,7 @@ public class SceneReferenceLibService {
|
|
public List<SceneReferenceLibPO> querySceneReferenceLibList(SceneReferenceLibParam params) {
|
|
public List<SceneReferenceLibPO> querySceneReferenceLibList(SceneReferenceLibParam params) {
|
|
|
|
|
|
SceneReferenceLibSelectParam srl = new SceneReferenceLibSelectParam();
|
|
SceneReferenceLibSelectParam srl = new SceneReferenceLibSelectParam();
|
|
|
|
+ copyEvaluationParams(params, srl);
|
|
// 场景名称
|
|
// 场景名称
|
|
String sceneName = params.getSceneName();
|
|
String sceneName = params.getSceneName();
|
|
// 主车行为
|
|
// 主车行为
|
|
@@ -131,29 +146,7 @@ public class SceneReferenceLibService {
|
|
// 查询
|
|
// 查询
|
|
List<SceneReferenceLibPO> sceneReferenceLibPOS = sceneReferenceLibMapper.querySceneReferenceLibList(srl);
|
|
List<SceneReferenceLibPO> sceneReferenceLibPOS = sceneReferenceLibMapper.querySceneReferenceLibList(srl);
|
|
|
|
|
|
-
|
|
|
|
- SceneEvaluationForListParam sceneEvaluationForListParam = new SceneEvaluationForListParam();
|
|
|
|
- BeanUtils.copyProperties(params, sceneEvaluationForListParam);
|
|
|
|
- sceneEvaluationForListParam.setSceneIdList(sceneReferenceLibPOS.stream().map(SceneReferenceLibPO::getSceneId).collect(Collectors.toList()));
|
|
|
|
- SceneEvaluationOperatePO sceneEvaluationOperatePO = sceneEvaluationRuleService.getSceneEvaluationFirst(sceneEvaluationForListParam);
|
|
|
|
- Map<String, SceneComplexityPO> complexityPOMap = sceneEvaluationOperatePO.getSceneComplexityPOMap();
|
|
|
|
- Map<String, SceneRiskPO> riskPOMap = sceneEvaluationOperatePO.getSceneRiskPOMap();
|
|
|
|
- // 筛选
|
|
|
|
- List<SceneReferenceLibPO> finalSceneReferenceLibPOList = sceneReferenceLibPOS.stream()
|
|
|
|
- .filter(srf -> sceneEvaluationRuleService.checkSelectReferenceComplexity(srf.getSceneId(), sceneEvaluationForListParam, complexityPOMap) &&
|
|
|
|
- sceneEvaluationRuleService.checkSelectReferenceRisk(srf.getSceneId(), sceneEvaluationForListParam, riskPOMap))
|
|
|
|
- .collect(Collectors.toList());
|
|
|
|
-
|
|
|
|
- for (SceneReferenceLibPO po : finalSceneReferenceLibPOList) {
|
|
|
|
- // 赋值复杂度
|
|
|
|
- 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()));
|
|
|
|
- }
|
|
|
|
|
|
+ for (SceneReferenceLibPO po : sceneReferenceLibPOS) {
|
|
if (po.getRoadType().equals("高速")) {
|
|
if (po.getRoadType().equals("高速")) {
|
|
if (ObjectUtil.isNull(po.getLabel())) {
|
|
if (ObjectUtil.isNull(po.getLabel())) {
|
|
po.setLabel("高速");
|
|
po.setLabel("高速");
|
|
@@ -191,7 +184,7 @@ public class SceneReferenceLibService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- return finalSceneReferenceLibPOList;
|
|
|
|
|
|
+ return sceneReferenceLibPOS;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|