diff --git a/src/main/java/com/zcloud/controller/app/highriskwork/AppHotWorkApplicationController.java b/src/main/java/com/zcloud/controller/app/highriskwork/AppHotWorkApplicationController.java index 275ae9bd..f696040b 100644 --- a/src/main/java/com/zcloud/controller/app/highriskwork/AppHotWorkApplicationController.java +++ b/src/main/java/com/zcloud/controller/app/highriskwork/AppHotWorkApplicationController.java @@ -827,11 +827,16 @@ public class AppHotWorkApplicationController extends BaseController { return map; } } else { - hotUserList = hotWorkApplicationUserService.listByDepartment(hotUserPd); // 找到这一笔的审批人们 + //先判断延时监火是否为选择部门 + hotUserList = hotWorkApplicationUserService.listByDepartment(hotUserPd); // 找到这一笔的审批人们(选择部门) if (hotUserList.size() < 1) { - map.put("result", "error"); - map.put("msg", "获取审批人意见失败!请联系管理员"); - return map; + //如果查询部门查不到就根据人查询 + hotUserList = hotWorkApplicationUserService.listAll(hotUserPd); // 找到这一笔的审批人(选择人) + if (hotUserList.size() != 1) { + map.put("result", "error"); + map.put("msg", "获取审批人意见失败!请联系管理员"); + return map; + } } } diff --git a/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationUserMapper.xml b/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationUserMapper.xml index c717f435..9ba0ada9 100644 --- a/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationUserMapper.xml +++ b/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationUserMapper.xml @@ -134,21 +134,23 @@