Browse Source

取消协作移除项目场景

lyhzzz 11 months ago
parent
commit
b4348534ee

+ 1 - 1
src/main/java/com/fdkankan/manage_jp/entity/SceneCopyLog.java

@@ -42,7 +42,7 @@ public class SceneCopyLog implements Serializable {
     private String recStatus;
 
     @TableField("create_time")
-    private Date createTime;
+    private String createTime;
 
     @TableField("update_time")
     private Date updateTime;

+ 4 - 0
src/main/java/com/fdkankan/manage_jp/service/ISceneCopyLogService.java

@@ -3,6 +3,8 @@ package com.fdkankan.manage_jp.service;
 import com.fdkankan.manage_jp.entity.SceneCopyLog;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
 
 /**
@@ -18,4 +20,6 @@ public interface ISceneCopyLogService extends IService<SceneCopyLog> {
     void saveByNum(String num, String newNum, Long userId);
 
     List<SceneCopyLog> getByNewNum(String num);
+
+    HashMap<String, String> getByNewNumList(List<String> sceneNumList);
 }

+ 15 - 0
src/main/java/com/fdkankan/manage_jp/service/impl/SceneCopyLogServiceImpl.java

@@ -7,6 +7,8 @@ import com.fdkankan.manage_jp.service.ISceneCopyLogService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
 
 /**
@@ -35,4 +37,17 @@ public class SceneCopyLogServiceImpl extends ServiceImpl<ISceneCopyLogMapper, Sc
         wrapper.eq(SceneCopyLog::getNewNum,num);
         return this.list(wrapper);
     }
+
+    @Override
+    public HashMap<String, String> getByNewNumList(List<String> sceneNumList) {
+        HashMap<String, String> map = new HashMap<>();
+        if(sceneNumList.isEmpty()){
+            return map;
+        }
+        LambdaQueryWrapper<SceneCopyLog> wrapper = new LambdaQueryWrapper<>();
+        wrapper.in(SceneCopyLog::getNewNum,sceneNumList);
+        List<SceneCopyLog> list = this.list(wrapper);
+        list.forEach(e-> map.put(e.getNewNum(),e.getCreateTime()));
+        return map;
+    }
 }

+ 5 - 0
src/main/java/com/fdkankan/manage_jp/service/impl/SceneProServiceImpl.java

@@ -176,6 +176,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
 
         HashMap<String,Boolean> coldMap = tmColdStorageService.getByNumList(sceneNumList);
 
+        HashMap<String,String> copyMap = sceneCopyLogService.getByNewNumList(sceneNumList);
         for (SceneVo record : page.getRecords()) {
             if(param.getType() == null ||  param.getType() == 2 || param.getType() == 5){
                 JSONObject ssObj = ssSceneMap.get(record.getNum());
@@ -210,6 +211,10 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
             if(coldMap.get(record.getNum())!=null){
                 record.setIsMigrate(false);
             }
+            if(copyMap.get(record.getNum())!=null){
+                record.setIsCopy(true);
+                record.setCopyTime(copyMap.get(record.getNum()));
+            }
             record.setSceneType(param.getType());
         }
         return PageInfo.PageInfo(page);

+ 1 - 1
src/main/resources/mapper/manage_jp/ProjectSceneGpsMapper.xml

@@ -20,7 +20,7 @@
             LEFT JOIN t_company co on u.company_id = co.id
         WHERE s.rec_status = 'A'  and s.scene_status = -2 and s.pay_status = 1 and s.map_show = 1 and s.num is not null and gps.gps_source = 2
         <if test="param.searchKey != null and param.searchKey!='' ">
-            and (s.title like concat ('%',#{param.searchKey},'%') or s.laser_title like concat ('%',#{param.searchKey},'%') )
+            and (s.title like concat ('%',#{param.searchKey},'%') or s.laser_title like concat ('%',#{param.searchKey},'%') or s.num = #{param.searchKey})
         </if>
         <if test="param.numList !=null and param.numList.size >0">
             and  s.num in