月球大数据地理空间分析展示平台-【后端】-月球后台服务
13693261870
2023-09-05 39217027e80fdb178243986c03d136419039ee86
修改发布实体类的设置
已修改2个文件
53 ■■■■■ 文件已修改
src/main/java/com/moon/server/entity/shujian/CreateLayerEntity.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/moon/server/service/data/ShuJianService.java 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/moon/server/entity/shujian/CreateLayerEntity.java
@@ -147,7 +147,7 @@
        /**
         * 发布信息,默认为"{}"
         */
        private Object pub_config;
        private String pub_config;
        /**
         * 图层和影像相关的配置,默认"{}",配置内容包括但不限于:处理过程、边界控制方法
@@ -170,7 +170,6 @@
            stats_type = 1;
            enhance_type = 0;
            boundary_cal_mode = 0;
            pub_config = new Object();
        }
        public String getName() {
@@ -253,11 +252,11 @@
            this.end_scale = end_scale;
        }
        public Object getPub_config() {
        public String getPub_config() {
            return pub_config;
        }
        public void setPub_config(Object pub_config) {
        public void setPub_config(String pub_config) {
            this.pub_config = pub_config;
        }
@@ -396,7 +395,7 @@
        /**
         * 属性过滤
         */
        private Object attr_filter;
        private String attr_filter;
        public ImageList() {
            datasource = "Local";
@@ -426,11 +425,11 @@
            this.image_time = image_time;
        }
        public Object getAttr_filter() {
        public String getAttr_filter() {
            return attr_filter;
        }
        public void setAttr_filter(Object attr_filter) {
        public void setAttr_filter(String attr_filter) {
            this.attr_filter = attr_filter;
        }
    }
src/main/java/com/moon/server/service/data/ShuJianService.java
@@ -80,7 +80,8 @@
     */
    public Integer insertSjService(PubEntity pub) {
        CreateLayerEntity layerEntity = createLayerEntity(pub);
        Integer layerId = postLayerEntity(layerEntity);
        // Integer layerId = postLayerEntity(layerEntity)
        Integer layerId = 10002101;
        if (null == layerId) {
            return 0;
        }
@@ -229,20 +230,25 @@
     */
    public PublishEntity createPublishEntity(PubEntity pub, Integer layerId, Integer serviceId) {
        PublishEntity entity = new PublishEntity();
        entity.setType(pub.getType());
        entity.setLayerid(layerId);
        entity.setServiceid(serviceId);
        entity.setEventid(pub.getUuid());
        entity.setName(pub.getName());
        entity.setUrl(String.format(TYPES.get(0).equals(pub.getType()) ? DOM_FORMAT : DEM_FORMAT, sjUrl, serviceId, StaticData.I0));
        entity.setPath(null);
        entity.setType(pub.getType());
        entity.setStatus(3);
        entity.setDirid(pub.getDircode());
        entity.setDepid(pub.getDepcode());
        entity.setEnhanceType(pub.getEnhanceType());
        entity.setMin(pub.getMin());
        entity.setMax(pub.getMax());
        entity.setEpsg(pub.getEpsg());
        entity.setCreateUser(pub.getUserId());
        entity.setDirid(pub.getDircode());
        entity.setDepid(pub.getDepcode());
        entity.setStatus(3);
        entity.setLayerid(layerId);
        entity.setServiceid(serviceId);
        entity.setEventid(pub.getUuid());
        entity.setJson(getColorTableJson(pub));
        entity.setUrl(String.format(TYPES.get(0).equals(pub.getType()) ? DOM_FORMAT : DEM_FORMAT, sjUrl, serviceId, StaticData.I0));
        entity.setCtType(getColorTableType(pub));
        entity.setCtJson(getColorTableJson(pub));
        entity.setCreateUser(pub.getUserId());
        entity.setGeom("null");
        return entity;
    }
@@ -273,6 +279,20 @@
    }
    /**
     * 获取颜色表类型
     */
    private String getColorTableType(PubEntity pub) {
        if (null == pub.getColorTable() && null == pub.getGradientColorTable()) {
            return null;
        }
        if (null != pub.getGradientColorTable()) {
            return "渐变颜色表";
        }
        return "普通颜色表";
    }
    /**
     * 获取颜色表的JSON字符串
     */
    public String getColorTableJson(PubEntity pub) {