lyhzzz 2 meses atrás
pai
commit
ae608b55d1

+ 2 - 4
doc/fd_fusion-local.sql

@@ -1029,7 +1029,5 @@ ALTER TABLE `laser`.`t_case`
     ADD COLUMN `offline_path` varchar(255) NULL COMMENT '离线包路径' AFTER `offline_status`;
 
 ALTER TABLE `laser`.`t_case`
-    ADD COLUMN `offline_start_time` varchar(255) NULL COMMENT '离线包打包时间' AFTER `offline_path`;
-
-ALTER TABLE `laser`.`t_case`
-    ADD COLUMN `offline_end_time` varchar(255) NULL COMMENT '离线包打包时间' AFTER `offline_start_time`;
+    ADD COLUMN `offline_start_time` timestamp NULL AFTER `offline_path`,
+    ADD COLUMN `offline_end_time` timestamp NULL AFTER `offline_start_time`;

+ 5 - 0
src/main/java/com/fdkankan/fusion/mapper/IScenePlusExtMapper.java

@@ -2,7 +2,11 @@ package com.fdkankan.fusion.mapper;
 
 import com.fdkankan.fusion.entity.ScenePlusExt;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fdkankan.fusion.response.SceneVo;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * <p>
@@ -15,4 +19,5 @@ import org.apache.ibatis.annotations.Mapper;
 @Mapper
 public interface IScenePlusExtMapper extends BaseMapper<ScenePlusExt> {
 
+    List<SceneVo> getRtkByNumList(@Param("numList") List<String> numList);
 }

+ 4 - 0
src/main/java/com/fdkankan/fusion/service/IScenePlusExtService.java

@@ -2,6 +2,9 @@ package com.fdkankan.fusion.service;
 
 import com.fdkankan.fusion.entity.ScenePlusExt;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.fdkankan.fusion.response.SceneVo;
+
+import java.util.List;
 
 /**
  * <p>
@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IScenePlusExtService extends IService<ScenePlusExt> {
 
+    List<SceneVo> getRtkByNumList(List<String> numList);
 }

+ 15 - 2
src/main/java/com/fdkankan/fusion/service/impl/SceneCommonService.java

@@ -87,6 +87,10 @@ public class SceneCommonService implements ISceneCommonService {
     ISceneService sceneService;
     @Autowired
     ISceneFileBuildService sceneFileBuildService;
+    @Autowired
+    IScenePlusService scenePlusService;
+    @Autowired
+    IScenePlusExtService scenePlusExtService;
     @Override
     public PageInfo pageList(ScenePram param) {
 
@@ -115,6 +119,12 @@ public class SceneCommonService implements ISceneCommonService {
         HashMap<String, CaseEntity> mapByNumList = caseNumService.getMapByNumList(numList);
         HashMap<String, SceneFileBuild> buildTimeByScene = sceneFileBuildService.getBuildTimeByScene(numList);
 
+        HashMap<String,SceneVo> rtkInfoMap = new HashMap<>();
+        if(!numList.isEmpty()){
+            List<SceneVo> sceneVoList2 = scenePlusExtService.getRtkByNumList(numList);
+            sceneVoList2.forEach(e -> rtkInfoMap.put(e.getNum(),e));
+        }
+
         List<SceneVo> sceneVoList = new ArrayList<>();
         for (Scene scene : page.getRecords()) {
             SceneVo vo = new SceneVo();
@@ -139,8 +149,11 @@ public class SceneCommonService implements ISceneCommonService {
             vo.setSceneSize(scene.getSpace());
             vo.setMapping(scene.getMapping());
             vo.setWebPath(scene.getWebPath());
-            //vo.setOrientation();
-            //vo.setRtkLocation();
+            SceneVo rtkVo = rtkInfoMap.get(scene.getSceneCode());
+            if(rtkVo != null){
+                vo.setOrientation(rtkVo.getOrientation());
+                vo.setRtkLocation(rtkVo.getRtkLocation());
+            }
             if(mapByNumList.get(vo.getNum() +"_"+  vo.getType())!=null){
                 vo.setInCase(true);
             }

+ 7 - 0
src/main/java/com/fdkankan/fusion/service/impl/ScenePlusExtServiceImpl.java

@@ -3,10 +3,13 @@ package com.fdkankan.fusion.service.impl;
 
 import com.fdkankan.fusion.entity.ScenePlusExt;
 import com.fdkankan.fusion.mapper.IScenePlusExtMapper;
+import com.fdkankan.fusion.response.SceneVo;
 import com.fdkankan.fusion.service.IScenePlusExtService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * <p>
  *  服务实现类
@@ -19,4 +22,8 @@ import org.springframework.stereotype.Service;
 
 public class ScenePlusExtServiceImpl extends ServiceImpl<IScenePlusExtMapper, ScenePlusExt> implements IScenePlusExtService {
 
+    @Override
+    public List<SceneVo> getRtkByNumList(List<String> numList) {
+        return this.getBaseMapper().getRtkByNumList(numList);
+    }
 }

+ 7 - 0
src/main/resources/mapper/fusion/ScenePlusExtMapper.xml

@@ -2,4 +2,11 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.fdkankan.fusion.mapper.IScenePlusExtMapper">
 
+    <select id="getRtkByNumList" resultType="com.fdkankan.fusion.response.SceneVo">
+        select s.num,e.rtk_location,e.orientation from t_scene_plus s left join t_scene_plus_ext e on s.id = e.plus_id
+        where s.num in
+            <foreach collection="numList" item="num" open="(" separator="," close=")">
+                #{num}
+            </foreach>
+    </select>
 </mapper>