|
@@ -88,9 +88,9 @@ public class BuildReverseE57SceneServiceImpl implements IBuildSceneService {
|
|
|
@Override
|
|
|
public void buildScenePre(BuildSceneCallMessage message) throws Exception{
|
|
|
String num = message.getSceneNum();
|
|
|
+ ScenePlus scenePlus = scenePlusService.getScenePlusByNum(num);
|
|
|
+ ScenePlusExt scenePlusExt = scenePlusExtService.getScenePlusExtByPlusId(scenePlus.getId());
|
|
|
try {
|
|
|
- ScenePlus scenePlus = scenePlusService.getScenePlusByNum(num);
|
|
|
- ScenePlusExt scenePlusExt = scenePlusExtService.getScenePlusExtByPlusId(scenePlus.getId());
|
|
|
String dataSource = scenePlusExt.getDataSource();
|
|
|
message.setPath(dataSource);
|
|
|
|
|
@@ -109,6 +109,9 @@ public class BuildReverseE57SceneServiceImpl implements IBuildSceneService {
|
|
|
|
|
|
}catch (Exception e){
|
|
|
log.error("上传e57计算前置处理出错,num"+num, e);
|
|
|
+ scenePlus.setSceneStatus(CommonSuccessStatus.FAIL.code());
|
|
|
+ scenePlusService.updateById(scenePlus);
|
|
|
+ fdkkLaserService.sendE57ToLaser(scenePlus, scenePlusExt, null);
|
|
|
buildSceneDTService.handBaseFail("上传e57计算资源准备异常!", message.getPath(), message.getSceneNum(), "计算控制服务器");
|
|
|
throw e;
|
|
|
}
|
|
@@ -134,6 +137,8 @@ public class BuildReverseE57SceneServiceImpl implements IBuildSceneService {
|
|
|
public void buildScenePost(BuildSceneResultMqMessage message) throws Exception {
|
|
|
String sceneCode = message.getBuildContext().get("sceneNum").toString();
|
|
|
String path = message.getPath();
|
|
|
+ ScenePlus scenePlus = scenePlusService.getScenePlusByNum(sceneCode);
|
|
|
+ ScenePlusExt scenePlusExt = scenePlusExtService.getScenePlusExtByPlusId(scenePlus.getId());
|
|
|
try {
|
|
|
// 上传计算日志
|
|
|
//如果是重复计算,没有走到计算逻辑,不需要上传日志文件
|
|
@@ -143,17 +148,16 @@ public class BuildReverseE57SceneServiceImpl implements IBuildSceneService {
|
|
|
log.info("计算日志上传完成");
|
|
|
|
|
|
if (!message.getBuildSuccess()) {
|
|
|
- scenePlusService.update(new LambdaUpdateWrapper<ScenePlus>()
|
|
|
- .set(ScenePlus::getSceneStatus, SceneStatus.FAILD.code())
|
|
|
- .eq(ScenePlus::getNum, sceneCode));
|
|
|
+ log.error("建模失败,修改状态为失败状态");
|
|
|
+ scenePlus.setSceneStatus(CommonSuccessStatus.FAIL.code());
|
|
|
+ scenePlusService.updateById(scenePlus);
|
|
|
+ fdkkLaserService.sendE57ToLaser(scenePlus, scenePlusExt, null);
|
|
|
|
|
|
// 发送钉钉消息,计算失败
|
|
|
buildSceneDTService.handModelFail("计算失败", message.getPath(), sceneCode, message.getHostName());
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- ScenePlus scenePlus = scenePlusService.getScenePlusByNum(sceneCode);
|
|
|
-
|
|
|
JSONObject fdageData = new JSONObject();
|
|
|
fdageData.put("exportMeshObj", 1);
|
|
|
Map<String, String> uploadFiles = commonService.getUploadFiles(scenePlus,path,14,fdageData);
|
|
@@ -171,7 +175,6 @@ public class BuildReverseE57SceneServiceImpl implements IBuildSceneService {
|
|
|
//读取计算结果文件生成videosJson
|
|
|
JSONObject videosJson = null;
|
|
|
|
|
|
- ScenePlusExt scenePlusExt = scenePlusExtService.getScenePlusExtByPlusId(scenePlus.getId());
|
|
|
boolean isObj = fdageData.containsKey("exportMeshObj") && fdageData.getIntValue("exportMeshObj") == 1;
|
|
|
|
|
|
//上传全景图俯视图
|
|
@@ -260,6 +263,9 @@ public class BuildReverseE57SceneServiceImpl implements IBuildSceneService {
|
|
|
|
|
|
}catch (Exception e){
|
|
|
log.error("场景计算结果处理出错,num"+sceneCode, e);
|
|
|
+ scenePlus.setSceneStatus(CommonSuccessStatus.FAIL.code());
|
|
|
+ scenePlusService.updateById(scenePlus);
|
|
|
+ fdkkLaserService.sendE57ToLaser(scenePlus, scenePlusExt, null);
|
|
|
buildSceneDTService.handBaseFail("场景计算结果处理出错!", message.getPath(), sceneCode, "计算控制服务器");
|
|
|
throw e;
|
|
|
}
|