lyhzzz 2 anni fa
parent
commit
8e83fd49f5

+ 5 - 1
pom.xml

@@ -45,7 +45,11 @@
             <artifactId>4dkankan-utils-image</artifactId>
             <version>3.0.0-SNAPSHOT</version>
         </dependency>
-
+        <dependency>
+            <groupId>com.fdkankan</groupId>
+            <artifactId>4dkankan-utils-rabbitmq</artifactId>
+            <version>3.0.0-SNAPSHOT</version>
+        </dependency>
 
         <dependency>
             <groupId>mysql</groupId>

+ 33 - 0
src/main/java/com/fdkankan/manage_jp/httpClient/service/LaserService.java

@@ -1,5 +1,7 @@
 package com.fdkankan.manage_jp.httpClient.service;
 import com.fdkankan.common.util.FileUtils;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
+import com.fdkankan.rabbitmq.util.RabbitMqProducer;
 import com.google.common.collect.Lists;
 
 import com.alibaba.fastjson.JSONArray;
@@ -312,4 +314,35 @@ public class LaserService {
         }
         return null;
     }
+
+
+    @Autowired
+    private FYunFileServiceInterface fYunFileService;
+    @Autowired
+    private RabbitMqProducer rabbitMqProducer;
+
+    @Value("${4dkk.laserService.cloud-point-fyun-path:laser_u_data/%s/data/bundle_%s/building/}")
+    private String cloudPointFyunPath;
+    @Value("${4dkk.laserService.bucket:geosign-4dkk}")
+    private String bucket;
+    @Value("${queue.application.laser.cloud-point-build:laser-cloud-point-build}")
+    private String cloudPointBuild;
+
+    public void cloudPointBuild(String oldSceneCode,String sceneCode) {
+        if (!fYunFileService.fileExist(bucket,String.format(cloudPointFyunPath,oldSceneCode,oldSceneCode) +"vision_edit.txt")){
+            return;
+        }
+        log.info("开始同步点云编辑文件");
+        // 上传点云编辑文件,并通知激光系统
+        fYunFileService.copyFileBetweenBucket(bucket,String.format(cloudPointFyunPath,oldSceneCode,oldSceneCode) + "vision_edit.txt",
+                bucket,String.format(cloudPointFyunPath,sceneCode,sceneCode) + "vision_edit.txt");
+
+        fYunFileService.copyFileBetweenBucket(bucket,String.format(cloudPointFyunPath,oldSceneCode,oldSceneCode) + "uuidcloud",
+                bucket,String.format(cloudPointFyunPath,sceneCode,sceneCode) + "uuidcloud");
+
+        Map<String, Object> params = new HashMap<>();
+        params.put("sceneNum", sceneCode);
+        params.put("businessType", 0);
+        rabbitMqProducer.sendByWorkQueue(cloudPointBuild, params);
+    }
 }

+ 2 - 0
src/main/java/com/fdkankan/manage_jp/service/impl/ScenePlusServiceImpl.java

@@ -144,6 +144,8 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
         if(scenePlus.getSceneSource() == 4){  //深时复制
             laserService.copy(scenePlus.getCameraId(),scenePlus.getCreateTime(),newNum,0,null,
                     sceneEditInfo.getScenePassword(),scenePlus.getTitle(),scenePlus.getUserId(),"V4");
+        }else {
+            laserService.cloudPointBuild(oldNum,newNum);
         }
 
         try {

+ 4 - 0
src/main/resources/bootstrap-test.yml

@@ -24,6 +24,10 @@ spring:
             group: DEFAULT_GROUP
             refresh: true
 
+          - data-id: common-rabbitmq-config.yaml
+            group: DEFAULT_GROUP
+            refresh: true
+
       discovery:
         server-addr: ${spring.cloud.nacos.config.server-addr}
         namespace: ${spring.cloud.nacos.config.namespace}