dengsixing 1 rok temu
rodzic
commit
9b02804966

+ 0 - 3
src/main/java/com/fdkankan/contro/bean/SceneJsonBean.java

@@ -221,7 +221,4 @@ public class SceneJsonBean {
 
     private Integer sceneDraw;
 
-    private String orientation;
-
-
 }

+ 11 - 11
src/main/java/com/fdkankan/contro/entity/SceneEditControls.java

@@ -144,17 +144,17 @@ public class SceneEditControls implements Serializable {
     @TableLogic("A")
     private String recStatus;
 
-    @TableField("show_3d_all_tag")
-    private Integer show3dAllTag;
-
-    @TableField("show_3d_scene_model")
-    private Integer show3dSceneModel;
-
-    @TableField("show_3d_scene_video")
-    private Integer show3dSceneVideo;
-
-    @TableField("show_3d_scene_photo")
-    private Integer show3dScenePhoto;
+//    @TableField("show_3d_all_tag")
+//    private Integer show3dAllTag;
+//
+//    @TableField("show_3d_scene_model")
+//    private Integer show3dSceneModel;
+//
+//    @TableField("show_3d_scene_video")
+//    private Integer show3dSceneVideo;
+//
+//    @TableField("show_3d_scene_photo")
+//    private Integer show3dScenePhoto;
 
 
 }

+ 0 - 2
src/main/java/com/fdkankan/contro/entity/ScenePlusExt.java

@@ -185,6 +185,4 @@ public class ScenePlusExt implements Serializable {
     @TableField("is_obj")
     private int isObj;
 
-    @TableField("orientation")
-    private String orientation;
 }

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

@@ -196,6 +196,10 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
             }
 
             if (rewrite) {
+                Integer location = fdageJson.getInteger("location");
+                if(location != null && location == 6 && fdageJson.containsKey("exportMeshObj")){
+                    fdageJson.remove("exportMeshObj");
+                }
                 FileUtils.writeFile(message.getPath().concat("/capture/data.fdage"), fdageJson.toJSONString());
             }
 
@@ -337,8 +341,6 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
             //统计原始资源大小
             scenePlusExt.setOrigSpace(FileUtil.size(new File(path.concat(File.separator).concat("capture"))));
 
-            scenePlusExt.setOrientation(fdageData.getString("orientation"));
-
             if (cameraType == 14) {
                 //计算成功  激光转台相机 同步 请求
                 fdkkLaserService.syncBuildResult(scenePlus.getNum(), path, scenePlus.getCreateTime(), Calendar.getInstance().getTime(), scenePlusExt.getShootCount(), scenePlus.getPayStatus());
@@ -517,6 +519,8 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
             gen3dTiles = false;
         }
 
