|
@@ -51,7 +51,7 @@ public class SceneReferenceLibService {
|
|
|
@Resource
|
|
|
private SystemScenePackageSublistMapper systemScenePackageSublistMapper;
|
|
|
|
|
|
- public SceneEvaluationOperatePO getSceneEvaluationFirst(SceneReferenceLibParam params, List<String> sceneIdList) {
|
|
|
+ public SceneEvaluationOperatePO getSceneEvaluationFirst(SceneReferenceLibSelectParam params, List<String> sceneIdList) {
|
|
|
// 添加复杂度 危险度数据
|
|
|
SceneEvaluationForListParam sceneEvaluationForListParam = new SceneEvaluationForListParam();
|
|
|
BeanUtils.copyProperties(params, sceneEvaluationForListParam);
|
|
@@ -59,95 +59,22 @@ public class SceneReferenceLibService {
|
|
|
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");
|
|
|
- }
|
|
|
- po.setComplexityLevels(SceneEvaluationLevel.getEvaluationLevelList(params.getComplexityLevel()));
|
|
|
- po.setRiskLevels(SceneEvaluationLevel.getEvaluationLevelList(params.getRiskLevel()));
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 获取基准场景库列表
|
|
|
*
|
|
|
- * @param params
|
|
|
+ * @param srl
|
|
|
* @return
|
|
|
*/
|
|
|
- public List<SceneReferenceLibPO> querySceneReferenceLibList(SceneReferenceLibParam params) {
|
|
|
+ public List<SceneReferenceLibPO> querySceneReferenceLibList(SceneReferenceLibSelectParam srl) {
|
|
|
|
|
|
- SceneReferenceLibSelectParam srl = new SceneReferenceLibSelectParam();
|
|
|
- copyEvaluationParams(params, srl);
|
|
|
- // 场景名称
|
|
|
- String sceneName = params.getSceneName();
|
|
|
- // 主车行为
|
|
|
- String[][] mainBehavior = params.getMainBehavior();
|
|
|
- String[][] otherBehavior = params.getOtherBehavior();
|
|
|
- String[][] weather = params.getWeather();
|
|
|
- String[][] roadType = params.getRoadType();
|
|
|
- String[][] roadGeometryPlane = params.getRoadGeometryPlane();
|
|
|
- String[][] roadGeometryVertical = params.getRoadGeometryVertical();
|
|
|
- String[][] autoDriveFunction = params.getAutoDriveFunction();
|
|
|
- String[][] operationArea = params.getOperationArea();
|
|
|
- //判断下拉选项是否为空
|
|
|
- if (ObjectUtil.isNotNull(params.getIds())) {
|
|
|
- srl.setIds(params.getIds());
|
|
|
- }
|
|
|
- if (mainBehavior != null && mainBehavior.length > 0) {
|
|
|
- ParamUtil.arrConvertObj(mainBehavior, srl);
|
|
|
- for (String[] arr : mainBehavior) {
|
|
|
- if (arr != null && arr.length == 1) {
|
|
|
- List<String> list = srl.getMainBehavior();
|
|
|
- if (list == null) {
|
|
|
- List<String> newList = new ArrayList<>();
|
|
|
- newList.add(arr[0]);
|
|
|
- srl.setMainBehavior(newList);
|
|
|
- } else {
|
|
|
- list.add(arr[0]);
|
|
|
- srl.setMainBehavior(list);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- srl.setSceneId(params.getSceneId());
|
|
|
- srl.setMinComplexity(params.getMinComplexity());
|
|
|
- srl.setMaxComplexity(params.getMaxComplexity());
|
|
|
- srl.setMinRisk(params.getMinRisk());
|
|
|
- srl.setMaxRisk(params.getMaxRisk());
|
|
|
- srl.setComplexityLevel(params.getComplexityLevel());
|
|
|
- srl.setRiskLevel(params.getRiskLevel());
|
|
|
- srl.setSceneDescription(params.getSceneDescription());
|
|
|
- srl.setLabel(params.getLabel());
|
|
|
- srl.setSceneName(sceneName);
|
|
|
- if (otherBehavior != null && otherBehavior.length > 0) {
|
|
|
- ParamUtil.arrConvertObj(otherBehavior, srl);
|
|
|
- }
|
|
|
- if (weather != null && weather.length > 0) {
|
|
|
- ParamUtil.arrConvertObj(weather, srl);
|
|
|
- }
|
|
|
- if (roadType != null && roadType.length > 0) {
|
|
|
- ParamUtil.arrConvertObj(roadType, srl);
|
|
|
- }
|
|
|
- if (roadGeometryPlane != null && roadGeometryPlane.length > 0) {
|
|
|
- ParamUtil.arrConvertObj(roadGeometryPlane, srl);
|
|
|
- }
|
|
|
- if (roadGeometryVertical != null && roadGeometryVertical.length > 0) {
|
|
|
- ParamUtil.arrConvertObj(roadGeometryVertical, srl);
|
|
|
- }
|
|
|
- if (autoDriveFunction != null && autoDriveFunction.length > 0) {
|
|
|
- ParamUtil.arrConvertObj(autoDriveFunction, srl);
|
|
|
+ if (StringUtil.isNotEmpty(srl.getComplexityLevel()) || StringUtil.isNotEmpty(srl.getMinComplexity()) || StringUtil.isNotEmpty(srl.getMaxComplexity())) {
|
|
|
+ srl.setNeedComplexity("1");
|
|
|
}
|
|
|
- if (operationArea != null && operationArea.length > 0) {
|
|
|
- ParamUtil.arrConvertObj(operationArea, srl);
|
|
|
+ if (StringUtil.isNotEmpty(srl.getRiskLevel()) || StringUtil.isNotEmpty(srl.getMinRisk()) || StringUtil.isNotEmpty(srl.getMaxRisk())) {
|
|
|
+ srl.setNeedRisk("1");
|
|
|
}
|
|
|
+ srl.setComplexityLevels(SceneEvaluationLevel.getEvaluationLevelList(srl.getComplexityLevel()));
|
|
|
+ srl.setRiskLevels(SceneEvaluationLevel.getEvaluationLevelList(srl.getRiskLevel()));
|
|
|
|
|
|
// 查询
|
|
|
List<SceneReferenceLibPO> sceneReferenceLibPOS = sceneReferenceLibMapper.querySceneReferenceLibList(srl);
|