Переглянути джерело

Merge branch 'release' into project-jp

# Conflicts:
#	src/main/java/com/fdkankan/contro/mq/service/impl/BuildSceneServiceImpl.java
#	src/main/java/com/fdkankan/contro/service/impl/CommonServiceImpl.java
dsx 1 рік тому
батько
коміт
e7b69c7030

+ 1 - 3
src/main/java/com/fdkankan/contro/mq/service/impl/BuildSceneServiceImpl.java

@@ -364,9 +364,7 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
 //
 //            //更新场景主表
 //            //如果相机容量不足,需要把场景的paystatus改为容量不足状态
-//            if (cameraType != 14) {
-//                scenePlus.setPayStatus(commonService.getPayStatus(scenePlus.getCameraId(), space));
-//            }
+//            scenePlus.setPayStatus(commonService.getPayStatus(scenePlus.getCameraId(), space));
 
             this.uploadStatusJson(scenePlus, scenePlusExt);
 

+ 3 - 0
src/main/java/com/fdkankan/contro/service/impl/CommonServiceImpl.java

@@ -56,6 +56,9 @@ public class CommonServiceImpl implements ICommonService {
     @Value("${helpLink.en-us:https://docs.4dkankan.com/#/product/4dkk/en-us/README}")
     private String helpLinkEn;
 
+    @Value("#{'${camType.laser:}'.split(',')}")
+    private List<Integer> laserCamTypeList;
+
 
     @Autowired
     private FYunFileServiceInterface fYunFileServiceInterface;

+ 2 - 7
src/main/java/com/fdkankan/contro/service/impl/SceneFileBuildServiceImpl.java

@@ -419,9 +419,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
 
         //重算的场景,先移除该场景对应的容量
         if (rebuild == 1) {
-            if(CollUtil.isEmpty(laserCamTypeList) || !laserCamTypeList.contains(cameraDetail.getType())){
-                scenePlusService.resetSpace(sceneNum);
-            }
+            scenePlusService.resetSpace(sceneNum);
         } else {
             //上传log-main.png
             fYunFileService.uploadFile(ConstantFilePath.LOGO_PATH + "logo-main.png", imgViewPath + "logo-main.png");
@@ -1235,10 +1233,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
         }
 
         //重算的场景,先移除该场景对应的容量
-        CameraDetail cameraDetail = cameraDetailService.getByCameraId(cameraId);
-        if(CollUtil.isEmpty(laserCamTypeList) || !laserCamTypeList.contains(cameraDetail.getType())){
-            scenePlusService.resetSpace(num);
-        }
+        scenePlusService.resetSpace(num);
         String statusJsonOssPath = String.format(UploadFilePath.DATA_VIEW_PATH, num) + "status.json";
         JSONObject statusJson = JSONObject.parseObject(fYunFileService.getFileContent(String.format(UploadFilePath.DATA_VIEW_PATH, num) + "status.json"));
         if(ObjectUtils.isEmpty(statusJson)){

+ 6 - 5
src/main/java/com/fdkankan/contro/service/impl/ScenePlusServiceImpl.java

@@ -4,10 +4,7 @@ import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.fdkankan.common.constant.ErrorCode;
-import com.fdkankan.common.constant.PayStatus;
-import com.fdkankan.common.constant.SceneStatus;
-import com.fdkankan.common.constant.SpaceType;
+import com.fdkankan.common.constant.*;
 import com.fdkankan.contro.entity.CameraDetail;
 import com.fdkankan.contro.entity.ScenePlus;
 import com.fdkankan.contro.entity.ScenePlusExt;
@@ -67,7 +64,11 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
             if(spaceType.equals(SpaceType.SP.code())){
                 space = -1L;
             }
-            cameraDetailService.updateCameraDetailByCameraIdAndSpace(scenePlus.getCameraId(), space);
+            if(scenePlus.getSceneSource() == SceneSource.BM.code()
+                    || scenePlus.getSceneSource() == SceneSource.ZT.code()
+                    || (spaceType.equals(SpaceType.SP.code()))){
+                cameraDetailService.updateCameraDetailByCameraIdAndSpace(scenePlus.getCameraId(), space);
+            }
         }
 
         scenePlusExt.setSpace(Long.parseLong("0"));