From 4cff68a7ab0e6a84f81a55b99cd0d081c587e998 Mon Sep 17 00:00:00 2001 From: zhaoyu Date: Wed, 24 Apr 2024 14:54:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E9=83=A8=E9=97=A8=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E9=83=A8=E9=97=A8=E6=89=80=E6=9C=89=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/hiddenApi/HiddenApiController.java | 14 +++++++++++++- .../datasource/hiddenApi/HiddenApiMapper.xml | 6 +++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/zcloud/controller/hiddenApi/HiddenApiController.java b/src/main/java/com/zcloud/controller/hiddenApi/HiddenApiController.java index 4853f6bf..fba669a0 100644 --- a/src/main/java/com/zcloud/controller/hiddenApi/HiddenApiController.java +++ b/src/main/java/com/zcloud/controller/hiddenApi/HiddenApiController.java @@ -865,7 +865,19 @@ public class HiddenApiController extends BaseController { } pd.put("departmentIds",departmentIds); } - // 增加隐患整改部门查询 结束 + // 增加发现整改部门查询 开始 + if(StringUtils.isNotBlank(pd.getString("creatorUserDept"))){ + String url ="department_list.html?DEPARTMENT_ID="; + List departments = departmentService.listAllDepartment(pd.getString("creatorUserDept"), url); + List departmentIds = new ArrayList<>(); + departmentIds.add(pd.getString("creatorUserDept")); + for(Department department:departments){ + departmentIds.add(department.getDEPARTMENT_ID()); + } + pd.put("creatorUserDepts",departmentIds); + } + + // 增加隐患发现部门查询 结束 pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); if (!Jurisdiction.getIS_MAIN().equals("1")) { //主账号 pd.put("queryUserId", Jurisdiction.getUSER_ID()); diff --git a/src/main/resources/mybatis/datasource/hiddenApi/HiddenApiMapper.xml b/src/main/resources/mybatis/datasource/hiddenApi/HiddenApiMapper.xml index 018abac0..42ae46bb 100644 --- a/src/main/resources/mybatis/datasource/hiddenApi/HiddenApiMapper.xml +++ b/src/main/resources/mybatis/datasource/hiddenApi/HiddenApiMapper.xml @@ -408,7 +408,11 @@ and f.HIDDEN_ID in (select hfu.HIDDEN_ID from BUS_HIDDEN_USER hfu LEFT JOIN sys_user user on user.USER_ID = hfu.USER_ID - where user.DEPARTMENT_ID = #{pd.creatorUserDept} ) + where user.DEPARTMENT_ID in + + #{pd.creatorUserDepts[${index}]} + + ) and f.HIDDEN_ID in (select hfu.HIDDEN_ID from BUS_HIDDEN_USER hfu LEFT JOIN sys_user user on user.USER_ID = hfu.USER_ID