管道基础大数据平台系统开发-【后端】-Server
13693261870
2024-03-12 7bfbdcdab10c58ecf96b45543c0d0df948af4ba5
修改根据类型查询元数据方法
已修改4个文件
36 ■■■■ 文件已修改
src/main/java/com/lf/server/mapper/show/OneMapMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/service/data/FmeService.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/service/show/OneMapService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/show/OneMapMapper.xml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/mapper/show/OneMapMapper.java
@@ -251,5 +251,6 @@
     *
     * @return
     */
    public List<IdNameEntity> selectMetaByType();
    @MapKey("")
    public List<Map<String, Object>> selectMetaByType();
}
src/main/java/com/lf/server/service/data/FmeService.java
@@ -317,6 +317,23 @@
    }
    /**
     * f.计算面积
     */
    public String calcArea(String sjfl, String id, String wjlj, HttpServletRequest req) {
        String url = getUrl("datax/task/run/数据占地面积计算", req);
        List<NameValueEntity> list = new ArrayList<>();
        list.add(new NameValueEntity("_name", String.format("%s_%s", "数据占地面积计算", StringHelper.YMDHMS2_FORMAT.format(new Date()))));
        list.add(new NameValueEntity("_terminate_on_error", false));
        list.add(new NameValueEntity("_priority", 100));
        list.add(new NameValueEntity("SJFL", sjfl));
        list.add(new NameValueEntity("ID", id));
        list.add(new NameValueEntity("WJLJ", wjlj));
        return RestHelper.postForRest(url, list);
    }
    /**
     * 获取Url
     */
    public String getUrl(String subUrl, HttpServletRequest req) {
src/main/java/com/lf/server/service/show/OneMapService.java
@@ -383,7 +383,7 @@
    }
    @Override
    public List<IdNameEntity> selectMetaByType() {
    public List<Map<String, Object>> selectMetaByType() {
        return oneMapMapper.selectMetaByType();
    }
}
src/main/resources/mapper/show/OneMapMapper.xml
@@ -316,21 +316,21 @@
    </select>
    <!-- 根据类型查询元数据(用于计算面积) -->
    <select id="selectMetaByType" resultType="com.lf.server.entity.ctrl.IdNameEntity">
        (select a.id, 'DOM' name from lf.sys_meta a
    <select id="selectMetaByType" resultType="java.util.Map">
        (select a.id, a.path, 'DOM' name from lf.sys_meta a
            inner join lf.sys_dir b on a.dircode = b.code
            where a.area is null and a.type in ('img', 'tif', 'tiff') and b.name = '数字正射影像图')
        union all
        (select a.id, 'DEM' name from lf.sys_meta a
        (select a.id, a.path, 'DEM' name from lf.sys_meta a
            inner join lf.sys_dir b on a.dircode = b.code
            where a.area is null and a.type in ('dem', 'tif', 'tiff') and b.name = '数字高程模型')
        union all
        (select id, 'OSGB' name from lf.sys_meta where area is null and type = 'osgb')
        (select id, path, 'OSGB' name from lf.sys_meta where area is null and type = 'osgb')
        union all
        (select id, 'LAS' name from lf.sys_meta where area is null and type = 'las' or type = 'laz')
        (select id, path, 'LAS' name from lf.sys_meta where area is null and type = 'las' or type = 'laz')
        union all
        (select id, 'IFC' name from lf.sys_meta where area is null and type = 'ifc')
        (select id, path, 'IFC' name from lf.sys_meta where area is null and type = 'ifc')
        union all
        (select id, 'FBX' name from lf.sys_meta where area is null and type = 'fbx')
        (select id, path, 'FBX' name from lf.sys_meta where area is null and type = 'fbx')
    </select>
</mapper>