From d574c7b99c1bee79d7e054ab2af399305fab8baa Mon Sep 17 00:00:00 2001 From: wangliwen Date: Tue, 10 Jan 2023 11:33:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=80=E6=9C=89=E9=83=A8=E9=97=A8=E8=A1=A5?= =?UTF-8?q?=E5=85=85=E4=BC=9A=E5=AE=A2=E5=8E=85=E5=A1=AB=E5=85=A5=E7=9A=84?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E5=90=8D=20=E3=80=81=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E6=8E=89=E6=9C=AA=E9=80=9A=E8=BF=87=E7=9A=84=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/TAbilityApplicationServiceImpl.java | 2 +- .../resource/service/impl/ResourceServiceImpl.java | 4 ++++ .../renren/modules/sys/controller/SysDeptController.java | 9 +++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java index 18f9e5f7..9ee8c995 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java @@ -82,7 +82,7 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl count = new HashMap<>(); count.put("name", "总计"); + if (!cloud) { + countMap.put("yzy", 0); + countMap.put("ysp", 0); + } count.putAll(countMap); resultList.add(count); return resultList; diff --git a/renren-admin/src/main/java/io/renren/modules/sys/controller/SysDeptController.java b/renren-admin/src/main/java/io/renren/modules/sys/controller/SysDeptController.java index b152dc3e..9ed66f01 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/controller/SysDeptController.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/controller/SysDeptController.java @@ -28,6 +28,7 @@ import org.springframework.web.bind.annotation.*; import springfox.documentation.annotations.ApiIgnore; import java.util.*; +import java.util.stream.Collectors; /** * 部门管理 @@ -108,6 +109,14 @@ public class SysDeptController { } } } + List> list_metting = jdbcTemplate.queryForList("SELECT DISTINCT dept from t_meetingroom_book WHERE dept IS NOT NULL;"); + List temp = list.stream().map(index -> index.get("name")).filter(index -> index != null).map(index -> index.toString()).collect(Collectors.toList()); + List> list_ = list_metting.stream().map(index -> index.get("dept")).filter(index -> index != null).collect(Collectors.toList()) + .stream().filter(index -> !temp.contains(index.toString())).map(index -> new LinkedHashMap() {{ + put("id", null); + put("name", index.toString()); + }}).collect(Collectors.toList()); + list.addAll(list_); // 获取会客厅申请部门 return new Result>>().ok(list); }