|
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fdkankan.common.constant.ConstantFilePath;
|
|
|
import com.fdkankan.common.constant.ConstantUrl;
|
|
|
+import com.fdkankan.common.constant.UploadFilePath;
|
|
|
import com.fdkankan.common.util.ComputerUtil;
|
|
|
import com.fdkankan.common.util.CreateObjUtil;
|
|
|
import com.fdkankan.common.util.FileUtil;
|
|
@@ -76,7 +77,7 @@ public class BuildSceneMQListener implements RocketMQListener<String> {
|
|
|
private String prefixAli;
|
|
|
|
|
|
@Autowired
|
|
|
- private UploadToOssUtil uploadUtils;
|
|
|
+ private UploadToOssUtil uploadToOssUtil;
|
|
|
|
|
|
@Autowired
|
|
|
RocketMQProducer rocketMQProducer;
|
|
@@ -208,6 +209,10 @@ public class BuildSceneMQListener implements RocketMQListener<String> {
|
|
|
Long sceneProId = message.getSceneProId();
|
|
|
String thumb = message.getThumb();
|
|
|
|
|
|
+ String imgPath = String.format(UploadFilePath.IMG_VIEW_PATH, projectNum); //新版本文件路径
|
|
|
+ String dataPath = String.format(UploadFilePath.DATA_VIEW_PATH, projectNum); //新版本文件路径
|
|
|
+ String videosPath = String.format(UploadFilePath.VIDEOS_VIEW_PATH, projectNum); //新版本文件路径
|
|
|
+
|
|
|
try{
|
|
|
if(StringUtils.equals(message.getIsStandardization(),"1")){
|
|
|
//表示标定算法
|
|
@@ -265,7 +270,7 @@ public class BuildSceneMQListener implements RocketMQListener<String> {
|
|
|
//计算模型并返回需要上传oss的文件集合
|
|
|
map = ComputerUtil.computer(projectNum, path, buildType);
|
|
|
|
|
|
- uploadUtils.uploadMulFiles(map);
|
|
|
+ uploadToOssUtil.uploadMulFiles(map);
|
|
|
log.info("双目上完oss结束修改数据:"+projectNum);
|
|
|
} else {
|
|
|
|
|
@@ -348,18 +353,28 @@ public class BuildSceneMQListener implements RocketMQListener<String> {
|
|
|
map = ComputerUtil.computer(projectNum, path, buildType);
|
|
|
|
|
|
if(Integer.parseInt(cameraType) == 5 || Integer.parseInt(cameraType) == 6){
|
|
|
- map.put(path + File.separator + "capture/stitch_params.txt", "data/data" + projectNum + "/stitch_params.txt");
|
|
|
+ map.put(path + File.separator + "capture/stitch_params.txt",
|
|
|
+ "data/data" + projectNum + "/stitch_params.txt");
|
|
|
+ //todo 待删除old_path
|
|
|
+ map.put(path + File.separator + "capture/stitch_params.txt",
|
|
|
+ dataPath+ "stitch_params.txt");
|
|
|
}
|
|
|
map.put(path + File.separator + "capture/Up.xml", "data/data" + projectNum + "/Up.xml");
|
|
|
map.put(path + File.separator + "capture/Up2.xml", "data/data" + projectNum + "/Up2.xml");
|
|
|
+ //todo 待删除old_path
|
|
|
+ map.put(path + File.separator + "capture/Up.xml", dataPath + "Up.xml");
|
|
|
+ map.put(path + File.separator + "capture/Up2.xml", dataPath + "Up2.xml");
|
|
|
|
|
|
if(Integer.parseInt(cameraType) == 13){
|
|
|
//转台相机
|
|
|
map.put(path + File.separator + "capture/Up.txt", "data/data" + projectNum + "/Up.txt");
|
|
|
map.put(path + File.separator + "capture/Up2.txt", "data/data" + projectNum + "/Up2.txt");
|
|
|
+ //todo 待删除old_path
|
|
|
+ map.put(path + File.separator + "capture/Up.txt", dataPath+ "Up.txt");
|
|
|
+ map.put(path + File.separator + "capture/Up2.txt",dataPath + "Up2.txt");
|
|
|
}
|
|
|
|
|
|
- uploadUtils.uploadMulFiles(map);
|
|
|
+ uploadToOssUtil.uploadMulFiles(map);
|
|
|
payStatus = 1;
|
|
|
|
|
|
File spaceFile = null;
|
|
@@ -633,13 +648,18 @@ public class BuildSceneMQListener implements RocketMQListener<String> {
|
|
|
statusJson.put("thumb", thumb);
|
|
|
statusJson.put("payStatus", payStatus);
|
|
|
FileUtils.writeFile(ConstantFilePath.SCENE_PATH+"data/data"+projectNum+File.separator+"status.json", statusJson.toString());
|
|
|
- uploadUtils.upload(ConstantFilePath.SCENE_PATH+"data/data"+projectNum+File.separator+"status.json",
|
|
|
+ uploadToOssUtil.upload(ConstantFilePath.SCENE_PATH+"data/data"+projectNum+File.separator+"status.json",
|
|
|
"data/data"+projectNum+File.separator+"status.json");
|
|
|
-
|
|
|
//上送日志
|
|
|
- uploadUtils.upload(dataSource+File.separator+"console.log",
|
|
|
+ uploadToOssUtil.upload(dataSource+File.separator+"console.log",
|
|
|
"build_log/"+projectNum+File.separator+"console.log");
|
|
|
|
|
|
+ //todo 待删除old_path
|
|
|
+ uploadToOssUtil.upload(ConstantFilePath.SCENE_PATH+"data/data"+projectNum+File.separator+"status.json",
|
|
|
+ dataPath+"status.json");
|
|
|
+ //上送日志
|
|
|
+ uploadToOssUtil.upload(dataSource+File.separator+"console.log",
|
|
|
+ dataPath+"console.log");
|
|
|
|
|
|
}
|
|
|
}catch (Exception e){
|