浏览代码

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/V1.3.3
wanjing 11 个月前
父节点
当前提交
a6378ce4c2
共有 1 个文件被更改,包括 13 次插入13 次删除
  1. +13
    -13
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/workorder/generate/GenerateWorkorderService.java

+ 13
- 13
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/workorder/generate/GenerateWorkorderService.java 查看文件

@@ -126,19 +126,19 @@ public class GenerateWorkorderService {
* @return
*/
private JsonResult checkPermission(User user, List<Inspection> inspectionList) {
if (DataPermissionEnum.ALL.getCode() == user.getDataPermission()) {
return JsonResult.success(user);
} else if (DataPermissionEnum.DEPT_AND_SUB_DEPT.getCode() == user.getDataPermission()) {
for (Inspection inspection : inspectionList) {
if (!user.getDeptId().equals(inspection.getDeptId())) {
return JsonResult.error(GenerateWorkorderCodeEnum.ADMIN_NOT_GENERATE_CHILD_WORKORDER.getCode(), GenerateWorkorderCodeEnum.ADMIN_NOT_GENERATE_CHILD_WORKORDER.getMsg());
}
}
return JsonResult.success(user);
} else if (DataPermissionEnum.DEPT.getCode() == user.getDataPermission()) {
return JsonResult.error(GenerateWorkorderCodeEnum.ORDINARY_USER_NO_PERMISSION_TO_GENERATE.getCode(), GenerateWorkorderCodeEnum.ORDINARY_USER_NO_PERMISSION_TO_GENERATE.getMsg());
}
return JsonResult.error();
// if (DataPermissionEnum.ALL.getCode() == user.getDataPermission()) {
// return JsonResult.success(user);
// } else if (DataPermissionEnum.DEPT_AND_SUB_DEPT.getCode() == user.getDataPermission()) {
// for (Inspection inspection : inspectionList) {
// if (!user.getDeptId().equals(inspection.getDeptId())) {
// return JsonResult.error(GenerateWorkorderCodeEnum.ADMIN_NOT_GENERATE_CHILD_WORKORDER.getCode(), GenerateWorkorderCodeEnum.ADMIN_NOT_GENERATE_CHILD_WORKORDER.getMsg());
// }
// }
// return JsonResult.success(user);
// } else if (DataPermissionEnum.DEPT.getCode() == user.getDataPermission()) {
// return JsonResult.error(GenerateWorkorderCodeEnum.ORDINARY_USER_NO_PERMISSION_TO_GENERATE.getCode(), GenerateWorkorderCodeEnum.ORDINARY_USER_NO_PERMISSION_TO_GENERATE.getMsg());
// }
return JsonResult.success();
}

/**

正在加载...
取消
保存