|
@@ -113,26 +113,25 @@ public class MuseumFlowController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @GetMapping("/menId")
|
|
|
- @Operation(summary = "查询身份信息")
|
|
|
- public CommonResult<Boolean> hasAnyRoles() {
|
|
|
- Long UserId = getLoginUserId();
|
|
|
- if (permissionService.hasAnyRoles(UserId, "operate")) {
|
|
|
- return CommonResult.success(true);
|
|
|
- } else {
|
|
|
- return CommonResult.error(200, "无权限");
|
|
|
- }
|
|
|
- }
|
|
|
+// @GetMapping("/menId")
|
|
|
+// @Operation(summary = "查询身份信息")
|
|
|
+// public CommonResult<Boolean> hasAnyRoles() {
|
|
|
+// Long UserId = getLoginUserId();
|
|
|
+// if (permissionService.hasAnyRoles(UserId, "operate")) {
|
|
|
+// return CommonResult.success(true);
|
|
|
+// } else {
|
|
|
+// return CommonResult.error(200, "无权限");
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
@PostMapping("/outbound")
|
|
|
@Operation(summary = "出库功能")
|
|
|
public CommonResult<Boolean> createMuseumFlowOutbound(@RequestBody MuseumFlowSaveVO saveVO) {
|
|
|
- //TODO
|
|
|
Long UserId = getLoginUserId();
|
|
|
if (permissionService.hasAnyRoles(UserId, "operate")) {
|
|
|
List<String> errorList = new ArrayList<>();
|
|
|
// errorList.add(museumFlowService.isMuseumFlowIn(saveVO));
|
|
|
-// Save中 1现为未出库或已回库,0为已出库
|
|
|
+// store中 1现为未出库或已回库,0为已出库
|
|
|
// State中 0在库,1为已出库,2为审批中,3为审批通过,4为审批驳回
|
|
|
for (String number : saveVO.getNumber()) {
|
|
|
MuseumInfoDO result = museumFlowService.selectMuseumFlowSampleId(number);
|
|
@@ -145,7 +144,7 @@ public class MuseumFlowController {
|
|
|
} else {
|
|
|
List<MuseumFlowDO> event = museumFlowService.selectMuseumFlowByNumbersLike(number);
|
|
|
if (event != null) {
|
|
|
- errorList.addAll( museumFlowService.isMuseumFlowStateOutbound0(event));
|
|
|
+ errorList.addAll( museumFlowService.isMuseumFlowStateOutbound0(event,number));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -177,7 +176,7 @@ public class MuseumFlowController {
|
|
|
museumFlowService.updateMuseumFlowOutbound(saveVO);
|
|
|
return CommonResult.success(true);
|
|
|
} else {
|
|
|
- return CommonResult.error(2, result.getNumber() + museumFlowService.isMuseumFlowStateForm(State));
|
|
|
+ return CommonResult.error(2, result.getId() + museumFlowService.isMuseumFlowStateForm(State));
|
|
|
}
|
|
|
} else {
|
|
|
return CommonResult.error(2, "找不到该审批单");
|