夜得朦胧 1 năm trước cách đây
mục cha
commit
febb911fcb

+ 10 - 0
simulation-resource-server/src/main/java/com/css/simulation/resource/server/app/impl/MultiSimulationProjectServiceImpl.java

@@ -13,6 +13,7 @@ import api.common.pojo.po.model.ConfigPO;
 import api.common.pojo.po.project.MultiSimulationProjectPO;
 import api.common.pojo.po.project.MultiSimulationScenePO;
 import api.common.pojo.po.project.SimulationManualProjectPO;
+import api.common.pojo.vo.map.SimulationMapPathVO;
 import api.common.pojo.vo.map.SimulationMapVO;
 import api.common.pojo.vo.project.*;
 import api.common.util.JsonUtil;
@@ -50,6 +51,8 @@ public class MultiSimulationProjectServiceImpl implements MultiSimulationProject
 
     @Resource
     private SimulationMapMapper mapMapper;
+    @Resource
+    private SimulationMapPathMapper mapPathMapper;
 
     @Resource
     private SimulationManualProjectMapper simulationManualProjectMapper;
@@ -411,6 +414,13 @@ public class MultiSimulationProjectServiceImpl implements MultiSimulationProject
                 car.setPathStartJson(JSONObject.parseObject(pathStart));
                 String pathEnd = car.getPathEnd();
                 car.setPathEndJson(JSONObject.parseObject(pathEnd));
+                String pathId = car.getPathId();
+                if (StringUtils.isNotBlank(pathId)){
+                    SimulationMapPathVO simulationMapPathVO = mapPathMapper.selectSimulationMapById(pathId);
+                    if (simulationMapPathVO != null){
+                        car.setPathSort(simulationMapPathVO.getPathSort());
+                    }
+                }
             }
         }
         PageInfo<MultiSimulationSceneCarVO> pageInfo = new PageInfo<>(multiSimulationSceneCarVOS);

+ 5 - 0
simulation-resource-server/src/main/java/com/css/simulation/resource/server/infra/db/mysql/mapper/SimulationMapPathMapper.java

@@ -40,4 +40,9 @@ public interface SimulationMapPathMapper {
         "</script>")
     List<SimulationMapPathVO> selectSimulationMapPathList(SimulationMapPathParam param);
 
+    @Select("<script>" +
+        "select id,map_id,path_sort,path_start_point,path_end_point,start_point_num,end_point_num from simulation_map_path where deleted = 0 and id =#{id} " +
+        "</script>")
+    SimulationMapPathVO selectSimulationMapById(@Param("id") String id);
+
 }