|
@@ -4,6 +4,8 @@ import cn.hutool.core.io.FileUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.alibaba.nacos.common.http.client.NacosAsyncRestTemplate;
|
|
|
import com.fdkankan.common.util.FileUtils;
|
|
|
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
|
+import com.fdkankan.rabbitmq.util.RabbitMqProducer;
|
|
|
import com.fdkankan.ucenter.common.CameraTypeEnum;
|
|
|
import com.fdkankan.ucenter.common.Result;
|
|
|
import com.fdkankan.ucenter.common.constants.NacosProperty;
|
|
@@ -21,6 +23,7 @@ import com.fdkankan.ucenter.vo.response.SceneNumVo;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.http.HttpEntity;
|
|
|
import org.springframework.http.HttpHeaders;
|
|
|
import org.springframework.http.HttpStatus;
|
|
@@ -271,4 +274,40 @@ public class LaserService {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private FYunFileServiceInterface fYunFileService;
|
|
|
+ @Autowired
|
|
|
+ private RabbitMqProducer rabbitMqProducer;
|
|
|
+
|
|
|
+ @Value("${4dkk.laserService.cloud-point-fyun-path}")
|
|
|
+ private String cloudPointFyunPath;
|
|
|
+ @Value("${4dkk.laserService.bucket}")
|
|
|
+ private String bucket;
|
|
|
+ @Value("${queue.application.laser.cloud-point-build}")
|
|
|
+ private String cloudPointBuild;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public void cloudPointBuild(String sceneCode, String path) {
|
|
|
+ log.info("开始同步点云编辑文件");
|
|
|
+ // 删除旧的文件及目录
|
|
|
+ try {
|
|
|
+ fYunFileService.deleteFile(cloudPointFyunPath + "vision_edit.txt");
|
|
|
+ fYunFileService.deleteFolder(cloudPointFyunPath + "uuidcloud");
|
|
|
+ } catch (IOException e) {
|
|
|
+ log.error("删除文件失败", e);
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ // 上传点云编辑文件,并通知激光系统
|
|
|
+ fYunFileService.uploadFile(bucket,path + "/results/laserData/vision_edit.txt", String.format(cloudPointFyunPath,sceneCode,sceneCode) + "vision_edit.txt");
|
|
|
+ fYunFileService.uploadFileByCommand(bucket,path + "/results/laserData/uuidcloud", String.format(cloudPointFyunPath,sceneCode,sceneCode) + "uuidcloud");
|
|
|
+
|
|
|
+ Map<String, Object> params = new HashMap<>();
|
|
|
+ params.put("sceneNum", sceneCode);
|
|
|
+ params.put("businessType", 0);
|
|
|
+ rabbitMqProducer.sendByWorkQueue(cloudPointBuild, params);
|
|
|
+ }
|
|
|
}
|