|
@@ -1,5 +1,6 @@
|
|
|
package com.fdkankan.contro.mq.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
import cn.hutool.core.io.file.FileNameUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
@@ -75,6 +76,9 @@ public class BuildV3SceneServiceImpl implements IBuildSceneService {
|
|
|
@Value("${env:gn}")
|
|
|
private String env;
|
|
|
|
|
|
+ @Value("#{'${build.scene.post.not-delete-nas-nums:}'.split(',')}")
|
|
|
+ private List<String> notDeleteNasNumList;
|
|
|
+
|
|
|
@Autowired
|
|
|
private ICommonService commonService;
|
|
|
|
|
@@ -222,6 +226,9 @@ public class BuildV3SceneServiceImpl implements IBuildSceneService {
|
|
|
|
|
|
Map<String, String> uploadFiles = getUploadFiles(sceneCode,path,cameraType,fdageData);
|
|
|
|
|
|
+ //上传cache/images
|
|
|
+ this.uploadCacheImages(sceneCode, path, uploadFiles);
|
|
|
+
|
|
|
copyFiles(path,sceneCode);
|
|
|
|
|
|
//建模成功走以下逻辑
|
|
@@ -311,6 +318,11 @@ public class BuildV3SceneServiceImpl implements IBuildSceneService {
|
|
|
commonService.sendEmail(sceneCode);
|
|
|
}
|
|
|
|
|
|
+ //删除计算目录
|
|
|
+ if(CollUtil.isEmpty(notDeleteNasNumList) || !notDeleteNasNumList.contains(sceneCode)){
|
|
|
+ CreateObjUtil.deleteFile(path.replace(ConstantFilePath.BUILD_MODEL_PATH, "/"));
|
|
|
+ }
|
|
|
+
|
|
|
}catch (Exception e){
|
|
|
log.error("场景计算结果处理出错,num"+sceneCode, e);
|
|
|
buildSceneDTService.handBaseFail("场景计算结果处理出错!", message.getPath(), sceneCode, "计算控制服务器");
|
|
@@ -318,6 +330,15 @@ public class BuildV3SceneServiceImpl implements IBuildSceneService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void uploadCacheImages(String num, String dataSource, Map<String, String> map){
|
|
|
+ String path = dataSource + "/caches/images/";
|
|
|
+ String[] list = new File(path).list();
|
|
|
+ String ossBasePath = String.format(UploadFilePath.scene_result_data_path, num) + "caches/images/";
|
|
|
+ if(list != null && list.length > 0){
|
|
|
+ Arrays.stream(list).forEach(v->map.put(path + v, ossBasePath + v));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void createQrcode(String num){
|
|
|
ScenePro scenePro = sceneProService.getByNum(num);
|
|
|
String logoPath = null;
|