From 7911d40e365c6d7c3cb5832609a9b6e30c1a6641 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期一, 10 四月 2023 16:44:20 +0800 Subject: [PATCH] 1 --- src/main/java/com/lf/server/controller/data/MetaController.java | 2 +- src/main/java/com/lf/server/controller/all/BaseQueryController.java | 2 +- src/main/java/com/lf/server/service/data/MetaService.java | 18 ++++++++++++++++++ data/db_cx.sql | 6 ++---- src/main/java/com/lf/server/mapper/data/MetaMapper.java | 9 +++++++++ src/main/java/com/lf/server/service/data/DownloadService.java | 9 --------- src/main/resources/mapper/data/MetaMapper.xml | 8 ++++++++ 7 files changed, 39 insertions(+), 15 deletions(-) diff --git a/data/db_cx.sql b/data/db_cx.sql index 0a1411e..2205253 100644 --- a/data/db_cx.sql +++ b/data/db_cx.sql @@ -17,10 +17,8 @@ select * from lf.sys_download order by id desc limit 20; --downid select * from lf.sys_apply order by id desc; select * from lf.sys_flow order by id desc; -select modular2,count(*) from lf.sys_operate group by modular2 - - - +select * from lf.sys_meta order by id desc; +select depcode from lf.sys_meta where id in (1393,1392,1383,1382) and depcode not like '000305%' group by depcode order by depcode; diff --git a/src/main/java/com/lf/server/controller/all/BaseQueryController.java b/src/main/java/com/lf/server/controller/all/BaseQueryController.java index 9ddfc9a..9106d9b 100644 --- a/src/main/java/com/lf/server/controller/all/BaseQueryController.java +++ b/src/main/java/com/lf/server/controller/all/BaseQueryController.java @@ -590,7 +590,7 @@ return success(new ArrayList<String>()); } - List<String> list = downloadService.selectMetaOverflowDep(ue, dr); + List<String> list = metaService.selectMetaOverflowDep(ue, dr); return success(list); } catch (Exception ex) { diff --git a/src/main/java/com/lf/server/controller/data/MetaController.java b/src/main/java/com/lf/server/controller/data/MetaController.java index 5a89768..d36dead 100644 --- a/src/main/java/com/lf/server/controller/data/MetaController.java +++ b/src/main/java/com/lf/server/controller/data/MetaController.java @@ -386,7 +386,7 @@ return success(new ArrayList<String>()); } - List<String> list = downloadService.selectMetaOverflowDep(ue, dr); + List<String> list = metaService.selectMetaOverflowDep(ue, dr); return success(list); } catch (Exception ex) { diff --git a/src/main/java/com/lf/server/mapper/data/MetaMapper.java b/src/main/java/com/lf/server/mapper/data/MetaMapper.java index d6bf72a..b31284e 100644 --- a/src/main/java/com/lf/server/mapper/data/MetaMapper.java +++ b/src/main/java/com/lf/server/mapper/data/MetaMapper.java @@ -152,6 +152,15 @@ public List<MetaEntity> selectMetasByDirCode(String dircode); /** + * 鏌ヨ鍏冩暟鎹腑婧㈠嚭鐨勫崟浣岻D + * + * @param ids + * @param depcode + * @return + */ + public List<String> selectMetaOverflowDep(String ids, String depcode); + + /** * 鎻掑叆涓�鏉� * * @param entity diff --git a/src/main/java/com/lf/server/service/data/DownloadService.java b/src/main/java/com/lf/server/service/data/DownloadService.java index 2faf86e..7aee659 100644 --- a/src/main/java/com/lf/server/service/data/DownloadService.java +++ b/src/main/java/com/lf/server/service/data/DownloadService.java @@ -505,13 +505,4 @@ metaDownService.inserts(list); } - - /** - * 鏌ヨ鍏冩暟鎹腑婧㈠嚭鐨勫崟浣岻D - */ - public List<String> selectMetaOverflowDep(UserEntity ue, DownloadReqEntity dr) { - List<String> rs = new ArrayList<>(); - - return rs; - } } diff --git a/src/main/java/com/lf/server/service/data/MetaService.java b/src/main/java/com/lf/server/service/data/MetaService.java index 6bd49e5..1e195b2 100644 --- a/src/main/java/com/lf/server/service/data/MetaService.java +++ b/src/main/java/com/lf/server/service/data/MetaService.java @@ -1,7 +1,9 @@ package com.lf.server.service.data; import com.lf.server.entity.all.StaticData; +import com.lf.server.entity.ctrl.DownloadReqEntity; import com.lf.server.entity.data.MetaEntity; +import com.lf.server.entity.sys.UserEntity; import com.lf.server.helper.PathHelper; import com.lf.server.helper.StringHelper; import com.lf.server.helper.WebHelper; @@ -126,6 +128,22 @@ } @Override + public List<String> selectMetaOverflowDep(String ids, String depcode) { + depcode = StringHelper.getRightLike(depcode); + + return metaMapper.selectMetaOverflowDep(ids, depcode); + } + + /** + * 鏌ヨ鍏冩暟鎹腑婧㈠嚭鐨勫崟浣岻D + */ + public List<String> selectMetaOverflowDep(UserEntity ue, DownloadReqEntity dr) { + String ids = StringHelper.join(dr.getIds(), ","); + + return selectMetaOverflowDep(ids, ue.getDepcode()); + } + + @Override public Integer insert(MetaEntity entity) { return metaMapper.insert(entity); } diff --git a/src/main/resources/mapper/data/MetaMapper.xml b/src/main/resources/mapper/data/MetaMapper.xml index b5a8a6a..db27d71 100644 --- a/src/main/resources/mapper/data/MetaMapper.xml +++ b/src/main/resources/mapper/data/MetaMapper.xml @@ -182,6 +182,14 @@ order by id; </select> + <select id="selectMetaOverflowDep" resultType="java.lang.String"> + select depcode + from lf.sys_meta + where id in (${ids}) and depcode not like ${depcode} + group by depcode + order by depcode; + </select> + <insert id="insert" parameterType="com.lf.server.entity.data.MetaEntity"> <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id"> select currval('lf.sys_meta_id_seq'::regclass) as id -- Gitblit v1.9.3