+        log.info("--------------genModel:{}, gen3dTiles:{}----------------------", genModel, gen3dTiles);
+
         if(genModel){
             if (!gen3dTiles) {
                 String damPath = path + File.separator + "results" + File.separator + ConstantFileName.modelUUID + "_50k.dam";
@@ -525,6 +529,7 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
                 map.put(damPath, imagesPath + ConstantFileName.modelUUID + "_50k.dam");
             }else{
                 List<String> list = FileUtils.list(new File(path + File.separator + "results" + File.separator + ModelKind.THREE_D_TILE.code()));
+                log.info("3dtiles list:{}", JSON.toJSONString(list));
                 if(CollUtil.isEmpty(list)){
                     log.error("3dtiles目录异常,3dtiles地址:{}", new File(path + File.separator + "results" + File.separator + ModelKind.THREE_D_TILE.code()));
                     throw new Exception("3dtiles目录异常");

+ 24 - 25
src/main/java/com/fdkankan/contro/service/impl/CommonServiceImpl.java

@@ -297,30 +297,30 @@ public class CommonServiceImpl implements ICommonService {
 
     @Override
     public int getPayStatus(Long cameraId, Long space){
-        //查询权益统计容量的方式
-        String unit = SpaceType.GB.code();
-        CameraDetail cameraDetail = cameraDetailService.getByCameraId(cameraId);
-        if(StrUtil.isNotEmpty(cameraDetail.getUnit())){
-            unit = cameraDetail.getUnit();
-        }
-        Long limit = this.getSpaceLimit(cameraDetail);
-
-        if(SpaceType.SP.code().equals(unit)){//如果按空间方式统计,则space置为1
-            space = 1L;
-        }
-
-        //更新相机使用用量,非激光相机或者是空间个数计算方式的,需要叠加相机容量
-        cameraDetailService.updateCameraDetailByCameraIdAndSpace(cameraId, space);
-
-        //无限容量或者激光相机,直接返回已支付
-        if(limit == -1 || ("gn".equals(env) && CollUtil.isNotEmpty(laserCamTypeList) && laserCamTypeList.contains(cameraDetail.getType()))){
-            return PayStatus.PAY.code();
-        }
-
-        Long usedSpace = cameraService.getUsedSpace(cameraId, unit);
-        if(usedSpace + space > limit){
-            return PayStatus.NO_CAPACITY.code();
-        }
+//        //查询权益统计容量的方式
+//        String unit = SpaceType.GB.code();
+//        CameraDetail cameraDetail = cameraDetailService.getByCameraId(cameraId);
+//        if(StrUtil.isNotEmpty(cameraDetail.getUnit())){
+//            unit = cameraDetail.getUnit();
+//        }
+//        Long limit = this.getSpaceLimit(cameraDetail);
+//
+//        if(SpaceType.SP.code().equals(unit)){//如果按空间方式统计,则space置为1
+//            space = 1L;
+//        }
+//
+//        //更新相机使用用量,非激光相机或者是空间个数计算方式的,需要叠加相机容量
+//        cameraDetailService.updateCameraDetailByCameraIdAndSpace(cameraId, space);
+//
+//        //无限容量或者激光相机,直接返回已支付
+//        if(limit == -1 || ("gn".equals(env) && CollUtil.isNotEmpty(laserCamTypeList) && laserCamTypeList.contains(cameraDetail.getType()))){
+//            return PayStatus.PAY.code();
+//        }
+//
+//        Long usedSpace = cameraService.getUsedSpace(cameraId, unit);
+//        if(usedSpace + space > limit){
+//            return PayStatus.NO_CAPACITY.code();
+//        }
 
         return PayStatus.PAY.code();
     }
@@ -447,7 +447,6 @@ public class CommonServiceImpl implements ICommonService {
         sceneJson.setModelKind(scenePlusExt.getModelKind());
         sceneJson.setVideos(JSON.toJSONString(videosJson));
         sceneJson.setPayStatus(scenePlus.getPayStatus());
-        sceneJson.setOrientation(scenePlusExt.getOrientation());
         if(StrUtil.isNotEmpty(oldSceneJson)){
             SceneJsonBean oldSceneJsonBean = JSON.parseObject(oldSceneJson, SceneJsonBean.class);
             List<JSONObject> mosaicList = JSON.parseObject(oldSceneJson, SceneJsonBean.class).getMosaicList();

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

@@ -29,7 +29,7 @@ import java.util.stream.Collectors;
  * 场景主表 服务实现类
  * </p>
  *
- * @author 
+ * @author
  * @since 2022-03-16
  */
 @Slf4j
@@ -67,7 +67,11 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
             if(scenePlus.getSceneSource() == SceneSource.BM.code()
                     || scenePlus.getSceneSource() == SceneSource.ZT.code()
                     || (spaceType.equals(SpaceType.SP.code()))){
-                cameraDetailService.updateCameraDetailByCameraIdAndSpace(scenePlus.getCameraId(), space);
+                try {
+                    cameraDetailService.updateCameraDetailByCameraIdAndSpace(scenePlus.getCameraId(), space);
+                }catch (Exception e){
+                    log.error("重算回退相机已使用用量失败, num:{}, cameraId:{}", num, scenePlus.getCameraId(), e);
+                }
             }
         }