|
@@ -1,237 +1,237 @@
|
|
|
-package com.fdkankan.scene.controller;
|
|
|
-
|
|
|
-import cn.hutool.core.util.StrUtil;
|
|
|
-import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
-import com.fdkankan.common.constant.RedisUtil;
|
|
|
-import com.fdkankan.common.controller.BaseController;
|
|
|
-import com.fdkankan.common.response.ResultData;
|
|
|
-import com.fdkankan.common.util.RSAEncrypt;
|
|
|
-import com.fdkankan.scene.service.*;
|
|
|
-import com.fdkankan.scene.vo.ResponseSceneFile;
|
|
|
-import lombok.extern.log4j.Log4j2;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.data.redis.core.RedisTemplate;
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
-
|
|
|
-import java.util.Base64;
|
|
|
-
|
|
|
-/**
|
|
|
- * 场景文件上传模块
|
|
|
- */
|
|
|
-@Log4j2
|
|
|
-@RestController
|
|
|
-@RequestMapping("/api/scene/file")
|
|
|
-@Transactional(rollbackFor = Exception.class)
|
|
|
-public class SceneFileController extends BaseController {
|
|
|
-
|
|
|
+//package com.fdkankan.scene.controller;
|
|
|
+//
|
|
|
+//import cn.hutool.core.util.StrUtil;
|
|
|
+//import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
+//import com.fdkankan.common.constant.RedisUtil;
|
|
|
+//import com.fdkankan.common.controller.BaseController;
|
|
|
+//import com.fdkankan.common.response.ResultData;
|
|
|
+//import com.fdkankan.common.util.RSAEncrypt;
|
|
|
+//import com.fdkankan.scene.service.*;
|
|
|
+//import com.fdkankan.scene.vo.ResponseSceneFile;
|
|
|
+//import lombok.extern.log4j.Log4j2;
|
|
|
+//import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+//import org.springframework.beans.factory.annotation.Value;
|
|
|
+//import org.springframework.data.redis.core.RedisTemplate;
|
|
|
+//import org.springframework.transaction.annotation.Transactional;
|
|
|
+//import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+//import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+//import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+//import org.springframework.web.bind.annotation.RestController;
|
|
|
+//import org.springframework.web.multipart.MultipartFile;
|
|
|
+//
|
|
|
+//import java.util.Base64;
|
|
|
+//
|
|
|
+///**
|
|
|
+// * 场景文件上传模块
|
|
|
+// */
|
|
|
+//@Log4j2
|
|
|
+//@RestController
|
|
|
+//@RequestMapping("/api/scene/file")
|
|
|
+//@Transactional(rollbackFor = Exception.class)
|
|
|
+//public class SceneFileController extends BaseController {
|
|
|
+//
|
|
|
+//// @Autowired
|
|
|
+//// private FileService fileService;
|
|
|
// @Autowired
|
|
|
-// private FileService fileService;
|
|
|
- @Autowired
|
|
|
- private ISceneFileUploadService sceneFileUploadService;
|
|
|
- @Autowired
|
|
|
- private ISceneFileBuildService sceneFileBuildService;
|
|
|
+// private ISceneFileUploadService sceneFileUploadService;
|
|
|
// @Autowired
|
|
|
-// private FileRouteConfig routeConfig;
|
|
|
+// private ISceneFileBuildService sceneFileBuildService;
|
|
|
+//// @Autowired
|
|
|
+//// private FileRouteConfig routeConfig;
|
|
|
+//// @Autowired
|
|
|
+//// private ModelingMsgProducer producer;
|
|
|
+// private String splice = "#";
|
|
|
+//
|
|
|
+//// @Autowired
|
|
|
+//// private GoodsFeignClient goodsService;
|
|
|
// @Autowired
|
|
|
-// private ModelingMsgProducer producer;
|
|
|
- private String splice = "#";
|
|
|
-
|
|
|
+// private ObjectMapper mapper;
|
|
|
+//
|
|
|
// @Autowired
|
|
|
-// private GoodsFeignClient goodsService;
|
|
|
- @Autowired
|
|
|
- private ObjectMapper mapper;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private ISceneProService sceneProService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private ISceneProEditService sceneProEditService;
|
|
|
-
|
|
|
+// private ISceneProService sceneProService;
|
|
|
+//
|
|
|
// @Autowired
|
|
|
-// private UserFeignClient userService;
|
|
|
+// private ISceneProEditService sceneProEditService;
|
|
|
+//
|
|
|
+//// @Autowired
|
|
|
+//// private UserFeignClient userService;
|
|
|
+////
|
|
|
+//// @Autowired
|
|
|
+//// private IScene3dNumNewService numService;
|
|
|
+////
|
|
|
+//// @Autowired
|
|
|
+//// private UploadToOssUtil uploadToOssUtil;
|
|
|
+////
|
|
|
+//// @Autowired
|
|
|
+//// private ICompanyService companyService;
|
|
|
//
|
|
|
// @Autowired
|
|
|
-// private IScene3dNumNewService numService;
|
|
|
+// private ISceneCooperationService sceneCooperationService;
|
|
|
//
|
|
|
// @Autowired
|
|
|
-// private UploadToOssUtil uploadToOssUtil;
|
|
|
+// private ISceneResourceCooperationService sceneResourceCooperationService;
|
|
|
//
|
|
|
// @Autowired
|
|
|
-// private ICompanyService companyService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private ISceneCooperationService sceneCooperationService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private ISceneResourceCooperationService sceneResourceCooperationService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private ISceneResourceCameraService sceneResourceCameraService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- RedisUtil redisUtil;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- RedisTemplate redisTemplate;
|
|
|
-
|
|
|
- @Value("${main.url}")
|
|
|
- private String mainUrl;
|
|
|
-
|
|
|
- @Value("${scene.url}")
|
|
|
- private String sceneUrl;
|
|
|
-
|
|
|
- @Value("${scene.pro.url}")
|
|
|
- private String sceneProUrl;
|
|
|
-
|
|
|
- @Value("${scene.pro.new.url}")
|
|
|
- private String sceneProNewUrl;
|
|
|
-
|
|
|
- @Value("${oss.type}")
|
|
|
- private String type;
|
|
|
-
|
|
|
- @Value("${prefix.ali}")
|
|
|
- private String prefixAli;
|
|
|
-
|
|
|
- @Value("${ecs.type}")
|
|
|
- private String ecsType;
|
|
|
-
|
|
|
+// private ISceneResourceCameraService sceneResourceCameraService;
|
|
|
+//
|
|
|
// @Autowired
|
|
|
-// private RubberSheetingUtil rubberSheetingUtil;
|
|
|
+// RedisUtil redisUtil;
|
|
|
//
|
|
|
// @Autowired
|
|
|
-// private SceneNumService sceneNumService;
|
|
|
-
|
|
|
- @Value("${unCalculated.company.ids:#{null}}")
|
|
|
- private String[] unCalculatedCompanyIds;
|
|
|
-
|
|
|
- /**
|
|
|
- * 场景文件上传之前先获取fileId
|
|
|
- * @param params
|
|
|
- * @return
|
|
|
- * @throws Exception
|
|
|
- */
|
|
|
- @PostMapping("preUpload")
|
|
|
- public ResponseSceneFile preUpload(String params) throws Exception {
|
|
|
- return sceneFileBuildService.preUpload(params);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取文件上传的状态
|
|
|
- * @param params
|
|
|
- * @return
|
|
|
- * @throws Exception
|
|
|
- */
|
|
|
- @PostMapping("getProgress")
|
|
|
- public ResponseSceneFile getProgress(String params) throws Exception {
|
|
|
- return sceneFileBuildService.getProgress(params);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 单个文件上传
|
|
|
- * @param file
|
|
|
- * @param params
|
|
|
- * @return
|
|
|
- */
|
|
|
- @PostMapping("upload")
|
|
|
- public ResultData upload(@RequestParam(value = "file",required = false) MultipartFile file,
|
|
|
- String params) throws Exception {
|
|
|
- return sceneFileBuildService.uploadFile(file, params);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 上传大文件
|
|
|
- * @param file
|
|
|
- * @return
|
|
|
- * @throws
|
|
|
- */
|
|
|
- @PostMapping("uploadBigFile")
|
|
|
- public ResultData uploadBigFile(@RequestParam(value = "file",required = false) MultipartFile file,
|
|
|
- String params) throws Exception {
|
|
|
- return sceneFileBuildService.uploadFile(file, params);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 更新fileid文件的上传状态 -- 作废
|
|
|
- *
|
|
|
- * @param params
|
|
|
- * @return
|
|
|
- */
|
|
|
- @PostMapping("uploadSuccess")
|
|
|
- public ResultData uploadSuccess(String params) throws Exception {
|
|
|
- return sceneFileBuildService.uploadSuccess(params);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 更新fileid文件的上传状态 - 后端八目上传逻辑
|
|
|
- *
|
|
|
- * @param params
|
|
|
- * @return
|
|
|
- */
|
|
|
- @PostMapping("uploadSuccessBuild")
|
|
|
- public ResultData uploadSuccessBuild(String params) throws Exception {
|
|
|
- return sceneFileBuildService.uploadSuccessBuild(params);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 更新fileid文件的上传状态 转台相机,激光相机
|
|
|
- *
|
|
|
- * @param params
|
|
|
- * @return
|
|
|
- */
|
|
|
- @PostMapping("turntableUploadSuccess")
|
|
|
- public ResultData turntableUploadSuccess(String params) throws Exception {
|
|
|
- return sceneFileBuildService.turntableUploadSuccess(params);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取亚马逊S3文件上传url
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
- @PostMapping("getS3UploadUrl")
|
|
|
- public ResultData getS3UploadUrl(String params) throws Exception {
|
|
|
- return sceneFileBuildService.getS3UploadUrl(params);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 计算双目场景 - 新双目相机上传 小红屋
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
-// @ApiOperation("计算双目场景 - 新双目相机上传 小红屋")
|
|
|
- @PostMapping("buildLiteScene")
|
|
|
-// @ApiImplicitParams({
|
|
|
-// @ApiImplicitParam(name = "prefix", value = "文件下载前缀,结尾不加/", dataType = "String"),
|
|
|
-// @ApiImplicitParam(name = "dataFdage", value = "dataFdage", dataType = "String"),
|
|
|
-// @ApiImplicitParam(name = "zipName", value = "zip文件包名称", dataType = "String"),
|
|
|
-// @ApiImplicitParam(name = "password", value = "密码", dataType = "String"),
|
|
|
-// @ApiImplicitParam(name = "userName", value = "用户名", dataType = "String")})
|
|
|
- public ResultData buildLiteScene(String prefix, String dataFdage, String zipName, String userName, String password, String oldNum) throws Exception{
|
|
|
- return sceneFileBuildService.buildLiteScene(prefix, dataFdage, zipName, userName, password, oldNum);
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取亚马逊S3文件上传url
|
|
|
- * @return
|
|
|
- */
|
|
|
- @PostMapping("buildScene")
|
|
|
-// @ApiOperation("获取亚马逊S3文件上传url")
|
|
|
-// @ApiImplicitParams({
|
|
|
-// @ApiImplicitParam(name = "unicode", value = "unicode文件夹", dataType = "String"),
|
|
|
-// @ApiImplicitParam(name = "zip", value = "zip包的名称", dataType = "String"),
|
|
|
-// @ApiImplicitParam(name = "dataFdage", value = "dataFdage名称", dataType = "String")})
|
|
|
- public ResultData buildScene(String prefix, String unicode, String zip, String dataFdage) throws Exception{
|
|
|
- return sceneFileBuildService.buildScene(prefix, unicode, zip, dataFdage);
|
|
|
- }
|
|
|
-
|
|
|
-}
|
|
|
+// RedisTemplate redisTemplate;
|
|
|
+//
|
|
|
+// @Value("${main.url}")
|
|
|
+// private String mainUrl;
|
|
|
+//
|
|
|
+// @Value("${scene.url}")
|
|
|
+// private String sceneUrl;
|
|
|
+//
|
|
|
+// @Value("${scene.pro.url}")
|
|
|
+// private String sceneProUrl;
|
|
|
+//
|
|
|
+// @Value("${scene.pro.new.url}")
|
|
|
+// private String sceneProNewUrl;
|
|
|
+//
|
|
|
+// @Value("${oss.type}")
|
|
|
+// private String type;
|
|
|
+//
|
|
|
+// @Value("${prefix.ali}")
|
|
|
+// private String prefixAli;
|
|
|
+//
|
|
|
+// @Value("${ecs.type}")
|
|
|
+// private String ecsType;
|
|
|
+//
|
|
|
+//// @Autowired
|
|
|
+//// private RubberSheetingUtil rubberSheetingUtil;
|
|
|
+////
|
|
|
+//// @Autowired
|
|
|
+//// private SceneNumService sceneNumService;
|
|
|
+//
|
|
|
+// @Value("${unCalculated.company.ids:#{null}}")
|
|
|
+// private String[] unCalculatedCompanyIds;
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * 场景文件上传之前先获取fileId
|
|
|
+// * @param params
|
|
|
+// * @return
|
|
|
+// * @throws Exception
|
|
|
+// */
|
|
|
+// @PostMapping("preUpload")
|
|
|
+// public ResponseSceneFile preUpload(String params) throws Exception {
|
|
|
+// return sceneFileBuildService.preUpload(params);
|
|
|
+// }
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * 获取文件上传的状态
|
|
|
+// * @param params
|
|
|
+// * @return
|
|
|
+// * @throws Exception
|
|
|
+// */
|
|
|
+// @PostMapping("getProgress")
|
|
|
+// public ResponseSceneFile getProgress(String params) throws Exception {
|
|
|
+// return sceneFileBuildService.getProgress(params);
|
|
|
+// }
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * 单个文件上传
|
|
|
+// * @param file
|
|
|
+// * @param params
|
|
|
+// * @return
|
|
|
+// */
|
|
|
+// @PostMapping("upload")
|
|
|
+// public ResultData upload(@RequestParam(value = "file",required = false) MultipartFile file,
|
|
|
+// String params) throws Exception {
|
|
|
+// return sceneFileBuildService.uploadFile(file, params);
|
|
|
+// }
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * 上传大文件
|
|
|
+// * @param file
|
|
|
+// * @return
|
|
|
+// * @throws
|
|
|
+// */
|
|
|
+// @PostMapping("uploadBigFile")
|
|
|
+// public ResultData uploadBigFile(@RequestParam(value = "file",required = false) MultipartFile file,
|
|
|
+// String params) throws Exception {
|
|
|
+// return sceneFileBuildService.uploadFile(file, params);
|
|
|
+// }
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * 更新fileid文件的上传状态 -- 作废
|
|
|
+// *
|
|
|
+// * @param params
|
|
|
+// * @return
|
|
|
+// */
|
|
|
+// @PostMapping("uploadSuccess")
|
|
|
+// public ResultData uploadSuccess(String params) throws Exception {
|
|
|
+// return sceneFileBuildService.uploadSuccess(params);
|
|
|
+// }
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * 更新fileid文件的上传状态 - 后端八目上传逻辑
|
|
|
+// *
|
|
|
+// * @param params
|
|
|
+// * @return
|
|
|
+// */
|
|
|
+// @PostMapping("uploadSuccessBuild")
|
|
|
+// public ResultData uploadSuccessBuild(String params) throws Exception {
|
|
|
+// return sceneFileBuildService.uploadSuccessBuild(params);
|
|
|
+// }
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * 更新fileid文件的上传状态 转台相机,激光相机
|
|
|
+// *
|
|
|
+// * @param params
|
|
|
+// * @return
|
|
|
+// */
|
|
|
+// @PostMapping("turntableUploadSuccess")
|
|
|
+// public ResultData turntableUploadSuccess(String params) throws Exception {
|
|
|
+// return sceneFileBuildService.turntableUploadSuccess(params);
|
|
|
+// }
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * 获取亚马逊S3文件上传url
|
|
|
+// *
|
|
|
+// * @return
|
|
|
+// */
|
|
|
+// @PostMapping("getS3UploadUrl")
|
|
|
+// public ResultData getS3UploadUrl(String params) throws Exception {
|
|
|
+// return sceneFileBuildService.getS3UploadUrl(params);
|
|
|
+// }
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * 计算双目场景 - 新双目相机上传 小红屋
|
|
|
+// *
|
|
|
+// * @return
|
|
|
+// */
|
|
|
+//// @ApiOperation("计算双目场景 - 新双目相机上传 小红屋")
|
|
|
+// @PostMapping("buildLiteScene")
|
|
|
+//// @ApiImplicitParams({
|
|
|
+//// @ApiImplicitParam(name = "prefix", value = "文件下载前缀,结尾不加/", dataType = "String"),
|
|
|
+//// @ApiImplicitParam(name = "dataFdage", value = "dataFdage", dataType = "String"),
|
|
|
+//// @ApiImplicitParam(name = "zipName", value = "zip文件包名称", dataType = "String"),
|
|
|
+//// @ApiImplicitParam(name = "password", value = "密码", dataType = "String"),
|
|
|
+//// @ApiImplicitParam(name = "userName", value = "用户名", dataType = "String")})
|
|
|
+// public ResultData buildLiteScene(String prefix, String dataFdage, String zipName, String userName, String password, String oldNum) throws Exception{
|
|
|
+// return sceneFileBuildService.buildLiteScene(prefix, dataFdage, zipName, userName, password, oldNum);
|
|
|
+//
|
|
|
+//
|
|
|
+// }
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * 获取亚马逊S3文件上传url
|
|
|
+// * @return
|
|
|
+// */
|
|
|
+// @PostMapping("buildScene")
|
|
|
+//// @ApiOperation("获取亚马逊S3文件上传url")
|
|
|
+//// @ApiImplicitParams({
|
|
|
+//// @ApiImplicitParam(name = "unicode", value = "unicode文件夹", dataType = "String"),
|
|
|
+//// @ApiImplicitParam(name = "zip", value = "zip包的名称", dataType = "String"),
|
|
|
+//// @ApiImplicitParam(name = "dataFdage", value = "dataFdage名称", dataType = "String")})
|
|
|
+// public ResultData buildScene(String prefix, String unicode, String zip, String dataFdage) throws Exception{
|
|
|
+// return sceneFileBuildService.buildScene(prefix, unicode, zip, dataFdage);
|
|
|
+// }
|
|
|
+//
|
|
|
+//}
|