lyhzzz hai 8 meses
pai
achega
3c51dc188f

+ 4 - 7
src/main/java/com/fdkankan/manage/service/impl/CaseServiceImpl.java

@@ -100,21 +100,18 @@ public class CaseServiceImpl extends ServiceImpl<ICaseMapper, Case> implements I
         caseEntity.setUpdateTime(null);
         this.saveOrUpdate(caseEntity);
 
-        if(param.getSceneNumParam().isEmpty()){
-            caseNumService.delByCaseId(caseEntity.getCaseId());
-            return;
-        }
         HashMap<Integer,HashSet<String>> numTypeMap = new HashMap<>();
+        for (Integer type : CaseNumTypeUtil.getNumType()) {
+            numTypeMap.put(type,new HashSet<>());
+        }
+
         for (CaseNumType caseNumType : param.getSceneNumParam()) {
             List<Integer> numType = CaseNumTypeUtil.getNumType(caseNumType.getType());
-
             for (Integer type : numType) {
                 List<String> numList = caseNumType.getNumList().stream().filter(e ->StringUtils.isNotBlank(e) && CaseNumTypeUtil.getCaseNumType(e, caseNumType.getType()) != null
                         && CaseNumTypeUtil.getCaseNumType(e, caseNumType.getType()).equals(type)).collect(Collectors.toList());
                 if(numTypeMap.get(type) != null){
                     numTypeMap.get(type).addAll(numList);
-                }else {
-                    numTypeMap.put(type,new HashSet<>(numList));
                 }
             }
         }

+ 11 - 2
src/main/java/com/fdkankan/manage/service/impl/CommonServiceImpl.java

@@ -154,7 +154,7 @@ public class CommonServiceImpl implements ICommonService {
         switch (modelFileFormat){
             case "obj" :  resultFormat = "glb";
                           url = uploadObjOss(unzipPath,modelFile);break;
-            case "laz" :
+            case "laz" :    url = uploadLazOss(unzipPath,modelFile); break;
             case "shp" :   url = uploadOss(unzipPath,modelFile); break;
             case "b3dm" :  url = uploadB3dm(unzipPath,modelFile); break;
             case "las" :
@@ -209,7 +209,16 @@ public class CommonServiceImpl implements ICommonService {
         rabbitMqProducer.sendByWorkQueue("queue-model-osgbToB3dm",map);
     }
 
-
+    private String uploadLazOss(String unzipPath,File modelFile) {
+        String ossPath = unzipPath.replace(OssPath.localPath,"");
+        String modelOssPath = modelFile.getPath().replace(OssPath.localPath, "");
+        ShellUtil.yunUpload(unzipPath,ossPath);
+        if(!fYunFileServiceInterface.fileExist(modelOssPath)){
+            throw new BusinessException(ResultCode.UPLOAD_FILE_ERROR);
+        }
+        FileUtil.del(unzipPath);
+        return ossUrlPrefix +  ossPath;
+    }
 
     private String uploadOss(String unzipPath,File modelFile) {
         String ossPath = unzipPath.replace(OssPath.localPath,"");

+ 2 - 0
src/main/java/com/fdkankan/manage/service/impl/SceneProServiceImpl.java

@@ -586,6 +586,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         wrapper.eq(ScenePlus::getId,scenePlus.getId());
         wrapper.set(ScenePlus::getUserId,jyUser.getUserId());
         scenePlusService.update(wrapper);
+        jySceneAuthService.delByNumList(Arrays.asList(scenePlus.getNum()));
+
         jyMoveSceneLogService.saveLog(scenePlus.getNum(),scenePlus.getUserId(),jyUser.getUserId(),Long.valueOf(StpUtil.getLoginId().toString()));
 
         laserService.updateSceneUser(new LaserUpdateUserVo(scenePlus.getUserId(),jyUser.getRyNo(),jyUser.getUserId(),scenePlus.getNum()));

+ 4 - 0
src/main/java/com/fdkankan/manage/util/CaseNumTypeUtil.java

@@ -35,4 +35,8 @@ public class CaseNumTypeUtil {
         }
         return Arrays.asList(0,1,4,6,7);
     }
+
+    public static List<Integer> getNumType(){
+        return Arrays.asList(0,1,2,4,5,6,7);
+    }
 }