|
@@ -30,6 +30,7 @@ public class MuseumFlowController {
|
|
|
|
|
|
@Resource
|
|
|
private MuseumFlowService museumFlowService;
|
|
|
+ @Resource
|
|
|
private MuseumInfoService museumInfoService;
|
|
|
@Resource
|
|
|
private PermissionService permissionService;
|
|
@@ -79,14 +80,20 @@ public class MuseumFlowController {
|
|
|
// return museumInfoService.getMuseumInfoPage(pageVO);
|
|
|
// }
|
|
|
|
|
|
- @GetMapping("/page")
|
|
|
- @Operation(summary = "根据表单id获取标本在总库中的信息")
|
|
|
- public CommonResult<PageResult<MuseumFlowInfoVO>> selectPageMuseumFlowFormIntel(@Valid MuseumFlowPageVO pageVO) {
|
|
|
- return CommonResult.success(museumFlowService.selectPageMuseumFlowFormIntel(pageVO));
|
|
|
- }
|
|
|
+// @GetMapping("/page")
|
|
|
+// @Operation(summary = "根据所给参数获取标本在总库中的信息")
|
|
|
+// public CommonResult<PageResult<MuseumInfoDO>> selectPageMuseumFlowFormIntel(@Valid MuseumFlowPageVO pageVO) {
|
|
|
+// PageResult<MuseumInfoDO> event = new PageResult<>();
|
|
|
+// for (String number :pageVO.getNumber()){
|
|
|
+// MuseumInfoPageReqVO reqVO = new MuseumInfoPageReqVO();
|
|
|
+// reqVO.setSampleId(number);
|
|
|
+// PageResult<MuseumInfoDO> result = museumInfoService.getMuseumInfoPage(reqVO);
|
|
|
+// }
|
|
|
+// return CommonResult.success();
|
|
|
+// }
|
|
|
|
|
|
@GetMapping("/getFormIntel")
|
|
|
- @Operation(summary = "审批功能中根据id查找标本信息")
|
|
|
+ @Operation(summary = "根据id查找标本出回库中的信息,并展示在总库中的信息")
|
|
|
public CommonResult<MuseumFlowInfoVO> getFormIntel(@RequestParam("id") Integer id) {
|
|
|
Long UserId = getLoginUserId();
|
|
|
if (permissionService.hasAnyRoles(UserId, "operate")) {
|
|
@@ -97,8 +104,9 @@ public class MuseumFlowController {
|
|
|
int State = form.getState();
|
|
|
if (State == 2) {
|
|
|
for (String number : form.getNumber()) {
|
|
|
- MuseumInfoDO result1 = museumFlowService.selectMuseumFlowSampleId(number);
|
|
|
- museumInfoDO.add(result1);
|
|
|
+ MuseumInfoPageReqVO reqVO = new MuseumInfoPageReqVO();
|
|
|
+ reqVO.setSampleId(number);
|
|
|
+ museumInfoDO.addAll(museumInfoService.getMuseumInfoPageList(reqVO));
|
|
|
}
|
|
|
form.setMuseumInfoList(museumInfoDO);
|
|
|
return CommonResult.success(form);
|
|
@@ -141,11 +149,13 @@ public class MuseumFlowController {
|
|
|
//TODO 判断在主库内是否是在库
|
|
|
if (result.getStore() == 0) {
|
|
|
return CommonResult.error(2, number + "标本已出库");
|
|
|
- } else {
|
|
|
+ } else if (result.getStore() == 1) {
|
|
|
List<MuseumFlowDO> event = museumFlowService.selectMuseumFlowByNumbersLike(number);
|
|
|
if (event != null) {
|
|
|
- errorList.addAll( museumFlowService.isMuseumFlowStateOutbound0(event,number));
|
|
|
+ errorList.addAll(museumFlowService.isMuseumFlowStateOutbound0(event, number));
|
|
|
}
|
|
|
+ } else {
|
|
|
+ return CommonResult.error(2, number + "标本状态异常");
|
|
|
}
|
|
|
}
|
|
|
}
|