|
@@ -1656,70 +1656,70 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
return ResultData.ok(result);
|
|
|
}
|
|
|
|
|
|
- private ScenePlusVO buildScenePost(String dataSource, JSONObject jsonObject, String buildType, long cameraType,
|
|
|
- String sceneNum, Camera camera, CameraDetail cameraDetail, int rebuild,String icon,User user) throws Exception {
|
|
|
- String imgViewPath = String.format(UploadFilePath.IMG_VIEW_PATH, sceneNum);
|
|
|
-
|
|
|
- JSONObject firmwareVersion = new JSONObject();
|
|
|
- if (!ObjectUtils.isEmpty(jsonObject.getString("camSoftwareVersion"))) {
|
|
|
- firmwareVersion.put("camSoftwareVersion", jsonObject.getString("camSoftwareVersion"));
|
|
|
- }
|
|
|
-
|
|
|
- if (!ObjectUtils.isEmpty(jsonObject.getString("version"))) {
|
|
|
- firmwareVersion.put("version", jsonObject.getString("version"));
|
|
|
- }
|
|
|
-
|
|
|
- String sceneUrl = "/" + sceneProNewUrl;
|
|
|
-
|
|
|
- //重算的场景,先移除该场景对应的容量
|
|
|
- if (rebuild == 1) {
|
|
|
-// try {
|
|
|
-// scenePlusService.resetSpace(sceneNum);
|
|
|
-// }catch (Exception e){
|
|
|
-// log.error("重置容量失败", e);
|
|
|
+// private ScenePlusVO buildScenePost(String dataSource, JSONObject jsonObject, String buildType, long cameraType,
|
|
|
+// String sceneNum, Camera camera, CameraDetail cameraDetail, int rebuild,String icon,User user) throws Exception {
|
|
|
+// String imgViewPath = String.format(UploadFilePath.IMG_VIEW_PATH, sceneNum);
|
|
|
+//
|
|
|
+// JSONObject firmwareVersion = new JSONObject();
|
|
|
+// if (!ObjectUtils.isEmpty(jsonObject.getString("camSoftwareVersion"))) {
|
|
|
+// firmwareVersion.put("camSoftwareVersion", jsonObject.getString("camSoftwareVersion"));
|
|
|
+// }
|
|
|
+//
|
|
|
+// if (!ObjectUtils.isEmpty(jsonObject.getString("version"))) {
|
|
|
+// firmwareVersion.put("version", jsonObject.getString("version"));
|
|
|
+// }
|
|
|
+//
|
|
|
+// String sceneUrl = "/" + sceneProNewUrl;
|
|
|
+//
|
|
|
+// //重算的场景,先移除该场景对应的容量
|
|
|
+// if (rebuild == 1) {
|
|
|
+//// try {
|
|
|
+//// scenePlusService.resetSpace(sceneNum);
|
|
|
+//// }catch (Exception e){
|
|
|
+//// log.error("重置容量失败", e);
|
|
|
+//// }
|
|
|
+//// //删除oss的houst_floor.json(国际版可能会卡住)
|
|
|
+//// fYunFileService.deleteFile(dataViewPath + "houst_floor.json");
|
|
|
+// } else {
|
|
|
+// //上传log-main.png
|
|
|
+// fYunFileService.uploadFile(ConstantFilePath.LOGO_PATH + "logo-main.png", imgViewPath + "logo-main.png");
|
|
|
+// fYunFileService.uploadFile(ConstantFilePath.LOGO_PATH + "logo-main-en.png", imgViewPath + "logo-main-en.png");
|
|
|
+// }
|
|
|
+// String algorithm = jsonObject.getString("location") != null && "1".equals(jsonObject.getString("location")) ? "sfm" : "slam";
|
|
|
+// String unicode = jsonObject.getString("creator") + "_" + jsonObject.getString("uuidtime");
|
|
|
+//
|
|
|
+// ScenePlusVO scenePlusVO = this.createScenePlus(sceneNum, camera.getId(), camera.getChildName(), jsonObject.getString("creator"),
|
|
|
+// jsonObject.getString("pwd"), unicode, cameraType,jsonObject.getJSONObject("cam").getIntValue("type"), dataSource, icon, user.getId() , null, algorithm, jsonObject.getInteger("location"),
|
|
|
+// jsonObject.getJSONArray("points").size(), jsonObject.getString("name"), jsonObject.getString("info"),
|
|
|
+// jsonObject.getInteger("scenetype"), jsonObject.getString("gps"), rebuild,
|
|
|
+// jsonObject.getInteger("resolution"), firmwareVersion.toString(), sceneUrl, buildType, cameraDetail.getCooperationUser());
|
|
|
+//
|
|
|
+// ScenePlus scenePlus = scenePlusService.getScenePlusByNum(sceneNum);
|
|
|
+// scenePlus.setTaskId(jsonObject.getString("taskId"));
|
|
|
+// scenePlus.setKNo(jsonObject.getString("kNo"));
|
|
|
+// scenePlusService.updateById(scenePlus);
|
|
|
+// ScenePlusExt scenePlusExt = scenePlusExtService.getScenePlusExtByPlusId(scenePlus.getId());
|
|
|
+// boolean isObj = jsonObject.containsKey("exportMeshObj") && jsonObject.getIntValue("exportMeshObj") == 1;
|
|
|
+// scenePlusExt.setIsObj(isObj ? CommonStatus.YES.code() : CommonStatus.NO.code());
|
|
|
+// scenePlusExtService.updateById(scenePlusExt);
|
|
|
+//
|
|
|
+// BuildSceneCallMessage mqMessage = getBuildSceneMqMessage(sceneNum, cameraType, algorithm, jsonObject, buildType, scenePlusVO.getDataSource());
|
|
|
+//
|
|
|
+// if (cameraDetail.getCompanyId() != null) {
|
|
|
+// Company company = companyService.getById(cameraDetail.getCompanyId());
|
|
|
+// if (company != null && !ObjectUtils.isEmpty(company.getCalculateFlexibility()) && !company.getCalculateFlexibility()) {
|
|
|
+// mqMessage.setFlexibility(-1);
|
|
|
// }
|
|
|
-// //删除oss的houst_floor.json(国际版可能会卡住)
|
|
|
-// fYunFileService.deleteFile(dataViewPath + "houst_floor.json");
|
|
|
- } else {
|
|
|
- //上传log-main.png
|
|
|
- fYunFileService.uploadFile(ConstantFilePath.LOGO_PATH + "logo-main.png", imgViewPath + "logo-main.png");
|
|
|
- fYunFileService.uploadFile(ConstantFilePath.LOGO_PATH + "logo-main-en.png", imgViewPath + "logo-main-en.png");
|
|
|
- }
|
|
|
- String algorithm = jsonObject.getString("location") != null && "1".equals(jsonObject.getString("location")) ? "sfm" : "slam";
|
|
|
- String unicode = jsonObject.getString("creator") + "_" + jsonObject.getString("uuidtime");
|
|
|
-
|
|
|
- ScenePlusVO scenePlusVO = this.createScenePlus(sceneNum, camera.getId(), camera.getChildName(), jsonObject.getString("creator"),
|
|
|
- jsonObject.getString("pwd"), unicode, cameraType,jsonObject.getJSONObject("cam").getIntValue("type"), dataSource, icon, user.getId() , null, algorithm, jsonObject.getInteger("location"),
|
|
|
- jsonObject.getJSONArray("points").size(), jsonObject.getString("name"), jsonObject.getString("info"),
|
|
|
- jsonObject.getInteger("scenetype"), jsonObject.getString("gps"), rebuild,
|
|
|
- jsonObject.getInteger("resolution"), firmwareVersion.toString(), sceneUrl, buildType, cameraDetail.getCooperationUser());
|
|
|
-
|
|
|
- ScenePlus scenePlus = scenePlusService.getScenePlusByNum(sceneNum);
|
|
|
- scenePlus.setTaskId(jsonObject.getString("taskId"));
|
|
|
- scenePlus.setKNo(jsonObject.getString("kNo"));
|
|
|
- scenePlusService.updateById(scenePlus);
|
|
|
- ScenePlusExt scenePlusExt = scenePlusExtService.getScenePlusExtByPlusId(scenePlus.getId());
|
|
|
- boolean isObj = jsonObject.containsKey("exportMeshObj") && jsonObject.getIntValue("exportMeshObj") == 1;
|
|
|
- scenePlusExt.setIsObj(isObj ? CommonStatus.YES.code() : CommonStatus.NO.code());
|
|
|
- scenePlusExtService.updateById(scenePlusExt);
|
|
|
-
|
|
|
- BuildSceneCallMessage mqMessage = getBuildSceneMqMessage(sceneNum, cameraType, algorithm, jsonObject, buildType, scenePlusVO.getDataSource());
|
|
|
-
|
|
|
- if (cameraDetail.getCompanyId() != null) {
|
|
|
- Company company = companyService.getById(cameraDetail.getCompanyId());
|
|
|
- if (company != null && !ObjectUtils.isEmpty(company.getCalculateFlexibility()) && !company.getCalculateFlexibility()) {
|
|
|
- mqMessage.setFlexibility(-1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- mqMessage.getExt().put("deleteExtras", true);
|
|
|
- mqMessage.getExt().put("gps", jsonObject.getString("gps"));
|
|
|
- mqMessage.getExt().put("threeCamType", scenePlusVO.getThreeCamType());
|
|
|
-
|
|
|
- rabbitMqProducer.sendByWorkQueue(queueModelingPre, mqMessage);
|
|
|
-
|
|
|
- return scenePlusVO;
|
|
|
- }
|
|
|
+// }
|
|
|
+//
|
|
|
+// mqMessage.getExt().put("deleteExtras", true);
|
|
|
+// mqMessage.getExt().put("gps", jsonObject.getString("gps"));
|
|
|
+// mqMessage.getExt().put("threeCamType", scenePlusVO.getThreeCamType());
|
|
|
+//
|
|
|
+// rabbitMqProducer.sendByWorkQueue(queueModelingPre, mqMessage);
|
|
|
+//
|
|
|
+// return scenePlusVO;
|
|
|
+// }
|
|
|
|
|
|
|
|
|
private void buildV3Scene2(String dataSource,JSONObject jsonObject,long cameraType,String sceneNum,Camera cameraEntity,CameraDetail detailEntity,String icon) throws Exception {
|