月球大数据地理空间分析展示平台-【后端】-月球后台服务
13693261870
2023-11-28 514705c874699fb016ca405961e50dcb15af2648
栅格分析返回值添加图层单位字段
已修改5个文件
32 ■■■■ 文件已修改
src/main/java/com/moon/server/entity/data/AnalysisResultEntity.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/moon/server/entity/data/PublishEntity.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/moon/server/service/data/RasterAnalysisService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/data/PublishMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/moon/server/entity/data/AnalysisResultEntity.java
@@ -58,6 +58,8 @@
    private String info;
    private String unit;
    private List<Point> points;
    public String getToken() {
@@ -116,6 +118,14 @@
        this.info = info;
    }
    public String getUnit() {
        return unit;
    }
    public void setUnit(String unit) {
        this.unit = unit;
    }
    public List<Point> getPoints() {
        return points;
    }
src/main/java/com/moon/server/entity/data/PublishEntity.java
@@ -68,6 +68,8 @@
    private String proxy;
    private String unit;
    public PublishEntity() {
    }
@@ -302,4 +304,12 @@
    public void setProxy(String proxy) {
        this.proxy = proxy;
    }
    public String getUnit() {
        return unit;
    }
    public void setUnit(String unit) {
        this.unit = unit;
    }
}
src/main/java/com/moon/server/service/data/RasterAnalysisService.java
@@ -79,6 +79,7 @@
            try {
                AnalysisResultEntity entity = new AnalysisResultEntity(token);
                entity.setLayerName(pub.getName());
                entity.setUnit(pub.getUnit());
                List<MetaEntity> metas = publishService.selectMetasByPubid(pub.getId());
                if (null == metas || metas.isEmpty()) {
@@ -156,6 +157,7 @@
            try {
                AnalysisResultEntity entity = new AnalysisResultEntity();
                entity.setLayerName(pub.getName());
                entity.setUnit(pub.getUnit());
                List<MetaEntity> metas = publishService.selectMetasByPubid(pub.getId());
                if (null == metas || metas.isEmpty()) {
src/main/resources/application.yml
@@ -46,12 +46,12 @@
  datasource:
    name: prod
    # JDBC 基本配置 &currentSchema=public
    url: jdbc:postgresql://127.0.0.1:5433/moon?useAffectedRows=true
    #url: jdbc:postgresql://192.168.20.83:5433/moon?useAffectedRows=true
    #url: jdbc:postgresql://127.0.0.1:5433/moon?useAffectedRows=true
    url: jdbc:postgresql://192.168.20.83:5433/moon?useAffectedRows=true
    #url: jdbc:postgresql://103.85.165.99:25432/moon?useAffectedRows=true
    username: postgres
    #password: Postgres!_14_moon
    password: postgres
    #password: postgres
    password: Postgres!_14_moon
    driver-class-name: org.postgresql.Driver
    platform: POSTGRESQL
    type: com.alibaba.druid.pool.DruidDataSource
src/main/resources/mapper/data/PublishMapper.xml
@@ -103,7 +103,7 @@
    </select>
    <select id="selectRaster" resultType="com.moon.server.entity.data.PublishEntity">
        select c.cn_name "name", a.*
        select c.cn_name "name", c.unit, a.*
        from lf.sys_publish a inner join lf.sys_res b on a.id = b.pubid
        inner join lf.sys_layer c on b.id = c.resid
        where a.type in ('DOM', 'DEM') and a.status = 3 and c.status = 1;