瀏覽代碼

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

/**

Loading…
取消
儲存