|
@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.validation.Valid;
|
|
|
+import java.util.List;
|
|
|
|
|
|
@Tag(name = "博物馆-出回库管理")
|
|
|
@RestController
|
|
@@ -50,26 +51,25 @@ public class MuseumFlowController {
|
|
|
return CommonResult.success(result1);
|
|
|
}
|
|
|
|
|
|
- @PostMapping("/outbound")
|
|
|
- @Operation(summary = "添加出库单")
|
|
|
- public CommonResult<Boolean> createMuseumFlowOutbound(@RequestBody MuseumFlowSaveVO saveVO){
|
|
|
- String sample_id=saveVO.getNumber();
|
|
|
- String number=saveVO.getNumber();
|
|
|
- MuseumInfoDO result = museumFlowService.selectMuseumFlowSampleId(sample_id);
|
|
|
- MuseumFlowDO event = museumFlowService.selectMuseumFlowNumber(number);
|
|
|
- if(result == null){
|
|
|
- return CommonResult.error(200,"样品不存在");
|
|
|
- }
|
|
|
- int Save=result.getSave();
|
|
|
- if(Save == 0){
|
|
|
- return CommonResult.error(200,"样品不在库中");
|
|
|
- }
|
|
|
- else {
|
|
|
- museumFlowService.createMuseumFlow(saveVO);
|
|
|
- museumFlowService.updateMuseumFlowStateOutbound2(saveVO);
|
|
|
- return CommonResult.success(true);
|
|
|
- }
|
|
|
- }
|
|
|
+// @PostMapping("/outbound")
|
|
|
+// @Operation(summary = "添加出库单")
|
|
|
+// public CommonResult<Boolean> createMuseumFlowOutbound(@RequestBody MuseumFlowSaveVO saveVO){
|
|
|
+// List<String>sample_id=saveVO.getNumber();
|
|
|
+// MuseumInfoDO result = museumFlowService.selectMuseumFlowSampleId(sample_id);
|
|
|
+// if(result == null){
|
|
|
+// return CommonResult.error(200,"样品不存在");
|
|
|
+// }else if(result != null){
|
|
|
+// int Save=result.getSave();
|
|
|
+// if (Save == 0) {
|
|
|
+// return CommonResult.error(200, "样品不在库中");
|
|
|
+// } else {
|
|
|
+// museumFlowService.createMuseumFlow(saveVO);
|
|
|
+// museumFlowService.updateMuseumFlowStateOutbound2(saveVO);
|
|
|
+// return CommonResult.success(true);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// return CommonResult.success(true);
|
|
|
+// }
|
|
|
|
|
|
@GetMapping("/pagePerson")
|
|
|
@Operation(summary = "获取关于出库员的分页")
|
|
@@ -78,16 +78,18 @@ public class MuseumFlowController {
|
|
|
}
|
|
|
|
|
|
@PostMapping("/review")
|
|
|
- @Operation(summary = "新增通过的审批单")
|
|
|
+ @Operation(summary = "通过的审批单")
|
|
|
public CommonResult<Boolean> createMuseumFlowReview(@RequestBody MuseumFlowReviewVO reviewVO) {
|
|
|
String sample_id = reviewVO.getNumber();
|
|
|
String number = reviewVO.getNumber();
|
|
|
MuseumInfoDO result = museumFlowService.selectMuseumFlowSampleId(sample_id);
|
|
|
MuseumFlowDO event = museumFlowService.selectMuseumFlowNumber(number);
|
|
|
+
|
|
|
int Save = result.getSave();
|
|
|
int State = event.getState();
|
|
|
// Save中 0现为未出库或已回库,1为已出库
|
|
|
// State中 0现为未出库或已回库,1为已出库,2为审批中,3为审批通过,4为审批驳回
|
|
|
+ //TODO 你这里上面获取了result和event的值再判断他为空,怎么可能为空 ,所以如果为空的话,上面两句就直接报错了
|
|
|
if (result == null) {
|
|
|
return CommonResult.error(200, "样品不存在");
|
|
|
} else if (event == null) {
|