李春阳 1 سال پیش
والد
کامیت
a9ef018c1e

+ 4 - 1
simulation-resource-server/src/main/java/com/css/simulation/resource/server/app/service/SceneReferenceLibService.java

@@ -93,7 +93,10 @@ public class SceneReferenceLibService {
         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) {

+ 7 - 0
simulation-resource-server/src/main/resources/mysql/mapper/SceneReferenceLibMapper.xml

@@ -96,6 +96,13 @@
         FROM simulation.scene_reference_lib
         <where>
             is_deleted = '0'
+            <if test="ids != null and ids.length>0">
+                and scene_id in
+                <foreach collection="ids" item="item" index="index"
+                         separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </if>
             <if test="sceneName != null and sceneName != ''">
                 AND scene_name LIKE CONCAT('%',#{sceneName,jdbcType=VARCHAR},'%')
             </if>