|
@@ -141,6 +141,8 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
ISceneExtService sceneExtService;
|
|
|
@Autowired
|
|
|
IFdkkLaserService fdkkLaserService;
|
|
|
+ @Autowired
|
|
|
+ ISceneEditInfoService sceneEditInfoService;
|
|
|
|
|
|
@Override
|
|
|
public SceneFileBuild findByFileId(String fileId) {
|
|
@@ -1722,44 +1724,48 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
log.info("场景记录添加到数据库:"+projectNum);
|
|
|
//type=0为新生成场景,其余为重新计算场景
|
|
|
|
|
|
- SceneProEdit sceneProEdit = new SceneProEdit();
|
|
|
- SceneProEditExt sceneProEditExt = new SceneProEditExt();
|
|
|
+ // TODO: 2022/2/23 SceneProEdit 重构版本SceneProEdit 这个表可能不用,这里先暂时注释掉
|
|
|
+// SceneProEdit sceneProEdit = new SceneProEdit();
|
|
|
+// SceneProEditExt sceneProEditExt = new SceneProEditExt();
|
|
|
if(type == 0){
|
|
|
scenePro.setSceneStatus(SceneStatus.wait.code());
|
|
|
sceneProService.save(scenePro);
|
|
|
sceneProExt.setSceneProId(scenePro.getId());
|
|
|
sceneProExtService.save(sceneProExt);
|
|
|
|
|
|
- sceneProEdit.setNeedKey(0);
|
|
|
-
|
|
|
- if(sceneKey == null) {
|
|
|
- sceneKey = "";
|
|
|
- }
|
|
|
- sceneProEdit.setSceneKey(sceneKey);
|
|
|
- if(!sceneKey.equals("")) {
|
|
|
- sceneProEdit.setNeedKey(1);
|
|
|
- }else {
|
|
|
- sceneProEdit.setNeedKey(0);
|
|
|
- }
|
|
|
-
|
|
|
- sceneProEdit.setProId(scenePro.getId());
|
|
|
- sceneProEdit.setFloorLogoSize(100);
|
|
|
- sceneProEdit.setCreateTime(Calendar.getInstance().getTime());
|
|
|
- sceneProEditService.save(sceneProEdit);
|
|
|
-
|
|
|
- sceneProEditExt.setProEditId(sceneProEdit.getId());
|
|
|
- sceneProEditExt.setProId(scenePro.getId());
|
|
|
- sceneProEditExt.setMapVisi(1);
|
|
|
- sceneProEditExt.setTourVisi(1);
|
|
|
- sceneProEditExt.setVrVisi(1);
|
|
|
- sceneProEditExt.setRulerVisi(1);
|
|
|
- sceneProEditExt.setCadImgVisi(1);
|
|
|
- sceneProEditExt.setPanoVisi(1);
|
|
|
- sceneProEditExt.setM2dVisi(1);
|
|
|
- sceneProEditExt.setM3dVisi(1);
|
|
|
- sceneProEditExt.setMeasureVisi(0);
|
|
|
- sceneProEditExt.setCreateTime(Calendar.getInstance().getTime());
|
|
|
- sceneProEditExtService.save(sceneProEditExt);
|
|
|
+ SceneEditInfo sceneEditInfo = new SceneEditInfo();
|
|
|
+ sceneEditInfo.setSceneProId(scenePro.getId());
|
|
|
+ sceneEditInfoService.save(sceneEditInfo);
|
|
|
+
|
|
|
+// sceneProEdit.setNeedKey(0);
|
|
|
+// if(sceneKey == null) {
|
|
|
+// sceneKey = "";
|
|
|
+// }
|
|
|
+// sceneProEdit.setSceneKey(sceneKey);
|
|
|
+// if(!sceneKey.equals("")) {
|
|
|
+// sceneProEdit.setNeedKey(1);
|
|
|
+// }else {
|
|
|
+// sceneProEdit.setNeedKey(0);
|
|
|
+// }
|
|
|
+//
|
|
|
+// sceneProEdit.setProId(scenePro.getId());
|
|
|
+// sceneProEdit.setFloorLogoSize(100);
|
|
|
+// sceneProEdit.setCreateTime(Calendar.getInstance().getTime());
|
|
|
+// sceneProEditService.save(sceneProEdit);
|
|
|
+//
|
|
|
+// sceneProEditExt.setProEditId(sceneProEdit.getId());
|
|
|
+// sceneProEditExt.setProId(scenePro.getId());
|
|
|
+// sceneProEditExt.setMapVisi(1);
|
|
|
+// sceneProEditExt.setTourVisi(1);
|
|
|
+// sceneProEditExt.setVrVisi(1);
|
|
|
+// sceneProEditExt.setRulerVisi(1);
|
|
|
+// sceneProEditExt.setCadImgVisi(1);
|
|
|
+// sceneProEditExt.setPanoVisi(1);
|
|
|
+// sceneProEditExt.setM2dVisi(1);
|
|
|
+// sceneProEditExt.setM3dVisi(1);
|
|
|
+// sceneProEditExt.setMeasureVisi(0);
|
|
|
+// sceneProEditExt.setCreateTime(Calendar.getInstance().getTime());
|
|
|
+// sceneProEditExtService.save(sceneProEditExt);
|
|
|
|
|
|
|
|
|
//新增场景时,同时新增场景协作信息
|
|
@@ -1804,45 +1810,53 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
sceneProService.updateById(scenePro);
|
|
|
sceneProExtService.updateById(sceneProExt);
|
|
|
|
|
|
- SceneProEdit oldSceneProEdit = sceneProEditService.findByProId(scenePro.getId());
|
|
|
- SceneProEditExt oldSceneProEditeExt = sceneProEditExtService.getByProEditId(oldSceneProEdit.getId());
|
|
|
- sceneProEdit.setNeedKey(0);
|
|
|
-
|
|
|
- if(sceneKey == null) {
|
|
|
- sceneKey = "";
|
|
|
- }
|
|
|
- sceneProEdit.setSceneKey(sceneKey);
|
|
|
- if(!sceneKey.equals("")) {
|
|
|
- sceneProEdit.setNeedKey(1);
|
|
|
- }else {
|
|
|
- sceneProEdit.setNeedKey(0);
|
|
|
+ // TODO: 2022/2/23 如果是重算场景 ,这里需要更新一些字段,现在还不知道更写哪些字段,先留空
|
|
|
+ SceneEditInfo sceneEditInfo = sceneEditInfoService.getBySceneProId(oldScene.getId());
|
|
|
+ if(sceneEditInfo == null){
|
|
|
+ throw new BusinessException(ErrorCode.FAILURE_CODE_7008);
|
|
|
}
|
|
|
+ sceneEditInfoService.updateById(sceneEditInfo);
|
|
|
|
|
|
- sceneProEdit.setId(oldSceneProEdit.getId());
|
|
|
- sceneProEdit.setProId(scenePro.getId());
|
|
|
- sceneProEdit.setFloorLogoSize(100);
|
|
|
- sceneProEdit.setTbStatus(TbStatus.VALID.code());
|
|
|
- sceneProEdit.setFloorPublishVer(oldSceneProEdit.getFloorEditVer() + 1);
|
|
|
- sceneProEdit.setFloorEditVer(oldSceneProEdit.getFloorEditVer() + 1);
|
|
|
- sceneProEdit.setVersion(oldSceneProEdit.getVersion() + 1);
|
|
|
- sceneProEdit.setUpdateTime(Calendar.getInstance().getTime());
|
|
|
- sceneProEditService.updateById(sceneProEdit);
|
|
|
-
|
|
|
- sceneProEditExt.setId(oldSceneProEditeExt.getId());
|
|
|
- sceneProEditExt.setProId(scenePro.getId());
|
|
|
- sceneProEditExt.setMapVisi(1);
|
|
|
- sceneProEditExt.setTourVisi(1);
|
|
|
- sceneProEditExt.setVrVisi(1);
|
|
|
- sceneProEditExt.setRulerVisi(1);
|
|
|
- sceneProEditExt.setCadImgVisi(1);
|
|
|
- sceneProEditExt.setPanoVisi(1);
|
|
|
- sceneProEditExt.setM2dVisi(1);
|
|
|
- sceneProEditExt.setM3dVisi(1);
|
|
|
- sceneProEditExt.setMeasureVisi(0);
|
|
|
- sceneProEditExt.setCreateTime(oldSceneProEdit.getCreateTime());
|
|
|
- sceneProEditExt.setImagesVersion(oldSceneProEditeExt.getImagesVersion() + 1);
|
|
|
- sceneProEditExt.setUpdateTime(Calendar.getInstance().getTime());
|
|
|
- sceneProEditExtService.updateById(sceneProEditExt);
|
|
|
+
|
|
|
+// SceneProEdit oldSceneProEdit = sceneProEditService.findByProId(scenePro.getId());
|
|
|
+// SceneProEditExt oldSceneProEditeExt = sceneProEditExtService.getByProEditId(oldSceneProEdit.getId());
|
|
|
+// sceneProEdit.setNeedKey(0);
|
|
|
+//
|
|
|
+// if(sceneKey == null) {
|
|
|
+// sceneKey = "";
|
|
|
+// }
|
|
|
+// sceneProEdit.setSceneKey(sceneKey);
|
|
|
+// if(!sceneKey.equals("")) {
|
|
|
+// sceneProEdit.setNeedKey(1);
|
|
|
+// }else {
|
|
|
+// sceneProEdit.setNeedKey(0);
|
|
|
+// }
|
|
|
+//
|
|
|
+// sceneProEdit.setId(oldSceneProEdit.getId());
|
|
|
+// sceneProEdit.setProId(scenePro.getId());
|
|
|
+// sceneProEdit.setFloorLogoSize(100);
|
|
|
+// sceneProEdit.setTbStatus(TbStatus.VALID.code());
|
|
|
+// sceneProEdit.setFloorPublishVer(oldSceneProEdit.getFloorEditVer() + 1);
|
|
|
+// sceneProEdit.setFloorEditVer(oldSceneProEdit.getFloorEditVer() + 1);
|
|
|
+// sceneProEdit.setVersion(oldSceneProEdit.getVersion() + 1);
|
|
|
+// sceneProEdit.setUpdateTime(Calendar.getInstance().getTime());
|
|
|
+// sceneProEditService.updateById(sceneProEdit);
|
|
|
+//
|
|
|
+// sceneProEditExt.setId(oldSceneProEditeExt.getId());
|
|
|
+// sceneProEditExt.setProId(scenePro.getId());
|
|
|
+// sceneProEditExt.setMapVisi(1);
|
|
|
+// sceneProEditExt.setTourVisi(1);
|
|
|
+// sceneProEditExt.setVrVisi(1);
|
|
|
+// sceneProEditExt.setRulerVisi(1);
|
|
|
+// sceneProEditExt.setCadImgVisi(1);
|
|
|
+// sceneProEditExt.setPanoVisi(1);
|
|
|
+// sceneProEditExt.setM2dVisi(1);
|
|
|
+// sceneProEditExt.setM3dVisi(1);
|
|
|
+// sceneProEditExt.setMeasureVisi(0);
|
|
|
+// sceneProEditExt.setCreateTime(oldSceneProEdit.getCreateTime());
|
|
|
+// sceneProEditExt.setImagesVersion(oldSceneProEditeExt.getImagesVersion() + 1);
|
|
|
+// sceneProEditExt.setUpdateTime(Calendar.getInstance().getTime());
|
|
|
+// sceneProEditExtService.updateById(sceneProEditExt);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -1874,13 +1888,13 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
}
|
|
|
scenejson.put("createTime", new DateTime(new Date()).toString("yyyy-MM-dd HH:mm"));
|
|
|
|
|
|
- scenejson.put("floorPublishVer", sceneProEdit.getFloorPublishVer());
|
|
|
- scenejson.put("floorEditVer", sceneProEdit.getFloorEditVer());
|
|
|
+// scenejson.put("floorPublishVer", sceneProEdit.getFloorPublishVer());
|
|
|
+// scenejson.put("floorEditVer", sceneProEdit.getFloorEditVer());
|
|
|
scenejson.put("entry", null);
|
|
|
|
|
|
- if(!org.springframework.util.StringUtils.isEmpty(sceneProEdit.getHotsIds())){
|
|
|
- scenejson.put("hots", 1);
|
|
|
- }
|
|
|
+// if(!org.springframework.util.StringUtils.isEmpty(sceneProEdit.getHotsIds())){
|
|
|
+// scenejson.put("hots", 1);
|
|
|
+// }
|
|
|
|
|
|
File file = new File(ConstantFilePath.SCENE_PATH+"data/data"+projectNum);
|
|
|
if(!file.exists()||!file.isDirectory())
|