月球大数据地理空间分析展示平台-【后端】-月球后台服务
13693261870
2023-09-13 86bf08ff8f700356de6b8c68fb4013409499fd55
修改 发布类型 设置
已修改3个文件
36 ■■■■ 文件已修改
src/main/java/com/moon/server/controller/data/PublishController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/moon/server/entity/shujian/TaskResultEntity.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/moon/server/service/data/ShuJianService.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/moon/server/controller/data/PublishController.java
@@ -84,7 +84,7 @@
    private String getType(String type) throws Exception {
        switch (type) {
            case "DOM":
                return "type in ('tif', 'tiff', 'img', 'jp2', 'jpg') and mata_type in (1, 3, 4, 5)";
                return "type in ('tif', 'tiff', 'img', 'jp2', 'jpg') and mata_type in (1, 2, 3, 4, 5)";
            case "DEM":
                return "type in ('tif', 'tiff', 'dem') and mata_type = 2";
            case "Vector":
src/main/java/com/moon/server/entity/shujian/TaskResultEntity.java
@@ -52,16 +52,34 @@
        public Result() {
        }
        /**
         * 任务名称
         */
        private String name;
        /**
         * 任务状态,0:创建,1:初始化,2:执行,3:完成,4:错误,5:取消
         */
        private Integer status;
        /**
         * 任务编号
         */
        private Integer data_id;
        /**
         * 描述
         */
        private String description;
        /**
         * 进度
         */
        private Double process;
        /**
         * 执行的命令
         */
        private Integer command;
        public String getName() {
src/main/java/com/moon/server/service/data/ShuJianService.java
@@ -163,8 +163,7 @@
        CreateLayerEntity.Layer layer = entity.getLayer();
        layer.setName(pub.getName() + "_" + pub.getTime());
        layer.setProjection(getEpsg(pub));
        // layer.setType(TYPES.indexOf(pub.getType()))
        layer.setType(2);
        layer.setType(getPublishType(pub));
        layer.setEnhance_type(pub.getEnhanceType());
        layer.setEnhance_factor(pub.getEnhanceFactor());
        layer.setNodata(getNoData(pub, metas));
@@ -181,6 +180,17 @@
        }
        return entity;
    }
    /**
     * 获取发布类型
     */
    private int getPublishType(PubEntity pub) {
        if (null != pub.getColorTable() || null != pub.getGradientColorTable()) {
            return StaticData.I2;
        }
        return TYPES.indexOf(pub.getType());
    }
    /**
@@ -419,7 +429,7 @@
    }
    /**
     * 插入数简服务
     * 更新数简服务
     */
    public Integer updateSjService(PubEntity pub) {
        PublishEntity entity = publishService.selectById(pub.getPubid());