月球大数据地理空间分析展示平台-【后端】-月球后台服务
13693261870
2023-09-02 e898cd9ca017a6f5bfe4266fcd2830b232047bc8
修改颜色表属性设置
已修改5个文件
148 ■■■■■ 文件已修改
src/main/java/com/moon/server/controller/data/PublishController.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/moon/server/entity/shujian/ColorTableEntity.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/moon/server/entity/shujian/CreateLayerEntity.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/moon/server/entity/shujian/GradientColorTableEntity.java 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/moon/server/service/data/PublishService.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/moon/server/controller/data/PublishController.java
@@ -303,10 +303,7 @@
                return fail("没有找到要删除的数据", -1);
            }
            // publishService.deleteFiles(list)
            permsService.clearPermsCache();
            publishService.deleteFiles(ids, req);
            int count = publishService.deletes(ids, req);
            return success(count);
src/main/java/com/moon/server/entity/shujian/ColorTableEntity.java
@@ -12,6 +12,56 @@
public class ColorTableEntity implements Serializable {
    private static final long serialVersionUID = -7178280280689493423L;
    private short r;
    private short g;
    private short b;
    private double low;
    private double high;
    public ColorTableEntity() {
    }
    public short getR() {
        return r;
    }
    public void setR(short r) {
        this.r = r;
    }
    public short getG() {
        return g;
    }
    public void setG(short g) {
        this.g = g;
    }
    public short getB() {
        return b;
    }
    public void setB(short b) {
        this.b = b;
    }
    public double getLow() {
        return low;
    }
    public void setLow(double low) {
        this.low = low;
    }
    public double getHigh() {
        return high;
    }
    public void setHigh(double high) {
        this.high = high;
    }
}
src/main/java/com/moon/server/entity/shujian/CreateLayerEntity.java
@@ -518,18 +518,30 @@
        private Map<String, Object> config;
        public Process() {
            uuid = StringHelper.getGuid();
            name = "color_table";
            config = new HashMap<>();
            config.put("default", new Default());
        }
        /**
         * 处理过程
         *
         * @param type   0-默认色板,1-渐变色板
         * @param levels 层级
         */
        public Process(Integer type, List<GradientColorTableEntity> levels) {
            uuid = StringHelper.getGuid();
            name = "color_table";
        public Process(Integer type, List<?> levels) {
            this();
            config.put("type", type);
            config.put("levels", levels);
        }
            config = new HashMap<>();
            config.put("default", new Default());
        /**
         * 设置颜色表
         */
        public void SetColorTable(Integer type, List<?> levels) {
            config.put("type", type);
            config.put("levels", levels);
        }
src/main/java/com/moon/server/entity/shujian/GradientColorTableEntity.java
@@ -12,86 +12,86 @@
public class GradientColorTableEntity implements Serializable {
    private static final long serialVersionUID = 3436664443231697504L;
    private Double r_start;
    private short r_start;
    private Double g_start;
    private short g_start;
    private Double b_start;
    private short b_start;
    private Double r_end;
    private short r_end;
    private Double g_end;
    private short g_end;
    private Double b_end;
    private short b_end;
    private Double low;
    private double low;
    private Double high;
    private double high;
    public GradientColorTableEntity() {
    }
    public Double getR_start() {
    public short getR_start() {
        return r_start;
    }
    public void setR_start(Double r_start) {
    public void setR_start(short r_start) {
        this.r_start = r_start;
    }
    public Double getG_start() {
    public short getG_start() {
        return g_start;
    }
    public void setG_start(Double g_start) {
    public void setG_start(short g_start) {
        this.g_start = g_start;
    }
    public Double getB_start() {
    public short getB_start() {
        return b_start;
    }
    public void setB_start(Double b_start) {
    public void setB_start(short b_start) {
        this.b_start = b_start;
    }
    public Double getR_end() {
    public short getR_end() {
        return r_end;
    }
    public void setR_end(Double r_end) {
    public void setR_end(short r_end) {
        this.r_end = r_end;
    }
    public Double getG_end() {
    public short getG_end() {
        return g_end;
    }
    public void setG_end(Double g_end) {
    public void setG_end(short g_end) {
        this.g_end = g_end;
    }
    public Double getB_end() {
    public short getB_end() {
        return b_end;
    }
    public void setB_end(Double b_end) {
    public void setB_end(short b_end) {
        this.b_end = b_end;
    }
    public Double getLow() {
    public double getLow() {
        return low;
    }
    public void setLow(Double low) {
    public void setLow(double low) {
        this.low = low;
    }
    public Double getHigh() {
    public double getHigh() {
        return high;
    }
    public void setHigh(Double high) {
    public void setHigh(double high) {
        this.high = high;
    }
}
src/main/java/com/moon/server/service/data/PublishService.java
@@ -4,10 +4,8 @@
import com.moon.server.entity.all.ResponseMsg;
import com.moon.server.entity.all.StaticData;
import com.moon.server.entity.ctrl.PubEntity;
import com.moon.server.entity.ctrl.RegisterEntity;
import com.moon.server.entity.data.MetaEntity;
import com.moon.server.entity.data.PublishEntity;
import com.moon.server.entity.sys.UserEntity;
import com.moon.server.helper.PathHelper;
import com.moon.server.helper.RestHelper;
import com.moon.server.helper.StringHelper;
@@ -43,13 +41,7 @@
    PublishMapper publishMapper;
    @Resource
    FmeService fmeService;
    @Resource
    PathHelper pathHelper;
    @Resource
    TokenService tokenService;
    private final static Log log = LogFactory.getLog(PublishService.class);
@@ -255,23 +247,6 @@
            String cmd = String.format("cmd /c rd \"%s\" /s /q", path);
            WebHelper.exec(cmd);
        }
    }
    /**
     * 删除发布文件
     */
    public void deleteFiles(List<Integer> ids, HttpServletRequest req) {
        PubEntity entity = new PubEntity();
        entity.setIds(ids);
        entity.setDircode("00");
        UserEntity ue = tokenService.getCurrentUser(req);
        if (ue != null) {
            entity.setUserId(ue.getId());
            entity.setToken(WebHelper.getToken(req));
        }
        long rows = postForPub(entity, "/Convert/DeleteFiles");
    }
    /**