Преглед на файлове

计算流程优化改造

dengsixing преди 2 месеца
родител
ревизия
6ffe9a94cf
променени са 1 файла, в които са добавени 9 реда и са изтрити 6 реда
  1. 9 6
      src/main/java/com/fdkankan/contro/service/impl/SceneFileBuildServiceImpl.java

+ 9 - 6
src/main/java/com/fdkankan/contro/service/impl/SceneFileBuildServiceImpl.java

@@ -397,7 +397,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
         ResultData post = myClient.post(cameraInStoreUrl, cameraInStoreParams);
         log.info("---------cameraInStore result:{}-----------", post);
 
-        JSONObject configJson = JSONObject.parseObject(fYunFileService.getFileContent(ConstantFilePath.OSS_PREFIX + prefix + "config.fdage"));
+        JSONObject configJson = JSONObject.parseObject(fYunFileService.getFileContent(ConstantFilePath.OSS_PREFIX + prefix + "config.json"));
         String folderName = configJson.getString("id");
         String customUserId = configJson.getString("customUserId");
         String customUserName = configJson.getString("customUserName");
@@ -485,16 +485,16 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
             log.info("上传icon成功....");
         }
 
-        return buildScenePost(dataSource, jsonObject, buildType, cameraType, sceneNum, camera, cameraDetail, rebuild,icon);
+        return buildScenePost(dataSource, jsonObject, buildType, cameraType, sceneNum, camera, cameraDetail, rebuild,icon, user);
     }
 
     private ScenePlusVO buildScenePost(String dataSource, JSONObject jsonObject, String buildType, long cameraType,
-                                       String sceneNum, Camera camera, CameraDetail cameraDetail, int rebuild,String icon) throws Exception {
+                                       String sceneNum, Camera camera, CameraDetail cameraDetail, int rebuild,String icon, User user) throws Exception {
         String imgViewPath = String.format(UploadFilePath.IMG_VIEW_PATH, sceneNum);
 
         String userName = null;
         if (!ObjectUtils.isEmpty(cameraDetail.getUserId())) {
-            SSOUser user = userService.getSSOUserByUserId(cameraDetail.getUserId());
+//            SSOUser user = userService.getSSOUserByUserId(cameraDetail.getUserId());
             userName = ObjectUtils.isEmpty(user) ? null : user.getUserName();
         }
 
@@ -521,7 +521,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
         String unicode = jsonObject.getString("creator") + "_" + jsonObject.getString("uuidtime");
 
         ScenePlusVO scenePlusVO = this.createScenePlus(sceneNum, camera.getId(), camera.getChildName(), jsonObject.getString("creator"),
-                jsonObject.getString("pwd"), unicode,cameraType,jsonObject.getJSONObject("cam").getIntValue("type"), dataSource, icon,  cameraDetail.getUserId(), userName,algorithm,jsonObject.getInteger("location"),
+                jsonObject.getString("pwd"), unicode,cameraType,jsonObject.getJSONObject("cam").getIntValue("type"), dataSource, icon,  user.getId(), userName,algorithm,jsonObject.getInteger("location"),
                 jsonObject.getJSONArray("points").size(), jsonObject.getString("name"), jsonObject.getString("info"),
                 jsonObject.getInteger("scenetype"), jsonObject.getString("gps"), rebuild,
                 jsonObject.getInteger("resolution"), firmwareVersion.toString(), sceneUrl, buildType, cameraDetail.getCooperationUser());
@@ -548,7 +548,6 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
             }
         }
         mqMessage.getExt().put("deleteExtras", true);
-        rabbitMqProducer.sendByWorkQueue(queueModelingPre, mqMessage);
         if(jsonObject.getIntValue("location") == 7){
             //发送到全景看看进行初始化
             intermitSceneService.sendMq(scenePlusVO.getNum(), jsonObject, CommonSuccessStatus.WAITING.code());
@@ -743,6 +742,10 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
                 cameraType = 11L;
             }
         }
+        int camType = fdageJson.getJSONObject("cam").getIntValue("type");
+        if(camType == 5){
+            cameraType = 6L;
+        }
 
         this.removeUpdateV4(ConstantFilePath.OSS_PREFIX + prefixBuffer + "data.fdage", fdageJson);