Explorar o código

项目场景为空,列表返回为空

lyhzzz hai 1 ano
pai
achega
b57b6dfab7

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

@@ -65,11 +65,11 @@ public class ProjectSceneGpsServiceImpl extends ServiceImpl<IProjectSceneGpsMapp
 //        }else {
 //            sceneGpsVo = getByHomeParameters(sceneGpsDb.getDataSource());
 //        }
-//        if(sceneGpsVo == null && StrUtil.isNotBlank(sceneGpsDb.getGps())){
-//            String gps = sceneGpsDb.getGps();
-//            SceneExtGpsVo extGpsVo = JSONObject.parseObject(gps,SceneExtGpsVo.class);
-//            sceneGpsVo = new SceneGpsVo(extGpsVo.getLatitude(),extGpsVo.getLongitude(),extGpsVo.getAltitude(),1);
-//        }
+        if(sceneGpsVo == null && StrUtil.isNotBlank(sceneGpsDb.getGps())){
+            String gps = sceneGpsDb.getGps();
+            SceneExtGpsVo extGpsVo = JSONObject.parseObject(gps,SceneExtGpsVo.class);
+            sceneGpsVo = new SceneGpsVo(extGpsVo.getLatitude(),extGpsVo.getLongitude(),extGpsVo.getAltitude(),1);
+        }
         if(sceneGpsVo != null
                 && StrUtil.isNotBlank(sceneGpsVo.getLat())
                 && StrUtil.isNotBlank(sceneGpsVo.getLon())

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

@@ -21,7 +21,7 @@
             LEFT JOIN t_camera c on s.camera_id = c.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
+        WHERE s.rec_status = 'A'  and s.scene_status = -2 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},'%') )
         </if>