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