Kaynağa Gözat

场景中心 test

by su 3 yıl önce
ebeveyn
işleme
4de13dba5d

+ 45 - 73
4dkankan-center-scene/pom.xml

@@ -16,11 +16,11 @@
     </properties>
 
     <dependencies>
-        <dependency>
-            <groupId>com.fdkankan</groupId>
-            <artifactId>4dkankan-center-platform-api</artifactId>
-            <version>2.0.0</version>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>com.fdkankan</groupId>-->
+<!--            <artifactId>4dkankan-center-platform-api</artifactId>-->
+<!--            <version>2.0.0</version>-->
+<!--        </dependency>-->
 
         <dependency>
             <groupId>com.fdkankan</groupId>
@@ -30,80 +30,52 @@
 
         <dependency>
             <groupId>com.fdkankan</groupId>
-            <artifactId>4dkankan-pay</artifactId>
-            <version>2.0.0</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.projectlombok</groupId>
-            <artifactId>lombok</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.fdkankan</groupId>
             <artifactId>4dkankan-pom</artifactId>
             <version>2.0.0</version>
         </dependency>
 
-        <!--      二维码-->
-        <dependency>
-            <groupId>com.github.penggle</groupId>
-            <artifactId>kaptcha</artifactId>
-            <version>2.3.2</version>
-        </dependency>
-        <dependency>
-            <groupId>com.google.zxing</groupId>
-            <artifactId>core</artifactId>
-            <version>2.1</version>
-        </dependency>
-        <dependency>
-            <groupId>com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-            <version>2.8.5</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.qiniu</groupId>
-            <artifactId>qiniu-java-sdk</artifactId>
-            <version>7.2.0</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.fdkankan</groupId>
-            <artifactId>4dkankan-common-mq</artifactId>
-            <version>2.0.0</version>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>com.fdkankan</groupId>-->
+<!--            <artifactId>4dkankan-common-mq</artifactId>-->
+<!--            <version>2.0.0</version>-->
+<!--        </dependency>-->
+
+<!--        <dependency>-->
+<!--            <groupId>com.alibaba.cloud</groupId>-->
+<!--            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>-->
+<!--            <exclusions>-->
+<!--                <exclusion>-->
+<!--                    <artifactId>jackson-annotations</artifactId>-->
+<!--                    <groupId>com.fasterxml.jackson.core</groupId>-->
+<!--                </exclusion>-->
+<!--            </exclusions>-->
+<!--        </dependency>-->
+
+<!--        <dependency>-->
+<!--            <groupId>com.fasterxml.jackson.core</groupId>-->
+<!--            <artifactId>jackson-annotations</artifactId>-->
+<!--            <version>2.12.3</version>-->
+<!--        </dependency>-->
+
+<!--        <dependency>-->
+<!--            <groupId>org.springframework.boot</groupId>-->
+<!--            <artifactId>spring-boot-starter-test</artifactId>-->
+<!--            <scope>test</scope>-->
+<!--            <exclusions>-->
+<!--                <exclusion>-->
+<!--                    <groupId>org.junit.vintage</groupId>-->
+<!--                    <artifactId>junit-vintage-engine</artifactId>-->
+<!--                </exclusion>-->
+<!--                <exclusion>-->
+<!--                    <groupId>junit</groupId>-->
+<!--                    <artifactId>junit</artifactId>-->
+<!--                </exclusion>-->
+<!--            </exclusions>-->
+<!--        </dependency>-->
 
         <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
-            <exclusions>
-                <exclusion>
-                    <artifactId>jackson-annotations</artifactId>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-annotations</artifactId>
-            <version>2.12.3</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-test</artifactId>
-            <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.junit.vintage</groupId>
-                    <artifactId>junit-vintage-engine</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>junit</groupId>
-                    <artifactId>junit</artifactId>
-                </exclusion>
-            </exclusions>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
         </dependency>
 
 

+ 223 - 223
4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/SceneFileController.java

@@ -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);
+//    }
+//
+//}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1713 - 1713
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneFileBuildServiceImpl.java


+ 0 - 53
4dkankan-center-scene/src/test/java/com/fdkankan/SceneApplicationTests.java

@@ -1,53 +0,0 @@
-package com.fdkankan;
-
-import com.fdkankan.scene.service.IFolderService;
-import org.junit.jupiter.api.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.context.annotation.ComponentScan;
-
-@SpringBootTest
-@ComponentScan("*")
-class SceneApplicationTests {
-
-    @Test
-    void contextLoads() {
-    }
-
-//    @Autowired
-//    private MqSendMessage mqSendMessage;
-
-    @Autowired
-    private IFolderService folderService;
-
-    @Test
-    public void test(){
-        // 74ee2ac0175a_202112311529172840:;
-        // /mnt/data/74ee2ac0175a_202112311529172840:;
-        // 74ee2ac0175a/926501950155915264/74ee2ac0175a_202112311529172840/:;
-        // :;
-        // t-cwleTdSN6Q:;
-        // 0:;15676860886:;
-        // 11:;
-        // slam:;
-        // 926501950155915264:;
-        // 4DKKPRO_74EE2AC0175A:;
-        // 0:;
-        // V3
-//        BuildSceneMqMessage message = new BuildSceneMqMessage();
-//        message.setUnicode("74ee2ac0175a_202112311529172840");
-//        message.setPath("/mnt/data/74ee2ac0175a_202112311529172840");
-//        message.setPrefix("74ee2ac0175a/926501950155915264/74ee2ac0175a_202112311529172840/");
-//        message.setImgsName(null);
-//        message.setSceneNum("t-cwleTdSN6Q");
-//        message.setIsModel("0");
-//        message.setUserName("15676860886");
-//        message.setCameraType("11");
-//        message.setAlgorithm("slam");
-//        message.setFileId("926501950155915264");
-//        message.setCameraName("4DKKPRO_74EE2AC0175A");
-//        message.setResolution("0");
-//        message.setBuildType("V3");
-//        mqSendMessage.sendMessage(message);
-    }
-}

+ 26 - 26
4dkankan-center-scene/src/test/java/com/fdkankan/scene/SceneApplicationTests.java

@@ -1,26 +1,26 @@
-package com.fdkankan.scene;
-
-import com.fdkankan.scene.entity.Folder;
-import com.fdkankan.scene.service.IFolderService;
-import org.junit.jupiter.api.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-
-import java.util.List;
-
-@SpringBootTest
-class ApplicationTests {
-
-    @Test
-    void contextLoads() {
-    }
-
-    @Autowired
-    private IFolderService folderService;
-
-    @Test
-    public List<Folder> test(){
-        return folderService.list();
-    }
-
-}
+//package com.fdkankan.scene;
+//
+//import com.fdkankan.scene.entity.Folder;
+//import com.fdkankan.scene.service.IFolderService;
+//import org.junit.jupiter.api.Test;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.boot.test.context.SpringBootTest;
+//
+//import java.util.List;
+//
+//@SpringBootTest
+//class ApplicationTests {
+//
+//    @Test
+//    void contextLoads() {
+//    }
+//
+//    @Autowired
+//    private IFolderService folderService;
+//
+//    @Test
+//    public List<Folder> test(){
+//        return folderService.list();
+//    }
+//
+//}