|
@@ -28,7 +28,7 @@ import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
|
|
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
|
|
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
|
|
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
|
|
-import static cn.iocoder.yudao.module.museums.enums.ErrorCodeConstants.NO_PERMISSION_VIEW_NON_RETURNED_SPECIMENS;
|
|
|
+import static cn.iocoder.yudao.module.museums.enums.ErrorCodeConstants.*;
|
|
|
|
|
|
import cn.iocoder.yudao.module.museums.controller.admin.specimenoutbound.vo.*;
|
|
|
import cn.iocoder.yudao.module.museums.dal.dataobject.specimenoutbound.SpecimenOutboundDO;
|
|
@@ -62,16 +62,16 @@ public class SpecimenOutboundController {
|
|
|
// 验证审批类型
|
|
|
if (req.getStatus() == 1 || req.getStatus() == 2) {
|
|
|
// 一审逻辑
|
|
|
-// if (!permissionApi.hasAnyRoles(operatorId, "deputy_leader")) {
|
|
|
-// throw new IllegalArgumentException("用户没有一审权限");
|
|
|
-// }
|
|
|
+ if (!permissionApi.hasAnyRoles(operatorId, "deputy_leader")) {
|
|
|
+ throw exception(USER_NOT_HAVE_THE_RIGHT_FIRST_INSTANCE);
|
|
|
+ }
|
|
|
req.setApproveUsers(operatorId);
|
|
|
req.setApprovalTime(now);
|
|
|
} else if (req.getStatus() == 5 || req.getStatus() == 6) {
|
|
|
// 二审逻辑
|
|
|
-// if (!permissionApi.hasAnyRoles(operatorId, "leadership")) {
|
|
|
-// throw new IllegalArgumentException("用户没有二审权限");
|
|
|
-// }
|
|
|
+ if (!permissionApi.hasAnyRoles(operatorId, "leadership")) {
|
|
|
+ throw exception(USER_NOT_HAVE_THE_RIGHT_SECOND_INSTANCE);
|
|
|
+ }
|
|
|
req.setTwoApproveUsers(operatorId);
|
|
|
req.setTwoApprovalTime(now);
|
|
|
} else {
|
|
@@ -119,7 +119,6 @@ public class SpecimenOutboundController {
|
|
|
return success(true);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@DeleteMapping("/delete")
|
|
|
@Operation(summary = "删除标本出库回库信息")
|
|
|
@Parameter(name = "id", description = "编号", required = true)
|
|
@@ -236,9 +235,8 @@ public class SpecimenOutboundController {
|
|
|
SpecimenOutboundWithInfoRespVO specimenOutbound = specimenOutboundService.getSpecimenOutboundWithInfo(id);
|
|
|
|
|
|
if (specimenOutbound == null) {
|
|
|
- throw exception(NO_PERMISSION_VIEW_NON_RETURNED_SPECIMENS);
|
|
|
+ throw exception(SPECIMEN_OUTBOUND_ORDER_NOT_EXISTS);
|
|
|
}
|
|
|
return success(specimenOutbound);
|
|
|
}
|
|
|
-
|
|
|
}
|