| | |
| | | select zoning from lf.sys_coord group by zoning; |
| | | select id, name from lf.sys_dir where pid = 0 and id > 1; |
| | | |
| | | select * from lf.sys_coord where epsgcode = 'EPSG:4490'; |
| | | select * from lf.sys_operate; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | with recursive rs as( |
| | | select a.*, fullName from lf.sys_dir a where name=#{name} |
| | | union |
| | | select a.* from lf.sys_dir a, rs b where a.pid=b.id |
| | | ) |
| | | select * from rs order by order_num; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | import com.lf.server.annotation.SysLog; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.all.StaticData; |
| | | import com.lf.server.entity.ctrl.TabMapperEntity; |
| | | import com.lf.server.entity.ctrl.UploadEntity; |
| | | import com.lf.server.entity.data.DirEntity; |
| | | import com.lf.server.entity.data.MetaEntity; |
| | | import com.lf.server.entity.data.MetaFileEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.helper.WebHelper; |
| | | import com.lf.server.service.all.BaseUploadService; |
| | | import com.lf.server.service.data.DataLoaderService; |
| | | import com.lf.server.service.data.DataUploadService; |
| | | import com.lf.server.service.data.DirService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | @GetMapping(value = "/selectFiles") |
| | | public ResponseMsg<List<MetaFileEntity>> selectFiles(String path) { |
| | | try { |
| | | List<MetaFileEntity> list = baseUploadService.selectFiles(path, EXT_LIST); |
| | | List<MetaFileEntity> list = baseUploadService.selectFiles(path, StaticData.ALL_EXTENSION); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | @SysLog() |
| | | @ApiOperation(value = "查询文件") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "path", value = "路径", dataType = "String", paramType = "query") |
| | | }) |
| | | @GetMapping(value = "/selectFiles2") |
| | | public ResponseMsg<List<MetaFileEntity>> selectFiles2(String path) { |
| | | try { |
| | | List<MetaFileEntity> list = baseUploadService.selectFiles(path, null); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "删除文件") |
| | |
| | | @ApiOperation(value = "查询映射") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "path", value = "路径", dataType = "String", paramType = "query", example = "20230109010101"), |
| | | @ApiImplicitParam(name = "dirid", value = "目录ID", dataType = "Integer", paramType = "query", example = "1") |
| | | @ApiImplicitParam(name = "dirid", value = "目录ID", dataType = "Integer", paramType = "query", example = "1"), |
| | | @ApiImplicitParam(name = "epsgCode", value = "坐标编码", dataType = "String", paramType = "query", example = "EPSG:4490") |
| | | }) |
| | | @GetMapping(value = "/selectMappers") |
| | | public ResponseMsg<List<TabMapperEntity>> selectMappers(String path, Integer dirid) { |
| | | public ResponseMsg<Object> selectMappers(String path, Integer dirid, String epsgCode) { |
| | | try { |
| | | |
| | | if (StringHelper.isEmpty(path) || StringHelper.isEmpty(epsgCode) || null == dirid) { |
| | | return fail("路径、目录ID和坐标编码不能为空"); |
| | | } |
| | | if (1 > uploadService.selectCount4Coord(epsgCode)) { |
| | | return fail("坐标编码" + epsgCode + "不存在"); |
| | | } |
| | | DirEntity dir = dirService.selectDir(dirid); |
| | | if (null == dir) { |
| | | return fail("目录ID=" + dirid + "不存在"); |
| | | } |
| | | |
| | | List<TabMapperEntity> list = dataLoaderService.selectMappers(path); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询文件") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "path", value = "路径", dataType = "String", paramType = "query") |
| | | }) |
| | | @GetMapping(value = "/selectFiles2") |
| | | public ResponseMsg<List<MetaFileEntity>> selectFiles2(String path) { |
| | | try { |
| | | List<MetaFileEntity> list = baseUploadService.selectFiles(path, null); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | |
| | | /** |
| | | * TIF文件扩展名 |
| | | */ |
| | | public final static List<String> TIF_EXTENSION = new ArrayList<>(Arrays.asList(".tif", ".prj", ".tfw", ".tfw", ".tif.ovr", ".tif.aux.xml", ".tif.enp", ".tif.xml")); |
| | | public final static List<String> TIF_EXTENSION = new ArrayList<>(Arrays.asList(".tif", ".prj", ".tfw", ".tif.ovr", ".tif.aux.xml", ".tif.enp", ".tif.xml")); |
| | | |
| | | /** |
| | | * TIFF文件扩展名 |
| | | */ |
| | | public final static List<String> TIFF_EXTENSION = new ArrayList<>(Arrays.asList(".tiff", ".prj", ".tfw", ".tiff.ovr", ".tiff.aux.xml", ".tiff.enp", ".tiff.xml")); |
| | | |
| | | /** |
| | | * SHP文件扩展名 |
| | |
| | | /** |
| | | * 所有文件扩展名 |
| | | */ |
| | | public final static List<String> ALL_EXTENSION = new ArrayList<>(Arrays.asList(".txt", ".xml", ".pdf", ".xls", ".xlsx", ".doc", ".docx", ".ppt", ".pptx", ".shp", ".gdb", ".mdb", ".dwg", ".las", ".laz", ".cpt", ".mpt", ".fly", ".efb", ".g3d", ".fbx", ".obj", ".3dm", ".3dml", ".osgb", ".rvt", ".ifc", ".jpg", ".png", ".img", ".tif", ".bmp", ".gif", ".rmvb", ".rm", ".mp3", ".mp4", ".avi", ".wma", ".wmv", ".7z", ".rar", ".zip")); |
| | | public final static List<String> ALL_EXTENSION = new ArrayList<>(Arrays.asList(".txt", ".xml", ".pdf", ".xls", ".xlsx", ".doc", ".docx", ".ppt", ".pptx", ".shp", ".gdb", ".mdb", ".dwg", ".las", ".laz", ".cpt", ".mpt", ".fly", ".efb", ".g3d", ".fbx", ".obj", ".3dm", ".3dml", ".osgb", ".rvt", ".ifc", ".jpg", ".png", ".img", ".tif", ".tiff", ".bmp", ".gif", ".rmvb", ".rm", ".mp3", ".mp4", ".avi", ".wma", ".wmv", ".7z", ".rar", ".zip")); |
| | | |
| | | /** |
| | | * 插入排除字段 |
| | |
| | | |
| | | private String bak; |
| | | |
| | | private String fullName; |
| | | |
| | | public int getId() { |
| | | return id; |
| | | } |
| | |
| | | public void setBak(String bak) { |
| | | this.bak = bak; |
| | | } |
| | | |
| | | public String getFullName() { |
| | | return fullName; |
| | | } |
| | | |
| | | public void setFullName(String fullName) { |
| | | this.fullName = fullName; |
| | | } |
| | | } |
| | |
| | | public List<CoordEntity> selectCoords(String zoning); |
| | | |
| | | /** |
| | | * 根据EPSG编码统计 |
| | | * |
| | | * @param epsgCode |
| | | * @return |
| | | */ |
| | | public Integer selectCount4Coord(String epsgCode); |
| | | |
| | | /** |
| | | * 查询项目名称 |
| | | * |
| | | * @return |
| | |
| | | |
| | | import com.lf.server.entity.ctrl.FmeReqEntity; |
| | | import com.lf.server.entity.ctrl.NameValueEntity; |
| | | import com.lf.server.entity.data.MetaEntity; |
| | | import com.lf.server.entity.data.MetaFileEntity; |
| | | import com.lf.server.helper.RestHelper; |
| | | import com.lf.server.helper.StringHelper; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Integer selectCount4Coord(String epsgCode) { |
| | | return uploadMapper.selectCount4Coord(epsgCode); |
| | | } |
| | | |
| | | @Override |
| | | public List<DirEntity> selectProject() { |
| | | return uploadMapper.selectProject(); |
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.lf.server.mapper.data.DirMapper"> |
| | | <resultMap id="resultMap" type="com.lf.server.entity.data.DirEntity"> |
| | | <id property="id" column="id"></id> |
| | | <result property="orderNum" column="order_num"></result> |
| | | <result property="createUser" column="create_user"></result> |
| | | <result property="createTime" column="create_time"></result> |
| | | <result property="updateUser" column="update_user"></result> |
| | | <result property="updateTime" column="update_time"></result> |
| | | </resultMap> |
| | | |
| | | <select id="selectDir" resultMap="resultMap" resultType="com.lf.server.entity.data.DirEntity"> |
| | | select * from lf.sys_dir where id = #{id} |
| | | <select id="selectDir" resultType="com.lf.server.entity.data.DirEntity"> |
| | | select a.*, fn_rec_query(a.id, 'dir') fullName from lf.sys_dir a where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectDirAll" resultMap="resultMap" resultType="com.lf.server.entity.data.DirEntity"> |
| | | select * from lf.sys_dir order by order_num; |
| | | <select id="selectDirAll" resultType="com.lf.server.entity.data.DirEntity"> |
| | | select a.*, fn_rec_query(a.id, 'dir') fullName from lf.sys_dir a order by order_num; |
| | | </select> |
| | | |
| | | <select id="selectDirRoot" resultType="com.lf.server.entity.data.DirEntity"> |
| | | select * from lf.sys_dir where pid=0 order by order_num; |
| | | select a.*, fn_rec_query(a.id, 'dir') fullName from lf.sys_dir a where pid=0 order by order_num; |
| | | </select> |
| | | |
| | | <select id="selectDirRecursive" resultMap="resultMap" resultType="com.lf.server.entity.data.DirEntity"> |
| | | <select id="selectDirRecursive" resultType="com.lf.server.entity.data.DirEntity"> |
| | | with recursive rs as( |
| | | select * from lf.sys_dir where name=#{name} |
| | | select a.*, fn_rec_query(a.id, 'dir') fullName from lf.sys_dir a where name = #{name} |
| | | union |
| | | select a.* from lf.sys_dir a, rs b where a.pid=b.id |
| | | select b.*, fn_rec_query(b.id, 'dir') fullName from lf.sys_dir b, rs c where b.pid = c.id |
| | | ) |
| | | select * FROM rs order by order_num; |
| | | select * from rs order by order_num; |
| | | </select> |
| | | |
| | | <insert id="insertDir" parameterType="com.lf.server.entity.data.DirEntity"> |
| | |
| | | order by id |
| | | </select> |
| | | |
| | | <select id="selectCount4Coord" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_coord where epsgcode = #{epsgCode} |
| | | </select> |
| | | |
| | | <select id="selectProject" resultType="com.lf.server.entity.data.DirEntity"> |
| | | select * from lf.sys_dir where pid = 0 and id > 1 |
| | | </select> |