|
@@ -156,7 +156,6 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
@Override
|
|
@Override
|
|
public void buildScenePre(BuildSceneCallMessage message) throws Exception{
|
|
public void buildScenePre(BuildSceneCallMessage message) throws Exception{
|
|
boolean success = false;
|
|
boolean success = false;
|
|
@@ -408,6 +407,8 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
//上传全景图俯视图
|
|
//上传全景图俯视图
|
|
this.uploadFloorCad(path, sceneCode, uploadFiles);
|
|
this.uploadFloorCad(path, sceneCode, uploadFiles);
|
|
|
|
|
|
|
|
+ this.uploadFreespace(sceneCode, path, uploadFiles);
|
|
|
|
+
|
|
log.info("开始上传场景计算结果数据,num:{}", sceneCode);
|
|
log.info("开始上传场景计算结果数据,num:{}", sceneCode);
|
|
//由于3dtiles算法mesh文件发生变化,所以这里需要先清除一下oss的mesh目录,避免存在旧算法obj文件
|
|
//由于3dtiles算法mesh文件发生变化,所以这里需要先清除一下oss的mesh目录,避免存在旧算法obj文件
|
|
fYunFileService.deleteFolder(String.format(UploadFilePath.DATA_VIEW_PATH, sceneCode) + "mesh");
|
|
fYunFileService.deleteFolder(String.format(UploadFilePath.DATA_VIEW_PATH, sceneCode) + "mesh");
|
|
@@ -525,6 +526,9 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
commonService.sendEmail(sceneCode);
|
|
commonService.sendEmail(sceneCode);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //拜城公安需求
|
|
|
|
+ this.sendMqForBcgn(sceneCode);
|
|
|
|
+
|
|
redisUtil.set(String.format(RedisKey.SCENE_BUILD_FINISH_NUM, sceneCode), "1");
|
|
redisUtil.set(String.format(RedisKey.SCENE_BUILD_FINISH_NUM, sceneCode), "1");
|
|
|
|
|
|
try {
|
|
try {
|
|
@@ -547,23 +551,26 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-// private void cachePanorama(String dataSource, String num){
|
|
|
|
-// String cachedImagesPath = String.format(ConstantFilePath.SCENE_CACHE_IMAGES, num);
|
|
|
|
-// //将全景图缓存到缓存目录
|
|
|
|
-// List<String> imagesList = FileUtil.listFileNames(dataSource + "/caches/images");
|
|
|
|
-// //先清除旧的全景图
|
|
|
|
-// cn.hutool.core.io.FileUtil.del(cachedImagesPath);
|
|
|
|
-// String visionPath = dataSource + "/results/vision.txt";
|
|
|
|
-// List<String> panoramaImageList = SceneUtil.getPanoramaImageList(visionPath);
|
|
|
|
-// imagesList.stream().forEach(fileName -> {
|
|
|
|
-// if (panoramaImageList.contains(fileName)) {
|
|
|
|
-// String srcPath = dataSource + "/caches/images/" + fileName;
|
|
|
|
-// String targetPath = cachedImagesPath + fileName;
|
|
|
|
-// log.info("源文件:{}, 目标文件:{}", srcPath, targetPath);
|
|
|
|
-// cn.hutool.core.io.FileUtil.copy(srcPath, targetPath, true);
|
|
|
|
-// }
|
|
|
|
-// });
|
|
|
|
-// }
|
|
|
|
|
|
+ void uploadFreespace(String num, String path, Map<String, String> map){
|
|
|
|
+ String plyPath = path + "/results/laserData/cover/final_freespace.ply";
|
|
|
|
+ String pngPath = path + "/results/laserData/cover/final_freespace.png";
|
|
|
|
+ String infoJsonPath = path + "/results/laserData/cover/info.json";
|
|
|
|
+ if(FileUtil.exist(plyPath)){
|
|
|
|
+ map.put(plyPath, String.format(UploadFilePath.IMG_VIEW_PATH, num) + "cover/" + FileUtil.getName(plyPath));
|
|
|
|
+ }
|
|
|
|
+ if(FileUtil.exist(pngPath)){
|
|
|
|
+ map.put(pngPath, String.format(UploadFilePath.IMG_VIEW_PATH, num) + "cover/" + FileUtil.getName(pngPath));
|
|
|
|
+ }
|
|
|
|
+ if(FileUtil.exist(infoJsonPath)){
|
|
|
|
+ map.put(infoJsonPath, String.format(UploadFilePath.IMG_VIEW_PATH, num) + "cover/" + FileUtil.getName(infoJsonPath));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private void sendMqForBcgn(String num){
|
|
|
|
+ Map<String, String> map = new HashMap<>();
|
|
|
|
+ map.put("num", num);
|
|
|
|
+ mqProducer.sendByWorkQueue("detect-queue", map);
|
|
|
|
+ }
|
|
|
|
|
|
private Map<String, String> getUploadFiles(ScenePlus scenePlus,String path,Integer cameraType,JSONObject fdageData) throws Exception {
|
|
private Map<String, String> getUploadFiles(ScenePlus scenePlus,String path,Integer cameraType,JSONObject fdageData) throws Exception {
|
|
if (ObjectUtils.isEmpty(scenePlus)) {
|
|
if (ObjectUtils.isEmpty(scenePlus)) {
|