发布管理的查询元数据信息时添加DOM和DEM的目录过滤功能
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ---------------------------------------------------------------------------------------------- |
| | | -- update lf.sys_publish a set geom = ST_GeomFromText('POINT Z (31.231025 113.223529 12)') where id = 1; |
| | | select id from lf.sys_layer where cn_name = 'ä¸ç»´å°è´¨æ¨¡å' and pid = (select id from lf.sys_layer where cn_name = 'åå¯' order by pid limit 1); |
| | |
| | | return fail("æ°æ®ç±»å«ä¸ºç©º", null); |
| | | } |
| | | |
| | | String types = getType(type); |
| | | String types = getType(dircode, type); |
| | | int count = publishService.selectMetasByCount(depcode, dircode, verid, types, name); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | |
| | | /** |
| | | * è·åç±»å |
| | | */ |
| | | private String getType(String type) throws Exception { |
| | | private String getType(String dircode, String type) throws Exception { |
| | | switch (type) { |
| | | case "DOM": |
| | | return "type in ('tif', 'tiff', 'img')"; |
| | | return "type in ('tif', 'tiff', 'img')" + getFilter(dircode, type); |
| | | case "DEM": |
| | | return "type in ('tif', 'tiff')"; |
| | | return "type in ('tif', 'tiff')" + getFilter(dircode, type); |
| | | case "MPT": |
| | | return "type = 'mpt'"; |
| | | case "3DML": |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·åè¿æ»¤æ¡ä»¶ |
| | | */ |
| | | private String getFilter(String dircode, String type) { |
| | | dircode = StringHelper.isEmpty(dircode) ? "" : StringHelper.getRightLike(dircode); |
| | | |
| | | List<String> list = null; |
| | | switch (type) { |
| | | case "DOM": |
| | | list = publishService.selectCodesForDir(dircode, 0); |
| | | break; |
| | | case "DEM": |
| | | list = publishService.selectCodesForDir(dircode, 1); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | if (null == list || list.isEmpty()) { |
| | | return ""; |
| | | } |
| | | |
| | | for (int i = 0, c = list.size(); i < c; i++) { |
| | | list.set(i, "'" + list.get(i) + "'"); |
| | | } |
| | | |
| | | return " and dircode not in (" + StringHelper.join(list, ",") + ")"; |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "å页æ¥è¯¢å¹¶è¿åè®°å½æ°") |
| | | @ApiImplicitParams({ |
| | |
| | | public List<PublishEntity> selectByIds(String ids); |
| | | |
| | | /** |
| | | * æ ¹æ®ç®å½æ¥è¯¢DOMåDEMçç¼ç |
| | | * |
| | | * @param dircode ç®å½ |
| | | * @param isDom 1-DOMï¼0-DEM |
| | | * @return |
| | | */ |
| | | public List<String> selectCodesForDir(String dircode, Integer isDom); |
| | | |
| | | /** |
| | | * æå
¥ä¸æ¡ |
| | | * |
| | | * @param entity |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<String> selectCodesForDir(String dircode, Integer isDom) { |
| | | return publishMapper.selectCodesForDir(dircode, isDom); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insert(PublishEntity entity) { |
| | | return publishMapper.insert(entity); |
| | | } |
ÎļþÃû´Ó src/main/resources/mapper/show/PublishMapper.xml ÐÞ¸Ä |
| | |
| | | select * from lf.sys_publish where id in (${ids}) order by id desc; |
| | | </select> |
| | | |
| | | <select id="selectCodesForDir" resultType="java.lang.String"> |
| | | select code |
| | | from lf.sys_dir |
| | | <where> |
| | | <choose> |
| | | <when test="isDom > 0"> |
| | | name in ('DOM', 'æ°åæ£å°å½±åå¾') |
| | | </when> |
| | | <otherwise> |
| | | name in ('DEM', 'æ°åé«ç¨æ¨¡å') |
| | | </otherwise> |
| | | </choose> |
| | | <if test="dircode != null"> |
| | | and code like #{dircode} |
| | | </if> |
| | | </where> |
| | | order by code; |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.data.PublishEntity"> |
| | | insert into lf.sys_publish |
| | | (regid,name,url,path,type,status,dirid,depid,min,max,json,create_user,create_time,bak) |