瀏覽代碼

重构代码

tags/v1.0.0^2
wanjing 1 年之前
父節點
當前提交
88d87a3e77
共有 1 個檔案被更改,包括 4 行新增4 行删除
  1. +4
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionPageListService.java

+ 4
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionPageListService.java 查看文件

@@ -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);
}


Loading…
取消
儲存