|
@@ -1586,18 +1586,18 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
jsonObject.getInteger("scenetype"), jsonObject.getString("gps"), rebuild,
|
|
jsonObject.getInteger("scenetype"), jsonObject.getString("gps"), rebuild,
|
|
jsonObject.getInteger("resolution"), firmwareVersion.toString(), sceneUrl, buildType, cameraDetail.getCooperationUser());
|
|
jsonObject.getInteger("resolution"), firmwareVersion.toString(), sceneUrl, buildType, cameraDetail.getCooperationUser());
|
|
|
|
|
|
- if (Objects.nonNull(scenePlusVO)) {
|
|
|
|
- JSONObject statusJson = new JSONObject();
|
|
|
|
- //临时将-2改成1,app还没完全更新
|
|
|
|
- statusJson.put("status", scenePlusVO.getSceneStatus() == -2 ? 1 : scenePlusVO.getSceneStatus());
|
|
|
|
- statusJson.put("webSite", scenePlusVO.getWebSite());
|
|
|
|
- statusJson.put("sceneNum", scenePlusVO.getNum());
|
|
|
|
- statusJson.put("thumb", scenePlusVO.getThumb());
|
|
|
|
- statusJson.put("payStatus", 0);
|
|
|
|
- statusJson.put("recStatus", 'A');
|
|
|
|
- FileUtils.writeFile(localDataPath + "status.json", statusJson.toString());
|
|
|
|
- fYunFileService.uploadFile(localDataPath + "status.json", dataViewPath + "status.json");
|
|
|
|
- }
|
|
|
|
|
|
+// if (Objects.nonNull(scenePlusVO)) {
|
|
|
|
+// JSONObject statusJson = new JSONObject();
|
|
|
|
+// //临时将-2改成1,app还没完全更新
|
|
|
|
+// statusJson.put("status", scenePlusVO.getSceneStatus() == -2 ? 1 : scenePlusVO.getSceneStatus());
|
|
|
|
+// statusJson.put("webSite", scenePlusVO.getWebSite());
|
|
|
|
+// statusJson.put("sceneNum", scenePlusVO.getNum());
|
|
|
|
+// statusJson.put("thumb", scenePlusVO.getThumb());
|
|
|
|
+// statusJson.put("payStatus", 0);
|
|
|
|
+// statusJson.put("recStatus", 'A');
|
|
|
|
+// FileUtils.writeFile(localDataPath + "status.json", statusJson.toString());
|
|
|
|
+// fYunFileService.uploadFile(localDataPath + "status.json", dataViewPath + "status.json");
|
|
|
|
+// }
|
|
|
|
|
|
BuildSceneCallMessage mqMessage = getBuildSceneMqMessage(sceneNum, cameraType, algorithm, jsonObject, buildType,
|
|
BuildSceneCallMessage mqMessage = getBuildSceneMqMessage(sceneNum, cameraType, algorithm, jsonObject, buildType,
|
|
scenePlusVO.getDataSource());
|
|
scenePlusVO.getDataSource());
|
|
@@ -1613,11 +1613,16 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
mqMessage.getExt().put("gps", jsonObject.getString("gps"));
|
|
mqMessage.getExt().put("gps", jsonObject.getString("gps"));
|
|
|
|
|
|
if(uploadType.equals("single")){//场景上传模式(single-细小文件上传, zip-压缩包上传)
|
|
if(uploadType.equals("single")){//场景上传模式(single-细小文件上传, zip-压缩包上传)
|
|
- //修改场景上传批次为进入计算
|
|
|
|
- OrigFileUploadBatch origFileUploadBatch = origFileUploadBatchService.getWaitingBatchByUuid(unicode);
|
|
|
|
|
|
+ OrigFileUploadBatch condition = new OrigFileUploadBatch();
|
|
|
|
+ condition.setUuid(unicode);
|
|
|
|
+ condition.setStatus(0);
|
|
|
|
+ OrigFileUploadBatch origFileUploadBatch = origFileUploadBatchService.getByCondition(condition);
|
|
origFileUploadBatch.setStatus(1);
|
|
origFileUploadBatch.setStatus(1);
|
|
- origFileUploadBatchService.updateById(origFileUploadBatch);
|
|
|
|
|
|
+ origFileUploadBatch.setMqContent(JSON.toJSONString(mqMessage));
|
|
|
|
+ origFileUploadBatch.setNoticeTimes(origFileUploadBatch.getNoticeTimes() + 1);
|
|
mqMessage.getExt().put("batchId", origFileUploadBatch.getBatchId());
|
|
mqMessage.getExt().put("batchId", origFileUploadBatch.getBatchId());
|
|
|
|
+ mqMessage.getExt().put("noticeTimes", origFileUploadBatch.getNoticeTimes());
|
|
|
|
+ origFileUploadBatchService.updateById(origFileUploadBatch);
|
|
}
|
|
}
|
|
rabbitMqProducer.sendByWorkQueue(queueModelingPre, mqMessage);
|
|
rabbitMqProducer.sendByWorkQueue(queueModelingPre, mqMessage);
|
|
|
|
|
|
@@ -2248,7 +2253,10 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
}
|
|
}
|
|
|
|
|
|
//查询是否有等待通知计算的上传批次记录,如果有则加入,没有则新增
|
|
//查询是否有等待通知计算的上传批次记录,如果有则加入,没有则新增
|
|
- OrigFileUploadBatch origFileUploadBatch = origFileUploadBatchService.getByCondition(uuid);
|
|
|
|
|
|
+ OrigFileUploadBatch condition = new OrigFileUploadBatch();
|
|
|
|
+ condition.setUuid(uuid);
|
|
|
|
+ condition.setStatus(0);
|
|
|
|
+ OrigFileUploadBatch origFileUploadBatch = origFileUploadBatchService.getByCondition(condition);
|
|
if(Objects.isNull(origFileUploadBatch)){
|
|
if(Objects.isNull(origFileUploadBatch)){
|
|
origFileUploadBatch = new OrigFileUploadBatch();
|
|
origFileUploadBatch = new OrigFileUploadBatch();
|
|
origFileUploadBatch.setUuid(uuid);
|
|
origFileUploadBatch.setUuid(uuid);
|
|
@@ -2280,7 +2288,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public ResultData noticeBuild(String uuid, boolean init) throws Exception {
|
|
|
|
|
|
+ public ResultData noticeBuild(String uuid) throws Exception {
|
|
log.info("通知计算,uuid:{} " + uuid);
|
|
log.info("通知计算,uuid:{} " + uuid);
|
|
|
|
|
|
String[] uuidArr = uuid.split("_");
|
|
String[] uuidArr = uuid.split("_");
|
|
@@ -2347,12 +2355,11 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
sceneNum = scenePlus.getNum();
|
|
sceneNum = scenePlus.getNum();
|
|
}else{
|
|
}else{
|
|
sceneNum = scene3dNumService.generateSceneNum(cameraDetail.getType());
|
|
sceneNum = scene3dNumService.generateSceneNum(cameraDetail.getType());
|
|
- init = true;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- if(init){
|
|
|
|
|
|
+ //查询是否有已发送计算的批次,如果有,就不需要在发送了
|
|
|
|
|
|
- JSONObject fdageData = JSONObject.parseObject(FileUtils.readFile(sendCallAlgorithmPath.concat(uuid).concat("/data.fdage")));
|
|
|
|
|
|
+ JSONObject fdageData = JSONObject.parseObject(FileUtils.readFile(sendCallAlgorithmPath.concat(uuid).concat("/data.fdage")));
|
|
// String imgViewPath = String.format(UploadFilePath.IMG_VIEW_PATH, sceneNum);
|
|
// String imgViewPath = String.format(UploadFilePath.IMG_VIEW_PATH, sceneNum);
|
|
// if(fdageData.containsKey("icon") && StringUtils.isNotEmpty(fdageData.getString("icon"))){
|
|
// if(fdageData.containsKey("icon") && StringUtils.isNotEmpty(fdageData.getString("icon"))){
|
|
// String ossPath = ConstantFilePath.OSS_PREFIX + dataSource.replace(ConstantFilePath.BUILD_MODEL_PATH, "")
|
|
// String ossPath = ConstantFilePath.OSS_PREFIX + dataSource.replace(ConstantFilePath.BUILD_MODEL_PATH, "")
|
|
@@ -2361,11 +2368,10 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
// icon = fYunFileConfig.getHost() + imgViewPath + fdageData.getString("icon");
|
|
// icon = fYunFileConfig.getHost() + imgViewPath + fdageData.getString("icon");
|
|
// log.info("上传icon成功....");
|
|
// log.info("上传icon成功....");
|
|
// }
|
|
// }
|
|
- buildScenePost(dataSource, fdageData, "V3", cameraType, sceneNum, camera, cameraDetail, rebuild, "", user, customUserId, "single");
|
|
|
|
|
|
+ buildScenePost(dataSource, fdageData, "V3", cameraType, sceneNum, camera, cameraDetail, rebuild, "", user, customUserId, "single");
|
|
|
|
|
|
- scenePlus = scenePlusService.getScenePlusByNum(sceneNum);
|
|
|
|
- fdkkLaserService.saveScene(scenePlus,fdageData,camera,user.getUserName(),rebuild == 1 ? true : false);
|
|
|
|
- }
|
|
|
|
|
|
+ scenePlus = scenePlusService.getScenePlusByNum(sceneNum);
|
|
|
|
+ fdkkLaserService.saveScene(scenePlus,fdageData,camera,user.getUserName(),rebuild == 1 ? true : false);
|
|
|
|
|
|
return ResultData.ok();
|
|
return ResultData.ok();
|
|
}
|
|
}
|