xiewj преди 1 година
родител
ревизия
9a4c2285c5

+ 7 - 1
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/listener/SceneListener.java

@@ -114,7 +114,13 @@ public class SceneListener {
                 workEntity.setAlgorithmTime(param.getAlgorithmTime());
                 workEntity.setCalcStatus(0);
                 workService.update(workEntity);
-
+                //清理旧数据
+                List<ScenePanoEntity> list = scenePanoService.findByWorkId(workEntity.getId());
+                for (ScenePanoEntity scenePanoEntity : list) {
+                    scenePanoEntity.setIsDelete(1);
+                    scenePanoEntity.setUpdateTime(new Date());
+                    scenePanoService.update(scenePanoEntity);
+                }
 
                 String visionUrl = "http://4dkk.4dage.com/scene_view_data/"+param.getSceneCode()+"/images/vision.txt";
                 HttpResponse execute = HttpRequest.get(visionUrl+"?m="+System.currentTimeMillis()).execute();

+ 1 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/impl/ScenePanoServiceImpl.java

@@ -38,6 +38,7 @@ public class ScenePanoServiceImpl extends IBaseServiceImpl<ScenePanoEntity, Long
     public List<ScenePanoEntity> findByWorkId(String workId) {
         ScenePanoEntity one=new ScenePanoEntity();
         one.setWorkId(workId);
+        one.setIsDelete(0);
         return getBaseMapper().select(one);
     }
 }

+ 1 - 1
720yun_fd_manage/gis_service/src/main/java/com/gis/service/impl/WorkServiceImpl.java

@@ -594,7 +594,7 @@ public class WorkServiceImpl extends IBaseStrServiceImpl<WorkEntity, String> imp
 
         entity.setSceneCodes(sceneCodes);
         // 2022-12-19 作品类型
-        if (!entity.getType().equalsIgnoreCase("pro")){
+        if (ObjectUtil.isNotEmpty(entity.getType())&&!entity.getType().equalsIgnoreCase("pro")){
             String type = getTypeBySceneCodes(sceneCodes);
             entity.setType(type);
         }