lyhzzz 2 månader sedan
förälder
incheckning
8a70f81977

+ 4 - 10
src/main/java/com/fdkankan/fusion/common/util/CaseNumTypeUtil.java

@@ -29,22 +29,16 @@ public class CaseNumTypeUtil {
         return SceneTypeUtil.getTypeBySceneSource(one.getSceneSource(),numType);
     }
 
-    //0 四维看看,1看见场景,2 深时场景,3 三维模型,4深时obj ,5深光点云,6深光obj,7第三方相机
-    public static Integer getType(Integer numType){
-        if(numType == 2 || numType == 5){
-            return 0;
-        }
-        return 1;
-    }
+    //0 四维看看,1看见场景,2 深时场景,3 三维模型,4深时obj ,5深光点云,6深光obj,7第三方相机 ,57 e57 ,58 e57
 
     public static List<Integer> getNumType(Integer type){
         if(type == 0){
-            return Arrays.asList(2,5);
+            return Arrays.asList(2,5,57);
         }
-        return Arrays.asList(0,1,4,6,7);
+        return Arrays.asList(0,1,4,6,7,58);
     }
 
     public static List<Integer> getNumType(){
-        return Arrays.asList(0,1,2,4,5,6,7);
+        return Arrays.asList(0,1,2,4,5,6,7,57,58);
     }
 }

+ 3 - 42
src/main/java/com/fdkankan/fusion/common/util/SceneTypeUtil.java

@@ -6,18 +6,6 @@ import java.util.List;
 public class SceneTypeUtil {
 
 
-    public static Integer getSceneSource(Integer type){
-        switch (type){
-            case 0: return 1;
-            case 1: return 3;
-            case 2: return 4;
-            case 4: return 4;
-            case 5: return 5;
-            case 6: return 5;
-            default:return 1;
-        }
-    }
-
     /**
      * @param numType  //0点云,1mesh
      */
@@ -26,6 +14,7 @@ public class SceneTypeUtil {
             case 3: return 1;
             case 4: return numType ==0 ?2 :4;
             case 5: return numType ==0 ?5 :6;
+            case 57: return numType ==0 ?57 :58;
             default:return 0;
         }
     }
@@ -41,38 +30,10 @@ public class SceneTypeUtil {
             case 4: return false;
             case 5: return true;
             case 6: return false;
+            case 57: return true;
+            case 58: return false;
             default:return false;
         }
     }
 
-    public static Boolean isLaserMesh(Integer type){
-        switch (type){
-            case 0: return false;
-            case 1: return false;
-            case 2: return false;
-            case 4: return true;
-            case 5: return false;
-            case 6: return true;
-            default:return false;
-        }
-    }
-
-    public static List<Integer> getSceneSourceList(Integer isObj) {
-        if(isObj == 0){
-            return Arrays.asList(4,5);
-        }
-        return Arrays.asList(1,3,4,5);
-    }
-
-    public static Boolean isLaserBySceneSource(Integer sceneSource) {
-        if(sceneSource == null){
-            return false;
-        }
-        switch (sceneSource){
-            case 4: return true;
-            case 5: return true;
-            case 6: return false;
-            default:return false;
-        }
-    }
 }

+ 2 - 1
src/main/java/com/fdkankan/fusion/controller/SceneController.java

@@ -4,6 +4,7 @@ import cn.hutool.core.io.FileUtil;
 import com.fdkankan.fusion.common.FilePath;
 import com.fdkankan.fusion.common.ResultCode;
 import com.fdkankan.fusion.common.ResultData;
+import com.fdkankan.fusion.common.util.SceneTypeUtil;
 import com.fdkankan.fusion.common.util.UploadToOssUtil;
 import com.fdkankan.fusion.exception.BusinessException;
 import com.fdkankan.fusion.httpClient.request.LaserSceneParam;
@@ -86,7 +87,7 @@ public class SceneController extends BaseController{
             Long size = null;
             String sceneObjPath =null;
 
-            if(type == 2 || type == 5){  //点云
+            if(SceneTypeUtil.isLaser(type)){  //点云
                 sceneObjPath = String.format(FilePath.LASER_OSS_PATH, num,num)+"/cloud.js" ;
                 fileInfo = uploadToOssUtil.getFileInfo(sceneObjPath);
                 String scenePath = String.format(FilePath.LASER_OSS_PATH, num,num);

+ 2 - 1
src/main/java/com/fdkankan/fusion/down/CaseDownService.java

@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.deepoove.poi.XWPFTemplate;
 import com.fdkankan.fusion.common.FilePath;
 import com.fdkankan.fusion.common.ResultData;
+import com.fdkankan.fusion.common.util.SceneTypeUtil;
 import com.fdkankan.fusion.common.util.ShellUtil;
 import com.fdkankan.fusion.common.util.UploadToOssUtil;
 import com.fdkankan.fusion.entity.*;
@@ -238,7 +239,7 @@ public class CaseDownService {
                 //下载场景离线包
                 downSwkk(caseId,sceneData.getNum(),sceneData.getType());
             }
-            if(sceneData.getType() == 2 || sceneData.getType() == 5){
+            if(SceneTypeUtil.isLaser(sceneData.getType())){
                 FdkkResponse sceneInfo = laserService.getSceneInfo(sceneData.getNum());
                 HashSet<String> dataSetIds = new HashSet<>();
                 if(sceneInfo != null){

+ 1 - 1
src/main/java/com/fdkankan/fusion/service/impl/CaseNumServiceImpl.java

@@ -125,7 +125,7 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
                 model.setType(type);
                 model.setModelType("pointcloud");    //深时点云类型
                 model.setCreateStatus(1);
-                if(type == 0 || type == 1 || type == 4 || type == 6 || type == 7){           //看看,看见
+                if(!SceneTypeUtil.isLaser(type)){           //看看,看见
                     String mesh3DtilesPath  = String.format(FilePath.OBJ_OSS_PATH,num) + "/images/3dtiles/tileset.json";
                     String sizePath = String.format(FilePath.OBJ_OSS_PATH,num) + "/images/3dtiles";
                     if(fYunFileServiceInterface.fileExist(mesh3DtilesPath)){