123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- package com.fdkankan.scene.service.impl;
- import com.fdkankan.fyun.face.FYunFileServiceInterface;
- import com.fdkankan.rabbitmq.util.RabbitMqProducer;
- import com.fdkankan.scene.service.ILaserService;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.beans.factory.annotation.Value;
- import org.springframework.stereotype.Service;
- import java.util.HashMap;
- import java.util.Map;
- @Service
- @Slf4j
- public class LaserServiceImpl implements ILaserService {
- @Autowired
- RabbitMqProducer rabbitMqProducer;
- @Autowired
- private FYunFileServiceInterface fYunFileService;
- @Value("${4dkk.laserService.cloud-point-fyun-path:testdata/%s/data/bundle_%s/building/}")
- private String cloudPointFyunPath;
- @Value("${4dkk.laserService.bucket:laser-data}")
- private String bucket;
- @Value("${queue.application.laser.cloud-point-build:laser-cloud-point-build}")
- private String cloudPointBuild;
- @Value("${queue.application.laser.copy-scene:laser-copy-scene}")
- private String laserCopyScene;
- @Override
- public void copy(String oldNum, String newNum, String path, Boolean flag) {
- Map<String,Object> params = new HashMap<>();
- params.put("sceneCode", newNum);
- params.put("oldSceneCode", oldNum);
- params.put("path",path);
- params.put("init",flag);
- rabbitMqProducer.sendByWorkQueue(laserCopyScene,params);
- }
- @Override
- 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);
- }
- }
|