|
@@ -7,6 +7,7 @@ import api.common.pojo.param.scene.*;
|
|
|
import api.common.pojo.po.scene.*;
|
|
|
import api.common.pojo.po.system.SceneImportPO;
|
|
|
import api.common.util.*;
|
|
|
+import com.alibaba.druid.util.StringUtils;
|
|
|
import com.css.simulation.resource.server.infra.db.mysql.mapper.*;
|
|
|
import com.css.simulation.resource.server.infra.feign.service.FileDownService;
|
|
|
import com.css.simulation.resource.server.infra.util.AuthUtil;
|
|
@@ -226,7 +227,7 @@ public class SceneReferenceLibService {
|
|
|
ObjectMapper objMap = new ObjectMapper();
|
|
|
JsonNode root = objMap.readTree(json);
|
|
|
// 判断场景名称唯一
|
|
|
- sceneName = root.path("场景名称").asText();
|
|
|
+ sceneName = root.path("scenario_name").asText();
|
|
|
sceneNames.add(sceneName);
|
|
|
String osgb = root.path("osgb").asText();
|
|
|
String xodr = root.path("xodr").asText();
|
|
@@ -245,20 +246,30 @@ public class SceneReferenceLibService {
|
|
|
if (CollectionUtil.isNotEmpty(scenes)) {
|
|
|
isupdate = true;
|
|
|
}
|
|
|
- String mainBehavior = root.path("主车行为").asText();
|
|
|
- String otherBehavior = root.path("他车行为").asText();
|
|
|
- sceneReferenceLibPO.setMainBehavior(mainBehavior);
|
|
|
- sceneReferenceLibPO.setOtherBehavior(otherBehavior);
|
|
|
- sceneReferenceLibPO.setMaxTime(root.path("max_time").asText());
|
|
|
- sceneReferenceLibPO.setWeather(root.path("天气").asText());
|
|
|
- sceneReferenceLibPO.setRoadType(root.path("道路类型").asText());
|
|
|
- sceneReferenceLibPO.setRoadGeometryPlane(root.path("道路几何-平面").asText());
|
|
|
- sceneReferenceLibPO.setRoadGeometryVertical(root.path("道路几何-纵断面").asText());
|
|
|
- sceneReferenceLibPO.setAutoDriveFunction(root.path("自动驾驶功能").asText());
|
|
|
- sceneReferenceLibPO.setOperationArea(root.path("运行区域").asText());
|
|
|
- sceneReferenceLibPO.setSceneDescription(root.path("场景描述").asText());
|
|
|
- sceneReferenceLibPO.setLabel(root.path("标签").asText());
|
|
|
- sceneReferenceLibPO.setAutoDriveFunction(root.path("自动驾驶功能").asText());
|
|
|
+ String mainBehavior = root.path("ego_action").asText();
|
|
|
+ String otherBehavior = root.path("target_action").asText();
|
|
|
+ String replaceStr = "none";
|
|
|
+ String maxTime = root.path("max_time").asText();
|
|
|
+// Iterator<JsonNode> weather = root.path("scenario_weather").elements();
|
|
|
+ String scenarioWeather = root.withArray("scenario_weather").asText();
|
|
|
+ String rodeType = root.path("rode_type").asText();
|
|
|
+ String roadPlaneGeometry = root.path("road_plane_geometry").asText();
|
|
|
+ String roadProfileGeometry = root.path("road_profile_geometry").asText();
|
|
|
+ String autonomousDrivingFunction = root.path("autonomous_driving_function").asText();
|
|
|
+ String drivingArea = root.path("driving_area").asText();
|
|
|
+ String sceneDescription = root.path("scene_description").asText();
|
|
|
+ String scenaroTag = root.path("scenaro_tag").asText();
|
|
|
+ sceneReferenceLibPO.setMainBehavior(StringUtils.equals(mainBehavior, replaceStr) ? "" : mainBehavior);
|
|
|
+ sceneReferenceLibPO.setOtherBehavior(StringUtils.equals(otherBehavior, replaceStr) ? "" : otherBehavior);
|
|
|
+ sceneReferenceLibPO.setMaxTime(StringUtils.equals(maxTime, replaceStr) ? "" : maxTime);
|
|
|
+ sceneReferenceLibPO.setWeather(StringUtils.equals(scenarioWeather, replaceStr) ? "" : scenarioWeather);
|
|
|
+ sceneReferenceLibPO.setRoadType(StringUtils.equals(rodeType, replaceStr) ? "" : rodeType);
|
|
|
+ sceneReferenceLibPO.setRoadGeometryPlane(StringUtils.equals(roadPlaneGeometry, replaceStr) ? "" : roadPlaneGeometry);
|
|
|
+ sceneReferenceLibPO.setRoadGeometryVertical(StringUtils.equals(roadProfileGeometry, replaceStr) ? "" : roadProfileGeometry);
|
|
|
+ sceneReferenceLibPO.setAutoDriveFunction(StringUtils.equals(autonomousDrivingFunction, replaceStr) ? "" : autonomousDrivingFunction);
|
|
|
+ sceneReferenceLibPO.setOperationArea(StringUtils.equals(drivingArea, replaceStr) ? "" : drivingArea);
|
|
|
+ sceneReferenceLibPO.setSceneDescription(StringUtils.equals(sceneDescription, replaceStr) ? "" : sceneDescription);
|
|
|
+ sceneReferenceLibPO.setLabel(StringUtils.equals(scenaroTag, replaceStr) ? "" : scenaroTag);
|
|
|
sceneReferenceLibPO.setIsDeleted(DictConstants.IS_AVAILABLE);
|
|
|
if (ObjectUtil.isNull(sceneReferenceLibPO.getOsgbAddress())) {
|
|
|
sceneReferenceLibPO.setOsgbAddress(osgbAdress);
|