dengsixing 1 jaar geleden
bovenliggende
commit
7daf0aee7a
1 gewijzigde bestanden met toevoegingen van 11 en 6 verwijderingen
  1. 11 6
      src/main/java/com/fdkankan/contro/mq/service/impl/BuildSceneServiceImpl.java

+ 11 - 6
src/main/java/com/fdkankan/contro/mq/service/impl/BuildSceneServiceImpl.java

@@ -301,9 +301,15 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
             fYunFileService.uploadFile(path + File.separator + "console.log", buildLogPath + "console.log");
             log.info("计算日志上传完成");
 
-            OrigFileUploadBatch condition = new OrigFileUploadBatch();
-            condition.setBatchId(batchId);
-            OrigFileUploadBatch origFileUploadBatch = origFileUploadBatchService.getByCondition(condition);
+            JSONObject fdageData = getFdageData(path + File.separator + "capture" +File.separator+"data.fdage");
+            String uuid = fdageData.getString("creator") + "_" + fdageData.getString("uuidtime");
+
+            OrigFileUploadBatch origFileUploadBatch = null;
+            if(StrUtil.isNotEmpty(batchId)){
+                OrigFileUploadBatch condition = new OrigFileUploadBatch();
+                condition.setBatchId(batchId);
+                origFileUploadBatch = origFileUploadBatchService.getByCondition(condition);
+            }
 
             if (!message.getBuildSuccess()) {
                 log.error("建模失败,修改状态为失败状态");
@@ -313,14 +319,13 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
                 redisUtil.set(String.format(RedisKey.SCENE_BUILD_FINISH_NUM, sceneCode), "-1");
 
                 try {
-                    commonService.sendSceneStatus(sceneCode, origFileUploadBatch.getUuid(), batchId, 4);
+                    commonService.sendSceneStatus(sceneCode, uuid, batchId, 4);
                 }catch (Exception e){
                     log.info("通知计算失败状态失败, num:{}", sceneCode, e);
                 }
 
                 return;
             }
-            JSONObject fdageData = getFdageData(path + File.separator + "capture" +File.separator+"data.fdage");
 
             ScenePlus scenePlus = scenePlusService.getScenePlusByNum(sceneCode);
 
@@ -452,7 +457,7 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
             redisUtil.set(String.format(RedisKey.SCENE_BUILD_FINISH_NUM, sceneCode), "1");
 
             try {
-                commonService.sendSceneStatus(sceneCode, origFileUploadBatch.getUuid(), batchId, 4);
+                commonService.sendSceneStatus(sceneCode, uuid, batchId, 4);
             }catch (Exception e){
                 log.info("通知计算成功状态失败, num:{}", sceneCode, e);
             }