diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseTaskController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseTaskController.java index ac8f021d..5a1df75a 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseTaskController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseTaskController.java @@ -371,6 +371,8 @@ public class LeaseTaskController extends BaseController { Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1); Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10); try { + Long deptId = typeService.getUserDeptId(); + leaseApplyInfo.setCompanyId(deptId); List list = service.selectAuditLeaseApplyInfoList(leaseApplyInfo); if (leaseApplyInfo.getIsApp()==null){ return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list)); diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java index 75d646ee..4ccdbdbb 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java @@ -674,33 +674,33 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService { @Override public List selectAuditLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo) { - Long userId = SecurityUtils.getLoginUser().getUserid(); - Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId(); - leaseApplyInfo.setUserId(userId == 1 ? null : userId); - if(userId == 1 || deptId == 101){ - leaseApplyInfo.setDeptId(null); - }else{ - //判断祖籍有没有101 - String ancestors = mapper.getAncestors(deptId); - boolean contains101 = false; - if (ancestors != null && !ancestors.isEmpty()) { - String[] parts = ancestors.split(","); - for (String part : parts) { - if ("101".equals(part.trim())) { - contains101 = true; - break; - } - } - } - if(contains101){ - leaseApplyInfo.setDeptId(null); - }else{ - leaseApplyInfo.setDeptId(deptId); - } - } +// Long userId = SecurityUtils.getLoginUser().getUserid(); +// Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId(); +// leaseApplyInfo.setUserId(userId == 1 ? null : userId); +// if(userId == 1 || deptId == 101){ +// leaseApplyInfo.setDeptId(null); +// }else{ +// //判断祖籍有没有101 +// String ancestors = mapper.getAncestors(deptId); +// boolean contains101 = false; +// if (ancestors != null && !ancestors.isEmpty()) { +// String[] parts = ancestors.split(","); +// for (String part : parts) { +// if ("101".equals(part.trim())) { +// contains101 = true; +// break; +// } +// } +// } +// if(contains101){ +// leaseApplyInfo.setDeptId(null); +// }else{ +// leaseApplyInfo.setDeptId(deptId); +// } +// } // leaseApplyInfo.setDeptId((userId == 1 || deptId == 101) ? null : deptId); - log.info("用户id为{}",userId); +// log.info("用户id为{}",userId); List list = mapper.selectAuditLeaseApplyInfoList(leaseApplyInfo); try { if (!CollectionUtils.isEmpty(list)) {