root 2 years ago
parent
commit
b297a608d7

+ 0 - 1
api-common/src/main/java/api/common/pojo/common/CommonPO.java

@@ -31,5 +31,4 @@ public class CommonPO {
      * 是否已删除
      */
     public String isDeleted;
-
 }

+ 3 - 2
api-common/src/main/java/api/common/pojo/po/system/SceneImportPO.java

@@ -1,11 +1,12 @@
 package api.common.pojo.po.system;
 
 import api.common.pojo.common.CommonPO;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
+import lombok.*;
 
 @EqualsAndHashCode(callSuper = true)
 @Data
+@AllArgsConstructor
+@NoArgsConstructor
 public class SceneImportPO extends CommonPO {
 
     private String id;  //任务id

+ 1 - 1
simulation-resource-server/src/main/java/com/css/simulation/resource/system/mapper/SceneImportMapper.java

@@ -34,5 +34,5 @@ public interface SceneImportMapper {
             "where id = #{taskId}")
     String selectSceneTypeByTaskId(@Param("taskId") String taskId);
 
-    void deleteNaturalByTaskId(String taskId);
+    void deleteNaturalByTaskId(@Param("po")SceneImportPO sceneImportPO);
 }

+ 18 - 15
simulation-resource-server/src/main/java/com/css/simulation/resource/system/service/SceneImportService.java

@@ -89,20 +89,23 @@ public class SceneImportService {
     }
 
     public void deleteTask(String taskId) {
-        //1 根据任务 id 查询场景类型
-        String sceneType = sceneImportMapper.selectSceneTypeByTaskId(taskId);
-        //2 根据任务id删除相关联的所有同名任务
-        if (DictConstants.SCENE_NATURAL.equals(sceneType)) {
-            sceneImportMapper.deleteNaturalByTaskId(taskId);
-        } else if (DictConstants.SCENE_STANDARD.equals(sceneType)) {
-
-        } else if (DictConstants.SCENE_ACCIDENT.equals(sceneType)) {
-
-        } else if (DictConstants.SCENE_GENERAL.equals(sceneType)) {
-
-        } else {
-            throw new RuntimeException("场景类型错误:" + sceneType);
-        }
-        //2 删除任务
+//        //1 根据任务 id 查询场景类型
+//        String sceneType = sceneImportMapper.selectSceneTypeByTaskId(taskId);
+//        SceneImportPO sceneImportPO = SceneImportPO.builder()
+//
+//                .build();
+//        //2 根据任务id删除相关联的所有同名任务
+//        if (DictConstants.SCENE_NATURAL.equals(sceneType)) {
+//            sceneImportMapper.deleteNaturalByTaskId(taskId);
+//        } else if (DictConstants.SCENE_STANDARD.equals(sceneType)) {
+//            sceneImportMapper.deleteNaturalByTaskId(taskId);
+//        } else if (DictConstants.SCENE_ACCIDENT.equals(sceneType)) {
+//            sceneImportMapper.deleteNaturalByTaskId(taskId);
+//        } else if (DictConstants.SCENE_GENERAL.equals(sceneType)) {
+//            sceneImportMapper.deleteNaturalByTaskId(taskId);
+//        } else {
+//            throw new RuntimeException("场景类型错误:" + sceneType);
+//        }
+//        //2 删除任务
     }
 }

+ 5 - 0
simulation-resource-server/src/main/resources/mapper/model/VehicleMapper.xml

@@ -33,6 +33,7 @@
         <result column="centroidToGround" property="centroidToGround" jdbcType="VARCHAR"/>
         <result column="sprungMass" property="sprungMass" jdbcType="VARCHAR"/>
         <result column="vehicleWidth" property="vehicleWidth" jdbcType="VARCHAR"/>
+        <result column="vehicleLength" property="vehicleLength" jdbcType="VARCHAR"/>
         <result column="rotationalInertiaX" property="rotationalInertiaX" jdbcType="VARCHAR"/>
         <result column="rotationalInertiaY" property="rotationalInertiaY" jdbcType="VARCHAR"/>
         <result column="rotationalInertiaZ" property="rotationalInertiaZ" jdbcType="VARCHAR"/>
@@ -185,6 +186,7 @@
                centroidToGround,
                sprungMass,
                vehicleWidth,
+               vehicleLength,
                rotationalInertiaX,
                rotationalInertiaY,
                rotationalInertiaZ,
@@ -311,6 +313,7 @@
                                   par_file_path,
                                   wheelCenterToGround, centroidToFrontWheelCenter, centroidToGround, sprungMass,
                                   vehicleWidth,
+                                  vehicleLength,
                                   rotationalInertiaX, rotationalInertiaY, rotationalInertiaZ,
                                   frontLeftWheelEffectiveRollingRadius, frontLeftWheelRollingResistanceCoefficient,
                                   frontLeftWheelFreeRadius, frontLeftWheelRelationCurvePositiveMomentAndSideslipAngle,
@@ -384,6 +387,7 @@
                 #{centroidToGround},
                 #{sprungMass},
                 #{vehicleWidth},
+                #{vehicleLength},
                 #{rotationalInertiaX},
                 #{rotationalInertiaY},
                 #{rotationalInertiaZ},
@@ -492,6 +496,7 @@
             centroidToGround                                              = #{centroidToGround},
             sprungMass                                                    = #{sprungMass},
             vehicleWidth                                                  = #{vehicleWidth},
+            vehicleLength                                                 = #{vehicleLength},
             rotationalInertiaX                                            = #{rotationalInertiaX},
             rotationalInertiaY                                            = #{rotationalInertiaY},
             rotationalInertiaZ                                            = #{rotationalInertiaZ},