Browse Source

修改V3计算逻辑

tianboguang 2 năm trước cách đây
mục cha
commit
22f756e58e

+ 1 - 31
src/main/java/com/fdkankan/contro/mq/service/impl/BuildV3SceneServiceImpl.java

@@ -184,12 +184,6 @@ public class BuildV3SceneServiceImpl implements IBuildSceneService {
             //计算场景消耗磁盘空间
             long space = this.calUseSpace(uploadFiles);
 
-            if(cameraType < 3){
-                this.updateDb4Sm(sceneCode, space);
-                fYunFileService.uploadMulFiles(uploadFiles);
-                return;
-            }
-
             //读取计算结果文件生成videosJson
             JSONObject videosJson = this.getVideosJson(path, videoVersion, sceneCode, cameraType);
 
@@ -202,7 +196,7 @@ public class BuildV3SceneServiceImpl implements IBuildSceneService {
                 scenePro.setPayStatus(this.getPayStatus(scenePro.getCameraId(), space));
                 sceneProService.update(
                         new LambdaUpdateWrapper<ScenePro>()
-                                .set(ScenePro::getPayStatus, PayStatus.NO_CAPACITY.code())
+                                .set(ScenePro::getPayStatus, scenePro.getPayStatus())
                                 .eq(ScenePro::getId, scenePro.getId()));
             }
 
@@ -308,8 +302,6 @@ public class BuildV3SceneServiceImpl implements IBuildSceneService {
             } else if (fileJson.getIntValue("clazz") == 7) {
                 map.put(filePath, imagesPath + fileName);
             } else if (fileJson.getIntValue("clazz") == 10) {
-                String updown = FileUtils.readFile(filePath);
-                JSONObject updownJson = JSONObject.parseObject(updown);
                 String mappingOssPath = String.format("scene_edit_data/%s/data/", projectNum) + fileName.replace("updown", "mapping");
                 map.put(filePath, mappingOssPath);
             } else {
@@ -439,24 +431,6 @@ public class BuildV3SceneServiceImpl implements IBuildSceneService {
         }
     }
 
-    private void copyToEditDir(String num) throws IOException {
-
-        String editImagesPath = String.format(UploadFilePath.IMG_EDIT_PATH, num);
-        String viewImagesPath = String.format(UploadFilePath.IMG_VIEW_PATH, num);
-
-        String editDataPath = String.format(UploadFilePath.DATA_EDIT_PATH, num);
-        String viewDataPath = String.format(UploadFilePath.DATA_VIEW_PATH, num);
-
-        Map<String, String> map = new HashMap<>();
-        map.put(editImagesPath + "vision.modeldata", viewImagesPath + "vision.modeldata");
-        map.put(editImagesPath + "vision2.modeldata", viewImagesPath + "vision2.modeldata");
-        map.put(editDataPath + "floorplan_cad.json", viewDataPath + "floorplan_cad.json");
-
-        for (Entry<String, String> entry : map.entrySet()) {
-                fYunFileService.copyFileInBucket(entry.getValue(), entry.getKey());
-        }
-    }
-
     private JSONObject getVideosJson(String path, Integer videoVersion, String projectNum, int cameraType) throws Exception {
         //读取videos_hdr_param.json, 保存点位视频的value
         Map<String, Object> videoMap = new HashMap<>();
@@ -544,10 +518,6 @@ public class BuildV3SceneServiceImpl implements IBuildSceneService {
         return uploadFile.keySet().stream().map(File::new).filter(File::exists).mapToLong(File::length).sum();
     }
 
-    private void sealScene(boolean arrearCap, Long scenePlusId, Long sceneProId){
-
-    }
-
     /**
      * <p>
      双目场景更新数据库