|
|
@@ -121,9 +121,9 @@ public class QueryInspectionPageListService { |
|
|
|
if (RoleEnum.SUPER_ADMIN.getCode() == user.getRoleId()) { |
|
|
|
pageData = this.getAllList(request); |
|
|
|
} else if (RoleEnum.ADMIN.getCode() == user.getRoleId()) { |
|
|
|
pageData = this.getListByDept(request); |
|
|
|
pageData = this.getListByDept(request, user); |
|
|
|
} else if (RoleEnum.ORDINARY_USER.getCode() == user.getRoleId()) { |
|
|
|
pageData = this.getListByDept(request); |
|
|
|
pageData = this.getListByDept(request, user); |
|
|
|
} |
|
|
|
|
|
|
|
if (null == pageData || pageData.getTotal() == 0) { |
|
|
@@ -191,10 +191,10 @@ public class QueryInspectionPageListService { |
|
|
|
* @param request |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
private IPage<Inspection> getListByDept(QueryInspectionPageListRequest request) { |
|
|
|
private IPage<Inspection> getListByDept(QueryInspectionPageListRequest request, User user) { |
|
|
|
// 获取本部门及子孙部门id列表 |
|
|
|
if (StringUtils.isEmpty(request.getDeptId())) { |
|
|
|
List<String> deptIdList = deptMapper.selectAllChildListById(request.getDeptId()); |
|
|
|
List<String> deptIdList = deptMapper.selectAllChildListById(user.getDeptId()); |
|
|
|
request.setDeptIdList(deptIdList); |
|
|
|
} |
|
|
|
|