lyhzzz 3 ماه پیش
والد
کامیت
4052cbfe7d

+ 3 - 0
src/main/java/com/fdkankan/fusion/controller/CaseController.java

@@ -19,6 +19,8 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.Arrays;
+
 /**
  * 案件管理
  */
@@ -50,6 +52,7 @@ public class CaseController extends BaseController{
 
     @PostMapping("/sceneListPost")
     public ResultData sceneListPost(@RequestBody CaseParam param ){
+        param.setTypeList(Arrays.asList(4,6));
         return ResultData.ok(caseService.sceneList(param));
     }
     @PostMapping("/addOrUpdate")

+ 2 - 2
src/main/java/com/fdkankan/fusion/request/CaseParam.java

@@ -3,6 +3,7 @@ package com.fdkankan.fusion.request;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fdkankan.fusion.common.RequestBase;
 import lombok.Data;
+import scala.Int;
 
 import java.util.HashMap;
 import java.util.List;
@@ -21,7 +22,6 @@ public class CaseParam extends RequestBase {
     private String latAndLong;
     private Boolean mapShow;
 
-    private Integer isMesh;
-
     private String sceneName;
+    private List<Integer> typeList;
 }

+ 12 - 5
src/main/java/com/fdkankan/fusion/service/impl/CaseServiceImpl.java

@@ -23,6 +23,7 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import javax.lang.model.element.TypeElement;
 import java.time.Period;
 import java.util.*;
 import java.util.stream.Collectors;
@@ -99,7 +100,7 @@ public class CaseServiceImpl extends ServiceImpl<ICaseMapper, CaseEntity> implem
             if(numList ==null || numList.size() <=0 || type ==3){
                 continue;
             }
-            if(param.getIsMesh()!=null && param.getIsMesh() == 1 && NumTypeUtils.isLaser(type)){
+            if(param.getTypeList() != null && !param.getTypeList().contains(type)){
                 continue;
             }
             ScenePram scenePram = new ScenePram();
@@ -108,6 +109,9 @@ public class CaseServiceImpl extends ServiceImpl<ICaseMapper, CaseEntity> implem
             scenePram.setPageSize(99999);
             scenePram.setNumList(param.getTypeMap().get(type));
             scenePram.setShare("1");
+            if(param.getTypeList() != null){
+                scenePram.setStatus(2);
+            }
             scenePram.setSceneName(param.getSceneName());
             PageInfo pageInfo = sceneService.pageList(scenePram);
             List<SceneVo> list1 = (List<SceneVo>) pageInfo.getList();
@@ -129,11 +133,14 @@ public class CaseServiceImpl extends ServiceImpl<ICaseMapper, CaseEntity> implem
             }
         }
         //官网删除的场景,删除对应资源
-        for (Integer type : param.getTypeMap().keySet()) {
-            List<String> dbNumList = listAll.stream().filter(entity -> entity.getType().equals(type)).map(SceneVo::getNum).collect(Collectors.toList());
-            this.deleteNotInScene(param.getTypeMap().get(type), dbNumList,type,param.getCaseId(),listAll);
+        if(param.getTypeList() == null ){
+            for (Integer type : param.getTypeMap().keySet()) {
+                List<String> dbNumList = listAll.stream().filter(entity -> entity.getType().equals(type)).map(SceneVo::getNum).collect(Collectors.toList());
+                this.deleteNotInScene(param.getTypeMap().get(type), dbNumList,type,param.getCaseId(),listAll);
+            }
         }
 
+
         //相机解绑,标注,测量隐藏,视图
         for (SceneVo sceneVo : listAll) {
             if(!sceneVo.getBind() || (sceneVo.getStatus()!=null && sceneVo.getStatus() == 3)){
@@ -145,7 +152,7 @@ public class CaseServiceImpl extends ServiceImpl<ICaseMapper, CaseEntity> implem
         listAll.removeIf(sceneVo -> !sceneVo.getBind());
 
         //关联的三维模型
-        if(param.getIsMesh() == null ){
+        if(param.getTypeList() == null ){
             List<String> numList = param.getTypeMap().get(3);
             if(numList!=null && numList.size() >0){
                 List<Model> models = modelService.getListByModelIdStrs(numList);