lyhzzz пре 1 година
родитељ
комит
1d931c5f9a

+ 3 - 0
src/main/java/com/fdkankan/manage_jp/entity/ProjectSceneGps.java

@@ -84,4 +84,7 @@ public class ProjectSceneGps implements Serializable {
 
     @TableField(exist = false)
     private String sceneTitle;
+
+    @TableField("is_obj")
+    private Integer isObj;
 }

+ 15 - 3
src/main/java/com/fdkankan/manage_jp/task/TaskService.java

@@ -45,8 +45,18 @@ public class TaskService {
             if(sceneGps != null){
                 log.info("num:{}gps:{}",sceneGpsDb.getNum(),sceneGps);
                 if(sceneGps.getSceneSource() == 4 ) {
+                    if(sceneGpsDb.getIsObj() == 1){
+                        sceneGps.setIsObj(1);
+                        sceneGps.setWebSite(sceneGpsDb.getWebSite());
+                        laserssList.add(sceneGps);
+                    }
                     laserssList.add(sceneGps);
                 }else if( sceneGps.getSceneSource() == 5){
+                    if(sceneGpsDb.getIsObj() == 1){
+                        sceneGps.setIsObj(1);
+                        sceneGps.setWebSite(sceneGpsDb.getWebSite());
+                        laserssList.add(sceneGps);
+                    }
                     lasersgList.add(sceneGps);
                 }
             }
@@ -58,12 +68,14 @@ public class TaskService {
     private void addLaserList(List<ProjectSceneGps> laserssList,Integer sceneSource) {
         List<String> sceneMapShowList = new ArrayList<>();
         if(!laserssList.isEmpty()){
-            List<String> numList1 = laserssList.stream().map(ProjectSceneGps::getNum).collect(Collectors.toList());
+            List<String> numList1 = laserssList.stream().filter(e -> e.getIsObj() == 0).map(ProjectSceneGps::getNum).collect(Collectors.toList());
             HashMap<String, JSONObject> ssSceneMap = laserService.list(numList1,sceneSource);
             for (ProjectSceneGps sceneGps : laserssList) {
                 JSONObject ssObj = ssSceneMap.get(sceneGps.getNum());
-                if(ssObj!=null){
-                    sceneGps.setWebSite(ssObj.getString("webSite"));
+                if(ssObj!=null ){
+                    if(sceneGps.getIsObj() == 0){
+                        sceneGps.setWebSite(ssObj.getString("webSite"));
+                    }
                     sceneMapShowList.add(sceneGps.getNum());
                     projectSceneGpsService.save(sceneGps);
                 }

+ 1 - 0
src/main/java/com/fdkankan/manage_jp/vo/response/SceneGpsDb.java

@@ -10,4 +10,5 @@ public class SceneGpsDb {
     private String gps;
     private String dataSource;
     private String sceneVersion;
+    private Integer isObj;
 }

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

@@ -3,11 +3,11 @@
 <mapper namespace="com.fdkankan.manage_jp.mapper.IProjectSceneGpsMapper">
 
     <select id="getNotGpsScene" resultType="com.fdkankan.manage_jp.vo.response.SceneGpsDb">
-        SELECT s.num,s.scene_source,s.web_site,s.gps,s.data_source ,'v3' as scene_version FROM t_scene_pro s
+        SELECT s.num,s.scene_source,s.web_site,s.gps,s.data_source ,'v3' as scene_version,s.is_obj FROM t_scene_pro s
                 LEFT JOIN t_project_scene_gps gps on s.num = gps.num
         WHERE s.rec_status = 'A' and is_upgrade = 0 and s.gps is not null and s.`status` = -2 and s.scene_source in (4,5) and gps.num is null
         UNION
-        SELECT s.num,s.scene_source,e.web_site,e.gps,e.data_source ,'v4' as scene_version FROM t_scene_plus s
+        SELECT s.num,s.scene_source,e.web_site,e.gps,e.data_source ,'v4' as scene_version,e.is_obj FROM t_scene_plus s
                 LEFT JOIN t_scene_plus_ext e on s.id = e.plus_id
                 LEFT JOIN t_project_scene_gps gps on s.num = gps.num
         WHERE s.rec_status = 'A' and e.gps is not null and s.scene_status = -2 and s.scene_source in (4,5) and gps.num is null
@@ -16,12 +16,12 @@
     </select>
     
     <select id="listGps" resultType="com.fdkankan.manage_jp.vo.response.SceneGpsDbVp">
-        SELECT s.num,s.scene_name as title,null as laserTile,s.scene_source,'v3' as scene_version ,gps.lat,gps.lon,gps.alt,gps.web_site
-        FROM t_scene_pro s
-                LEFT JOIN t_project_scene_gps gps on s.num = gps.num
-                LEFT JOIN t_user u on s.user_id = u.id
-                LEFT JOIN t_company co on u.company_id = co.id
-        WHERE s.rec_status = 'A' and is_upgrade = 0 and  s.`status` = -2 and s.map_show = 1 and gps.num is not null
+        SELECT s.num,s.scene_name as title,null as laserTile,s.scene_source,'v3' as scene_version ,gps.lat,gps.lon,gps.alt,gps.web_site,gps.is_obj
+        FROM t_project_scene_gps gps
+            LEFT JOIN t_scene_pro s  on gps.num = s.num
+            LEFT JOIN t_user u on s.user_id = u.id
+            LEFT JOIN t_company co on u.company_id = co.id
+        WHERE s.rec_status = 'A' and is_upgrade = 0 and  s.`status` = -2 and s.map_show = 1 and s.num is not null
         <if test="param.searchKey != null and param.searchKey!='' ">
             and s.scene_name like concat ('%',#{param.searchKey},'%')
         </if>
@@ -43,13 +43,13 @@
         </if>
 
         UNION
-        SELECT s.num,s.title ,s.laser_title,s.scene_source,'v4' as scene_version  ,gps.lat,gps.lon,gps.alt,gps.web_site
-        FROM t_scene_plus s
-                LEFT JOIN t_scene_plus_ext e on s.id = e.plus_id
-                LEFT JOIN t_project_scene_gps gps on s.num = gps.num
-                LEFT JOIN t_user u on s.user_id = u.id
-                LEFT JOIN t_company co on u.company_id = co.id
-        WHERE s.rec_status = 'A'  and s.scene_status = -2 and s.map_show = 1 and gps.num is not null
+        SELECT s.num,s.title ,s.laser_title,s.scene_source,'v4' as scene_version  ,gps.lat,gps.lon,gps.alt,gps.web_site,gps.is_obj
+            FROM t_project_scene_gps gps
+            LEFT JOIN t_scene_plus s on gps.num = s.num
+            LEFT JOIN t_scene_plus_ext e on s.id = e.plus_id
+            LEFT JOIN t_user u on s.user_id = u.id
+            LEFT JOIN t_company co on u.company_id = co.id
+        WHERE s.rec_status = 'A'  and s.scene_status = -2 and s.map_show = 1 and s.num is not null
         <if test="param.searchKey != null and param.searchKey!='' ">
             and (s.title like concat ('%',#{param.searchKey},'%') or s.laser_title like concat ('%',#{param.searchKey},'%') )
         </if>