瀏覽代碼

删除无效代码

wuweihao 5 年之前
父節點
當前提交
74888d0e7f

+ 0 - 55
src/main/java/com/fd/controller/ModelController.java

@@ -47,9 +47,6 @@ public class ModelController {
     @Value("${output.file.path.model}")
     private String OUTPUT_FILE_PATH;
 
-//    private static String INPUT_FILE_PATH = "/root/gis/cesium/input/model/";
-//
-//    private static String OUTPUT_FILE_PATH = "/root/gis/cesium/output/model/";
 
     @Autowired
     private AsyncTask asyncTask;
@@ -66,19 +63,11 @@ public class ModelController {
 
 
 
-    @GetMapping("test")
-    private void test(){
-        log.info("path: {}", OUTPUT_FILE_PATH);
-        log.info("path input: {}", INPUT_FILE_PATH);
-    }
-
-
     @ApiOperation("上传数据,校验文件名")
     @GetMapping("check/{fileName}/")
     private R checkFileName(@PathVariable("fileName") String fileName) {
         log.info("run checkFileName {}",fileName);
 
-//        ModelServer modelServer = SpringContext.getBean(ModelServerImpl.class);
 
         // 文件是否包含中文字符
         if (RegexUtils.regexChinese(fileName)) {
@@ -102,7 +91,6 @@ public class ModelController {
     private R upload(@RequestParam("file") MultipartFile file) {
         log.info("run upload");
 
-//        ModelServer modelServer = SpringContext.getBean(ModelServerImpl.class);
 
         // 文件名全名
         String fileName = file.getOriginalFilename();
@@ -130,7 +118,6 @@ public class ModelController {
     private R fileUnzip(@PathVariable("fileId") Long fileId) {
         log.info("run fileUnzip: {}", fileId);
 
-//        ModelServer modelServer = SpringContext.getBean(ModelServerImpl.class);
         OutputFileEntity entity = modelServer.findById(fileId);
 
         String outputPath = OUTPUT_FILE_PATH + "unzip";
@@ -157,7 +144,6 @@ public class ModelController {
     @ApiOperation("获取3D模型数据列表")
     @PostMapping(value = "list")
     private R list(@RequestBody PageDto param) {
-//        ModelServer modelServer = SpringContext.getBean(ModelServerImpl.class);
         return modelServer.findByType(TypeCode.FILE_TYPE_MODEL, param);
     }
 
@@ -167,7 +153,6 @@ public class ModelController {
     @GetMapping("delete/{fileId}/")
     private R deleteFile(@PathVariable("fileId") Long fileId) {
         log.info("run deleteFile: {}", fileId);
-//        ModelServer modelServer = SpringContext.getBean(ModelServerImpl.class);
         OutputFileEntity entity = modelServer.findById(fileId);
         entity.setResStatus(1);
         modelServer.save(entity);
@@ -181,20 +166,12 @@ public class ModelController {
     }
 
 
-//    @Async("taskExecutor")
-//    public void runDeleteThread(Long fileId, ModelServer modelServerv) {
-//        log.info("run runDeleteThread");
-//        modelServerv.deleteById(fileId);
-//        log.info("end runDeleteThread id : {}", fileId);
-//    }
-
 
 
     @ApiOperation("倾斜摄影数据切片")
     @GetMapping("command/osgb/{fileId}/")
     private R cmdModelSlice(@PathVariable("fileId") Long fileId) {
         log.info("run cmdModelSlice: {}", fileId);
-//        ModelServer modelServer = SpringContext.getBean(ModelServerImpl.class);
         OutputFileEntity entity = modelServer.findById(fileId);
 
 
@@ -240,44 +217,12 @@ public class ModelController {
 
     }
 
-//    @Async("taskExecutor")
-//    public void sliceThread(BlockingQueue<MyQueue> queue, ModelServer modelServer){
-//        try {
-//            MyQueue data = queue.poll(2, TimeUnit.SECONDS);
-//            if (data != null) {
-//                log.warn("run ModelSliceConsumerThread");
-//                log.info("cmd: {}", data.getStr());
-//                Integer integer = modelServer.cmdSlice(data.getStr());
-//                OutputFileEntity entity = data.getOutputFile();
-//
-//                if (integer != 0) {
-//                    log.info("error command sliceThread");
-//                    // 如果命令运行失败,删除刚才创建的实体类
-//                    // o:代表切片失败
-//                    entity.setStatus(0);
-//                    entity.setUpdateTime(new Date());
-//                    modelServer.save(entity);
-//                    return;
-//                }
-//
-//                entity.setStatus(5);
-//                entity.setUpdateTime(new Date());
-//                modelServer.save(entity);
-//                log.warn("end ModelSliceConsumerThread");
-//            }
-//        } catch (Exception e) {
-//            Thread.currentThread().interrupt();
-//            e.printStackTrace();
-//        }
-//
-//    }
 
 
     @ApiOperation("移动数据到服务器上")
     @PostMapping("move/{fileId}/")
     private R moveFile(@PathVariable("fileId") Long fileId, @RequestBody ConfigJsonDto param) {
         log.info("run moveFile: {}", fileId);
-//        ModelServer modelServer = SpringContext.getBean(ModelServerImpl.class);
         return modelServer.moveFileToServer(fileId, param);
     }
 

+ 2 - 185
src/main/java/com/fd/controller/RasterController.java

@@ -58,10 +58,6 @@ public class RasterController {
     @Autowired
     private RasterServer rasterServer;
 
-//    private static String INPUT_FILE_PATH = "/root/gis/cesium/input/raster/";
-//
-//    private static String OUTPUT_FILE_PATH = "/root/gis/cesium/output/raster/";
-
 
     private static BlockingQueue<MyQueue> sliceQueue = new LinkedBlockingQueue<MyQueue>(2);
 
@@ -75,7 +71,6 @@ public class RasterController {
     private R checkFileName(@PathVariable("fileName") String fileName) {
         log.info("run checkFileName: {}",fileName);
 
-//        RasterServer rasterServer = SpringContext.getBean(RasterServerImpl.class);
 
 
         // 文件是否包含中文字符
@@ -105,7 +100,6 @@ public class RasterController {
         log.info("coord: {}", Arrays.toString(coord));
         String strCoord = Arrays.toString(coord);
 
-//        RasterServer rasterServer = SpringContext.getBean(RasterServerImpl.class);
 
         // 文件名全名
         String fileName = file.getOriginalFilename();
@@ -174,7 +168,6 @@ public class RasterController {
     @ApiOperation("获取栅格数据列表")
     @PostMapping(value = "list")
     private R list(@RequestBody PageDto param){
-//        RasterServer rasterServer = SpringContext.getBean(RasterServerImpl.class);
         return rasterServer.findByType(TypeCode.FILE_TYPE_RASTER, param);
     }
 
@@ -184,7 +177,6 @@ public class RasterController {
     @GetMapping("delete/{fileId}/")
     private R deleteFile(@PathVariable("fileId") Long fileId) {
         log.info("run deleteFile: {}", fileId);
-//        RasterServer rasterServer = SpringContext.getBean(RasterServerImpl.class);
 
         OutputFileEntity entity = rasterServer.findById(fileId);
         entity.setResStatus(1);
@@ -194,19 +186,13 @@ public class RasterController {
         fileEntity.setResStatus(1);
         rasterServer.saveInputFile(fileEntity);
 
-//        runDeleteThread(fileId, rasterServer);
         asyncTask.rasterDelete(fileId, rasterServer);
 
         log.info("delete raster id: {}", fileId);
         return new R(200, MsgCode.SUCCESS);
     }
 
-//    @Async("taskExecutor")
-//    public void runDeleteThread(Long fileId, RasterServer rasterServer) {
-//        log.info("run RasterDeleteThread");
-//        rasterServer.deleteById(fileId);
-//        log.info("end RasterDeleteThread: {}", fileId);
-//    }
+
 
 
 
@@ -215,7 +201,6 @@ public class RasterController {
     private R cmdJudgeCoord(@PathVariable("fileId") Long fileId) {
         log.info("run cmdJudgeCoord: {}", fileId);
 
-//        RasterServer rasterServer = SpringContext.getBean(RasterServerImpl.class);
 
         OutputFileEntity entity = rasterServer.findById(fileId);
 
@@ -247,7 +232,6 @@ public class RasterController {
             log.info("coord entity: {}",entity);
             log.info("coord producer update time: {}", entity.getUpdateTime());
 
-//            judgeCoordConsumerThread(coordQueue, rasterServer);
             asyncTask.rasterJudgeCoordConsumerThread(coordQueue, rasterServer, OUTPUT_FILE_PATH);
 
             return new R(200, entity);
@@ -255,54 +239,6 @@ public class RasterController {
         return new R(52000, MsgCode.E52000);
     }
 
-//    @Async("taskExecutor")
-//    public void judgeCoordConsumerThread(BlockingQueue<MyQueue> queue, RasterServer rasterServer){
-//        MyQueue data = null;
-//        try {
-//            data = queue.poll(3, TimeUnit.SECONDS);
-//
-//            if (data != null) {
-//                log.warn("run JudgeCoordConsumerThread");
-//
-//                // 先让它等一秒
-//                log.info("start time: {}", new Date());
-//                Thread.sleep(2000);
-//                log.info("end time: {}", new Date());
-//
-//                OutputFileEntity  entity = data.getOutputFile();
-//
-//                log.info("CoordType: {}", entity.getCoordType());
-//
-//                if (TypeCode.COORD_XIAN_1980.equals(entity.getCoordType())){
-//                    log.info("need to transform");
-//                    // 严格坐标转换
-//                    entity = cmdTansformGdalwarpStrict(entity, rasterServer);
-//                } else if (TypeCode.COORD_WGS84.equals(entity.getCoordType())){
-//                    log.info("not to transform");
-//                    // 4:未切片
-//                    entity.setStatus(4);
-//                    // 不需要转,就把上传文件路径复制到严格坐标路径上
-//                    entity.setCoordStrictPath(entity.getUploadPath());
-//                    entity.setUpdateTime(new Date());
-//                    entity = rasterServer.save(entity);
-//                    log.info("coord Consumer update time: {}", entity.getUpdateTime());
-//                    log.info("JudgeCoordConsumerThread update entity: {}", entity);
-//                } else {
-//                    log.info("error exeCmd");
-//                    entity.setStatus(0);
-//                    entity.setUpdateTime(new Date());
-//                    rasterServer.save(entity);
-//                }
-//                log.warn("end JudgeCoordConsumerThread id: {}", entity.getId());
-//
-//            }
-//
-//        } catch (Exception e) {
-//            Thread.currentThread().interrupt();
-//            e.printStackTrace();
-//        }
-//
-//    }
 
 
     @ApiOperation("栅格数据切片命令")
@@ -316,8 +252,7 @@ public class RasterController {
         if (!RegexUtils.regexInt(layerMax)){
             return new R(50010, MsgCode.E50010) ;
         }
-//        RasterServer rasterServer = SpringContext.getBean(RasterServerImpl.class);
-//        CmdServer cmdServer = SpringContext.getBean(CmdServerImpl.class);
+
 
         OutputFileEntity entity = rasterServer.findById(fileId);
 
@@ -360,7 +295,6 @@ public class RasterController {
 
             entity = rasterServer.save(entity);
 
-//            sliceThread(sliceQueue, rasterServer);
             asyncTask.rasterSliceThread(sliceQueue, rasterServer);
 
             return new R(200, entity) ;
@@ -368,44 +302,11 @@ public class RasterController {
         return new R(52000, MsgCode.E52000);
     }
 
-//    @Async("taskExecutor")
-//    public void sliceThread(BlockingQueue<MyQueue> queue, RasterServer rasterServer) {
-//        try {
-//            MyQueue data = queue.poll(2, TimeUnit.SECONDS);
-//            if (data != null) {
-//                log.warn("run SliceConsumerThread");
-//                OutputFileEntity  entity = data.getOutputFile();
-//                log.info("raster cmd: {}", data.getStr());
-//                Integer integer = rasterServer.cmdSlice(data.getStr(), entity);
-//                if (integer != 0) {
-//                    log.info("error command exeCmdRasterSlice");
-//                    // 如果命令运行失败,状态改为0
-//                    entity.setStatus(0);
-//                    entity.setUpdateTime(new Date());
-//                    rasterServer.save(entity);
-//                    return;
-//                }
-//                // 切片完成,修改完成状态
-//                entity.setStatus(5);
-//                entity.setUpdateTime(new Date());
-//                rasterServer.save(entity);
-//                log.warn("end SliceConsumerThread");
-//            }
-//        } catch (Exception e) {
-//            Thread.currentThread().interrupt();
-//            e.printStackTrace();
-//        }
-//
-//
-//    }
-
-
 
 
     @ApiOperation("栅格数据进度查询")
     @GetMapping("progress/{fileId}/")
     private R getProgress(@PathVariable("fileId") Long fileId) {
-//        RasterServer rasterServer = SpringContext.getBean(RasterServerImpl.class);
         OutputFileEntity entity = rasterServer.findById(fileId);
         return new R(200, entity);
     }
@@ -415,92 +316,8 @@ public class RasterController {
     @PostMapping("move/{fileId}/")
     private R moveFile(@PathVariable("fileId") Long fileId, @RequestBody ConfigJsonDto param) {
         log.info("run moveFile: {}", fileId);
-//        RasterServer rasterServer = SpringContext.getBean(RasterServerImpl.class);
         return rasterServer.moveFileToServer(fileId, param);
     }
 
 
-
-//    /**
-//     * 严格坐标转换
-//     */
-//    private OutputFileEntity cmdTansformGdalwarpStrict(OutputFileEntity entity, RasterServer rasterServer){
-//        log.info("run cmdTansformGdalwarpStrict");
-//
-//
-//        String fileName = StringUtils.substringBeforeLast(entity.getFileName(), ".");
-//
-//        String outFileStep1 = OUTPUT_FILE_PATH + "transform";
-//        FileUtils.createDir(outFileStep1);
-//        outFileStep1 = outFileStep1 + File.separator + entity.getFileName();
-//
-//        // 坐标处理
-//        String coord = entity.getCoord();
-//        log.info("convert coord: {}", coord);
-//        JSONArray array = JSON.parseArray(coord);
-//
-//        String step_1 = Command.RASTER_TRANSFORM_GDALWARP_STRICT_1;
-//        step_1 = step_1.replace("@inputFile", entity.getUploadPath());
-//        step_1 = step_1.replace("@outputFile", outFileStep1);
-//
-//
-//        // 3位数坐标
-//        if (array.size() == 3) {
-//            step_1 = step_1.replace("@x", array.getString(0));
-//            step_1 = step_1.replace("@y", array.getString(1));
-//            step_1 = step_1.replace("@z", array.getString(2));
-//            step_1 = step_1.replace("@rx","0");
-//            step_1 = step_1.replace("@ry","0");
-//            step_1 = step_1.replace("@rz","0");
-//
-//            // 坐标为空时
-//        } else if (array.size() == 0) {
-//            step_1 = step_1.replace("@x","0");
-//            step_1 = step_1.replace("@y","0");
-//            step_1 = step_1.replace("@z","0");
-//            step_1 = step_1.replace("@rx","0");
-//            step_1 = step_1.replace("@ry","0");
-//            step_1 = step_1.replace("@rz","0");
-//
-//            // 6位数坐标
-//        }else  {
-//            step_1 = step_1.replace("@x", array.getString(0));
-//            step_1 = step_1.replace("@y", array.getString(1));
-//            step_1 = step_1.replace("@z", array.getString(2));
-//            step_1 = step_1.replace("@rx",array.getString(3));
-//            step_1 = step_1.replace("@ry",array.getString(4));
-//            step_1 = step_1.replace("@rz",array.getString(5));
-//        }
-//
-//
-//        String step_2 = Command.RASTER_TRANSFORM_GDALWARP_STRICT_2;
-//
-//
-//        String outFileStep2 = OUTPUT_FILE_PATH + "transform_strict";
-//        FileUtils.createDir(outFileStep2);
-//        outFileStep2 = outFileStep2 + File.separator + entity.getFileName();
-//
-//        step_2 = step_2.replace("@inputFile", outFileStep1);
-//        step_2 = step_2.replace("@outputFile", outFileStep2);
-//        log.info("cmd1: {}", step_1);
-//        log.info("cmd2: {}", step_2);
-//
-//        Integer integer = rasterServer.exeCmd(step_1, step_2);
-//
-//        if (integer != 0) {
-//            log.info("error command transform");
-//            return null;
-//        }
-//
-//        entity.setStatus(4);
-//        entity.setUpdateTime(new Date());
-//        entity.setCoordGeneralPath(outFileStep1);
-//        entity.setCoordStrictPath(outFileStep2);
-//
-//        entity = rasterServer.save(entity);
-//
-//        return entity;
-//    }
-
-
 }

+ 2 - 212
src/main/java/com/fd/controller/VectorController.java

@@ -49,11 +49,6 @@ import java.util.concurrent.TimeUnit;
 @RestController
 public class VectorController {
 
-////    @Value("${input.file.path.vector}")
-//    private static String INPUT_FILE_PATH = "/root/gis/cesium/input/vector/";
-//
-////    @Value("${output.file.path.vector}")
-//    private static String OUTPUT_FILE_PATH = "/root/gis/cesium/output/vector/";
 
     @Value("${input.file.path.vector}")
     private String INPUT_FILE_PATH;
@@ -92,28 +87,9 @@ public class VectorController {
 
     private static BlockingQueue<MyQueue> vectorSliceQueue = new LinkedBlockingQueue<MyQueue>(2);
 
-    @GetMapping("test")
-    private void test(){
-        log.info("path: {}", OUTPUT_FILE_PATH);
-        log.info("path input: {}", INPUT_FILE_PATH);
-    }
 
 
-    /**
-     * 初始化队列
-     *
-     * @return
-     */
-//    @PostConstruct
-//    private void init() {
-//
-//        // 判断坐标消费队列
-//        new Thread(new VectorJudgeCoordConsumerThread(vectorCoordQueue)).start();
-//
-//
-//        new Thread(new VectorSliceThread(vectorSliceQueue)).start();
-//
-//    }
+
 
 
     @ApiOperation("上传矢量数据, coord:坐标(可以为空), 坐标格式:0,0,0,0,0,0,0")
@@ -128,7 +104,6 @@ public class VectorController {
         if (RegexUtils.regexChinese(directoryName)) {
             return new R(51005, MsgCode.E51005);
         }
-//        VectorServer vectorServer = SpringContext.getBean(VectorServerImpl.class);
         List<FileEntity> directory = vectorServer.findByDirectory(directoryName);
         if (directory.size() > 0) {
             return new R(51006, MsgCode.E51006);
@@ -211,7 +186,6 @@ public class VectorController {
     @ApiOperation("获取矢量数据列表")
     @PostMapping(value = "list")
     private R list(@RequestBody PageDto param) {
-//        VectorServer vectorServer = SpringContext.getBean(VectorServerImpl.class);
         return vectorServer.findByType(TypeCode.FILE_TYPE_VECTOR, param);
     }
 
@@ -225,7 +199,6 @@ public class VectorController {
     @GetMapping("delete/{fileId}/")
     private R deleteFile(@PathVariable("fileId") Long fileId) {
         log.info("run deleteFile: {}", fileId);
-//        VectorServer vectorServer = SpringContext.getBean(VectorServerImpl.class);
         OutputFileEntity entity = vectorServer.findById(fileId);
         entity.setResStatus(1);
         vectorServer.save(entity);
@@ -234,19 +207,12 @@ public class VectorController {
         fileEntity.setResStatus(1);
         fileEntity = vectorServer.saveInputFile(fileEntity);
 
-//        new Thread(new DeleteThread(fileId)).start();
-//        deleteThread(fileId, vectorServer);
         asyncTask.vectorDelete(fileId, vectorServer);
         log.info("end delete vector id");
         return new R(200, MsgCode.SUCCESS);
     }
 
-//    @Async("taskExecutor")
-//    public void deleteThread(Long fileId, VectorServer vectorServer){
-//        log.info("run deleteThread");
-//        vectorServer.deleteById(fileId);
-//        log.info("end deleteThread id : {}", fileId);
-//    }
+
 
 
 
@@ -254,7 +220,6 @@ public class VectorController {
     @GetMapping("command/judge/coord/{fileId}/")
     private R cmdJudgeCoord(@PathVariable("fileId") Long fileId) {
         log.info("run cmdJudgeCoord: {}", fileId);
-//        VectorServer vectorServer = SpringContext.getBean(VectorServerImpl.class);
 
         OutputFileEntity entity = vectorServer.findById(fileId);
 
@@ -288,7 +253,6 @@ public class VectorController {
             entity.setStatus(9);
             entity = vectorServer.save(entity);
 
-//            convertCoordThread(vectorCoordQueue, vectorServer);
             asyncTask.vectorConvertCoordThread(vectorCoordQueue, vectorServer, OUTPUT_FILE_PATH);
 
             return new R(200, entity);
@@ -299,80 +263,6 @@ public class VectorController {
     }
 
 
-//    /**
-//     * 坐标判断消费队列
-//     * 矢量数据转坐标只转一次就成功了。
-//     * 所以转换的成功的路径都放到strictCoordTransform 路径
-//     * 文件都放transform 目录
-//     */
-//    @Async("taskExecutor")
-//    public void convertCoordThread (BlockingQueue<MyQueue> queue, VectorServer vectorServer){
-//        try {
-//            MyQueue data = queue.poll(2, TimeUnit.SECONDS);
-//            if (data != null) {
-//                log.info("run convertCoordThread 出队");
-//                Thread.sleep(2000);
-//                OutputFileEntity entity = data.getOutputFile();
-//                // 坐标处理
-//                String coord = entity.getCoord();
-//                log.info("convert coord: {}", coord);
-//                JSONArray arrayCoord = JSON.parseArray(coord);
-//
-//
-//                // 转换坐标 普通坐标转换
-//                if (TypeCode.COORD_SYSTEM_2000.equals(entity.getCoordType())) {
-//                    // 普通坐标转换
-//                    log.info("need to general transform");
-//                    if (arrayCoord.size() == 0) {
-//                        // 没有坐标参数,执行普通坐标转换(ogrinfo)
-//                        log.info("run generalCoordTransform");
-//                        entity = generalCoordTransform(entity, Command.VECTOR_TRANSFORM_GENERAL, vectorServer);
-//
-//                    } else {
-//                        // 有坐标参数,执行严格坐标转换(CGCS2000转wgs80)
-//                        log.info("run strictCoordTransform");
-//                        entity = strictCoordTransform(entity, Command.VECTOR_TRANSFORM_STRICT_WGS80, vectorServer);
-//                    }
-//
-//                } else if (TypeCode.COORD_XIAN_1980.equals(entity.getCoordType())) {
-//
-//                    // 严格坐标转换 (西安80转wgs84),需要参数
-//                    log.info("need to strict transform, CoordType: {}", entity.getCoordType());
-//                    if (arrayCoord.size() == 0) {
-//                        log.info("error: {}", MsgCode.E50009);
-//                        entity.setStatus(7);
-//                        entity.setUpdateTime(new Date());
-//                        vectorServer.save(entity);
-//                    } else {
-//                        log.info("run strictCoordTransform");
-//                        entity = strictCoordTransform(entity, Command.VECTOR_TRANSFORM_STRICT_WGS84, vectorServer);
-//                    }
-//
-//                } else if (TypeCode.COORD_WGS84.equals(entity.getCoordType())) {
-//                    // 不转换坐标 把文件信息移动到CoordStrictPath 这路径下
-//                    log.info("not to transform");
-//
-//                    entity.setCoordStrictPath(entity.getUploadPath());
-//                    entity.setUpdateTime(new Date());
-//                    entity.setStatus(3);
-//                    entity.setCoordType(TypeCode.COORD_WGS84);
-//                    vectorServer.save(entity);
-//                } else {
-//                    log.info("error exeCmd");
-//                    entity.setStatus(7);
-//                    entity.setUpdateTime(new Date());
-//                    vectorServer.save(entity);
-//                }
-//                log.info("end convertCoordThread id: {}", entity.getId());
-//            }
-//        } catch (Exception e) {
-//            Thread.currentThread().interrupt();
-//            log.error("error vector consume queue VectorJudgeCoordConsumerThread: {}", e);
-//            throw new RuntimeException(e);
-//
-//
-//        }
-//    }
 
 
 
@@ -380,7 +270,6 @@ public class VectorController {
     @GetMapping("command/geojson/{fileId}/")
     private R cmdGeojson(@PathVariable("fileId") Long fileId) {
         log.info("run cmdGeojson: {}", fileId);
-//        VectorServer vectorServer = SpringContext.getBean(VectorServerImpl.class);
         OutputFileEntity entity = vectorServer.findById(fileId);
 
         String fileName = StringUtils.substringBefore(entity.getFileName(), ".");
@@ -400,7 +289,6 @@ public class VectorController {
         log.info("cmd: {}", cmd);
 
 
-//        Integer integer = cmdServer.exeCmdInt(cmd);
         Integer integer = vectorServer.exeCmd(cmd);
         if (integer != 0) {
             return new R(50005, MsgCode.E50005);
@@ -420,7 +308,6 @@ public class VectorController {
     private R cmdSlice(@PathVariable("fileId") Long fileId, @PathVariable("layerMin") String layerMin, @PathVariable("layerMax") String layerMax) {
         log.info("run cmdSlice: {}", fileId);
 
-//        VectorServer vectorServer = SpringContext.getBean(VectorServerImpl.class);
 
         if (!RegexUtils.regexInt(layerMin)) {
             return new R(50010, MsgCode.E50010);
@@ -464,7 +351,6 @@ public class VectorController {
             entity.setLayerMax(Integer.valueOf(layerMax));
             entity = vectorServer.save(entity);
 
-//            sliceThread(vectorSliceQueue, vectorServer);
             asyncTask.vectorSliceThread(vectorSliceQueue, vectorServer);
 
             return new R(200, entity);
@@ -473,41 +359,11 @@ public class VectorController {
     }
 
 
-//    private void sliceThread(BlockingQueue<MyQueue> queue, VectorServer vectorServer){
-//        try {
-//            MyQueue data = queue.poll(4, TimeUnit.SECONDS);
-//            if (data != null) {
-//                log.warn("run SliceVectorThread");
-//
-//                OutputFileEntity entity = data.getOutputFile();
-//                log.info("slice cmd: {}", data.getStr());
-//                Integer integer =  vectorServer.cmdSlice(data.getStr(), entity);
-//                if (integer != 0) {
-//                    log.info("error command exeCmdVectorSlice");
-//                    // 如果命令运行失败,状态改为0
-//                    entity.setStatus(0);
-//                    entity.setUpdateTime(new Date());
-//                    vectorServer.save(entity);
-//                    return;
-//                }
-//                // 切片完成,修改完成状态
-//                entity.setStatus(5);
-//                entity.setUpdateTime(new Date());
-//                vectorServer.save(entity);
-//                log.warn("end SliceVectorThread");
-//            }
-//        } catch (Exception e) {
-//            Thread.currentThread().interrupt();
-//            log.error("error  consume queue vector SliceConsumerThread: {}", e);
-//            e.printStackTrace();
-//        }
-//    }
 
 
     @ApiOperation("矢量数据进度查询")
     @GetMapping("progress/{fileId}/")
     private R getProgress(@PathVariable("fileId") Long fileId) {
-//        VectorServer vectorServer = SpringContext.getBean(VectorServerImpl.class);
         OutputFileEntity entity = vectorServer.findById(fileId);
         return new R(200, entity);
     }
@@ -516,7 +372,6 @@ public class VectorController {
     @PostMapping("move/{fileId}/")
     private R moveFile(@PathVariable("fileId") Long fileId, @RequestBody ConfigJsonDto param) {
         log.info("run moveFile: {}", fileId);
-//        VectorServer vectorServer = SpringContext.getBean(VectorServerImpl.class);
         return vectorServer.moveFileToServer(fileId, param);
     }
 
@@ -526,7 +381,6 @@ public class VectorController {
     @PostMapping("style/save/")
     private R saveStyle(@RequestBody StyleDto param) {
         log.info("run saveStyle");
-//        VectorServer vectorServer = SpringContext.getBean(VectorServerImpl.class);
         return vectorServer.editStyle(param);
     }
 
@@ -534,73 +388,9 @@ public class VectorController {
     @GetMapping("style/get/{fileId}/")
     private R getStyle(@PathVariable("fileId") Long fileId) {
         log.info("run getStyle: {}", fileId);
-//        VectorServer vectorServer = SpringContext.getBean(VectorServerImpl.class);
         return vectorServer.getStyle(fileId);
     }
 
 
-//    /**
-//     * 普通坐标转换
-//     */
-//    private OutputFileEntity generalCoordTransform(OutputFileEntity entity, String cmd, VectorServer vectorServer) {
-//
-//        String directory = createDirectory(entity);
-//        directory = directory + File.separator + entity.getFileName();
-//
-//        cmd = cmd.replace("@inputFile", entity.getUploadPath());
-//        cmd = cmd.replace("@outputFile", directory);
-//        log.info("cmd: {}", cmd);
-//        return runCmd(cmd, entity, null, directory, vectorServer);
-//    }
-//
-//
-//    // 严格坐标转换
-//    private OutputFileEntity strictCoordTransform(OutputFileEntity entity, String cmd, VectorServer vectorServer) {
-//
-//        String directory = createDirectory(entity);
-//        directory = directory + File.separator + entity.getFileName();
-//        String coord = entity.getCoord();
-//        coord = coord.replace("[", "");
-//        coord = coord.replace("]", "");
-//        // 去空格
-//        coord = StringUtils.deleteWhitespace(coord);
-//
-//        cmd = cmd.replace("@coord", coord);
-//        cmd = cmd.replace("@inputFile", entity.getUploadPath());
-//        cmd = cmd.replace("@outputFile", directory);
-//        log.info("cmd: {}", cmd);
-//
-//        return runCmd(cmd, entity, null, directory, vectorServer);
-//    }
-//
-//    // 创建目录
-//    private String createDirectory(OutputFileEntity entity) {
-//        String directory = OUTPUT_FILE_PATH + "transform" + File.separator + entity.getDirectory();
-//        FileUtils.createDir(directory);
-//        return directory;
-//    }
-//
-//    // 执行命令,创建对象, 坐标转换使用
-//    private OutputFileEntity runCmd(String cmd, OutputFileEntity entity, String generalPath, String strictPath, VectorServer vectorServer) {
-//        Integer integer = vectorServer.exeCmd(cmd);
-//        // 转换坐标失败, 修改状态
-//        if (integer != 0) {
-//            entity.setUpdateTime(new Date());
-//            entity.setStatus(7);
-//            entity = vectorServer.save(entity);
-//            return null;
-//        }
-//
-//        entity.setFileName(entity.getFileName());
-//        entity.setCoordGeneralPath(generalPath);
-//        entity.setCoordStrictPath(strictPath);
-//        entity.setUpdateTime(new Date());
-//        entity.setStatus(3);
-//
-//        entity = vectorServer.save(entity);
-//
-//        return entity;
-//
-//    }
 
 }