|
@@ -10,17 +10,13 @@ import cn.iocoder.yudao.module.museum.dal.database.museumflow.MuseumFlowDO;
|
|
|
import cn.iocoder.yudao.module.museum.dal.database.museuminfo.MuseumInfoDO;
|
|
|
import cn.iocoder.yudao.module.museum.service.museumflow.MuseumFlowService;
|
|
|
import cn.iocoder.yudao.module.museum.service.museuminfo.MuseumInfoService;
|
|
|
-import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
|
|
-import cn.iocoder.yudao.module.system.dal.mysql.permission.UserRoleMapper;
|
|
|
import cn.iocoder.yudao.module.system.service.permission.PermissionService;
|
|
|
-import cn.iocoder.yudao.module.system.service.permission.RoleService;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.validation.Valid;
|
|
|
-import java.time.LocalDateTime;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -36,10 +32,6 @@ public class MuseumFlowController {
|
|
|
private MuseumFlowService museumFlowService;
|
|
|
private MuseumInfoService museumInfoService;
|
|
|
@Resource
|
|
|
- private RoleService roleService;
|
|
|
- @Resource
|
|
|
- private UserRoleMapper userRoleMapper;
|
|
|
- @Resource
|
|
|
private PermissionService permissionService;
|
|
|
|
|
|
|
|
@@ -73,7 +65,7 @@ public class MuseumFlowController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @GetMapping("/get")
|
|
|
+ @GetMapping("/getForm")
|
|
|
@Operation(summary = "查找表单")
|
|
|
public CommonResult<MuseumFlowRespVO> getMuseumFlow(@RequestParam("id") Integer id) {
|
|
|
MuseumFlowDO result = museumFlowService.selectMuseumFlow(id);
|
|
@@ -81,33 +73,46 @@ public class MuseumFlowController {
|
|
|
return CommonResult.success(result1);
|
|
|
}
|
|
|
|
|
|
- @GetMapping("/get-info")
|
|
|
- @Operation(summary = "查找标本信息")
|
|
|
- public CommonResult<List<MuseumFlowInfoVO>> getMuseumInfo(@RequestParam("number") List<String> number) {
|
|
|
+// @GetMapping("/selectPage")
|
|
|
+// @Operation(summary = "获取关于标本信息的分页")
|
|
|
+// public PageResult<MuseumInfoDO> selectPage(@Valid MuseumInfoPageReqVO pageVO) {
|
|
|
+// return museumInfoService.getMuseumInfoPage(pageVO);
|
|
|
+// }
|
|
|
+
|
|
|
+ @GetMapping("/page")
|
|
|
+ @Operation(summary = "根据表单id获取标本在总库中的信息")
|
|
|
+ public PageResult<MuseumFlowInfoVO> selectPageMuseumFlowFormIntel(@Valid MuseumFlowPageVO pageVO) {
|
|
|
+ return museumFlowService.selectPageMuseumFlowFormIntel(pageVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/getFormIntel")
|
|
|
+ @Operation(summary = "审批功能中根据id查找标本信息")
|
|
|
+ public CommonResult<MuseumFlowInfoVO> getFormIntel(@RequestParam("id") Integer id) {
|
|
|
Long UserId = getLoginUserId();
|
|
|
if (permissionService.hasAnyRoles(UserId, "operate")) {
|
|
|
- List<MuseumFlowInfoVO> informationList = new ArrayList<>();
|
|
|
- for (String number1 : number) {
|
|
|
- MuseumInfoDO result = museumFlowService.selectMuseumFlowSampleId(number1);
|
|
|
- if (result == null) {
|
|
|
- return CommonResult.error(200, "标本不存在");
|
|
|
+ List<MuseumInfoDO> museumInfoDO = new ArrayList<>();
|
|
|
+ MuseumFlowDO result = museumFlowService.selectMuseumFlowById(id);
|
|
|
+ MuseumFlowInfoVO form = BeanUtils.toBean(result, MuseumFlowInfoVO.class);
|
|
|
+ if (form != null) {
|
|
|
+ int State = form.getState();
|
|
|
+ if (State == 2) {
|
|
|
+ for (String number : form.getNumber()) {
|
|
|
+ MuseumInfoDO result1 = museumFlowService.selectMuseumFlowSampleId(number);
|
|
|
+ museumInfoDO.add(result1);
|
|
|
+ }
|
|
|
+ form.setMuseumInfoList(museumInfoDO);
|
|
|
+ return CommonResult.success(form);
|
|
|
} else {
|
|
|
- MuseumFlowDO event = museumFlowService.selectMuseumFlowNumber(number1);
|
|
|
- MuseumFlowInfoVO event1 = BeanUtils.toBean(event, MuseumFlowInfoVO.class);
|
|
|
- List<MuseumInfoDO> information = new ArrayList<>();
|
|
|
- information.add(result);
|
|
|
- event1.setMuseumInfoDO(information);
|
|
|
- informationList.add(event1);
|
|
|
-
|
|
|
+ return CommonResult.error(2, id + museumFlowService.isMuseumFlowStateForm(State));
|
|
|
}
|
|
|
+ } else {
|
|
|
+ return CommonResult.error(2, "该id对应的表单不存在");
|
|
|
}
|
|
|
- return CommonResult.success(informationList);
|
|
|
} else {
|
|
|
- return CommonResult.error(200, "您无此权限");
|
|
|
+ return CommonResult.error(2, "您无此权限");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@GetMapping("/menId")
|
|
|
@Operation(summary = "查询身份信息")
|
|
|
public CommonResult<Boolean> hasAnyRoles() {
|
|
@@ -120,226 +125,95 @@ public class MuseumFlowController {
|
|
|
}
|
|
|
|
|
|
@PostMapping("/outbound")
|
|
|
- @Operation(summary = "添加出库单")
|
|
|
+ @Operation(summary = "出库功能")
|
|
|
public CommonResult<Boolean> createMuseumFlowOutbound(@RequestBody MuseumFlowSaveVO saveVO) {
|
|
|
+ //TODO
|
|
|
Long UserId = getLoginUserId();
|
|
|
if (permissionService.hasAnyRoles(UserId, "operate")) {
|
|
|
- String sample_id = saveVO.getNumber();
|
|
|
- String number = saveVO.getNumber();
|
|
|
- MuseumInfoDO result = museumFlowService.selectMuseumFlowSampleId(sample_id);
|
|
|
- MuseumFlowDO event = museumFlowService.selectMuseumFlowNumber(number);
|
|
|
- AdminUserDO userList = museumFlowService.selectAdminUserDOById(UserId);
|
|
|
-// Save中 1现为未出库或已回库,0为已出库
|
|
|
-// State中 0现为未出库或已回库,1为已出库,2为审批中,3为审批通过,4为审批驳回
|
|
|
- if (result == null) {
|
|
|
- return CommonResult.error(200, "标本不存在");
|
|
|
- } else {
|
|
|
- if (event == null) {
|
|
|
- int Save = result.getStore();
|
|
|
- if (Save == 1) {
|
|
|
- LocalDateTime applyTime = LocalDateTime.now();
|
|
|
- saveVO.setApplyTime(applyTime);
|
|
|
- String name = result.getChineseName();
|
|
|
- saveVO.setSampleName(name);//标本名称
|
|
|
- museumFlowService.createMuseumFlow(saveVO);
|
|
|
- museumFlowService.updateMuseumFlowStateOutbound2(saveVO);//状态2 审批中
|
|
|
- return CommonResult.success(true);
|
|
|
- }
|
|
|
+ List<String> errorList = new ArrayList<>();
|
|
|
+// errorList.add(museumFlowService.isMuseumFlowIn(saveVO));
|
|
|
+// Save中 1现为未出库或已回库,0为已出库
|
|
|
+// State中 0在库,1为已出库,2为审批中,3为审批通过,4为审批驳回
|
|
|
+ for (String number : saveVO.getNumber()) {
|
|
|
+ MuseumInfoDO result = museumFlowService.selectMuseumFlowSampleId(number);
|
|
|
+ if (result == null) {
|
|
|
+ return CommonResult.error(2, number + "标本不存在");
|
|
|
} else {
|
|
|
- int State = event.getState();
|
|
|
- if (State == 0) {
|
|
|
- return CommonResult.error(200, "标本已回库");
|
|
|
- } else if (State == 1) {
|
|
|
- return CommonResult.error(200, "标本已出库");
|
|
|
- } else if (State == 2) {
|
|
|
- return CommonResult.error(200, "标本正在审批");
|
|
|
- } else if (State == 3) {
|
|
|
- return CommonResult.error(200, "标本审批已通过");
|
|
|
- } else if (State == 4) {
|
|
|
- return CommonResult.error(200, "标本已审批已驳回");
|
|
|
+ //TODO 判断在主库内是否是在库
|
|
|
+ if (result.getStore() == 0) {
|
|
|
+ return CommonResult.error(2, number + "标本已出库");
|
|
|
+ } else {
|
|
|
+ List<MuseumFlowDO> event = museumFlowService.selectMuseumFlowByNumbersLike(number);
|
|
|
+ if (event != null) {
|
|
|
+ errorList.addAll( museumFlowService.isMuseumFlowStateOutbound0(event));
|
|
|
+ }
|
|
|
}
|
|
|
- return CommonResult.error(200, "标本信息已存放在出入库的数据库中");
|
|
|
}
|
|
|
}
|
|
|
+ if (errorList.isEmpty()) {
|
|
|
+ museumFlowService.createMuseumFlow(saveVO);
|
|
|
+ return CommonResult.success(true);
|
|
|
+ } else {
|
|
|
+ return CommonResult.error(2, errorList.toString());
|
|
|
+ }
|
|
|
} else {
|
|
|
- return CommonResult.error(200, "您无此操作权限");
|
|
|
+ return CommonResult.error(2, "您无此操作权限");
|
|
|
}
|
|
|
- return CommonResult.success(true);
|
|
|
}
|
|
|
|
|
|
@PostMapping("outboundEnd")
|
|
|
@Operation(summary = "出库完成功能")
|
|
|
- public CommonResult<Boolean> createMuseumFlowOutboundEnd(@RequestBody MuseumFlowReviewVO reviewVO) {
|
|
|
+ public CommonResult<Boolean> createMuseumFlowOutboundEnd(@RequestBody MuseumFlowSaveVO saveVO) {
|
|
|
Long UserId = getLoginUserId();
|
|
|
if (permissionService.hasAnyRoles(UserId, "operate")) {
|
|
|
- List<String> sample_ids = reviewVO.getNumber();
|
|
|
- List<String> errorList = new ArrayList<>();
|
|
|
- List<String> sample_names = new ArrayList<>();
|
|
|
-//// Save中 1现为未出库或已回库,0为已出库
|
|
|
-//// State中 0现为未出库或已回库,1为已出库,2为审批中,3为审批通过,4为审批驳回
|
|
|
- for (String sample_id : sample_ids) {
|
|
|
- MuseumFlowDO event = museumFlowService.selectMuseumFlowNumber(sample_id);
|
|
|
- if (event != null) {
|
|
|
- int State = event.getState();
|
|
|
- if (State == 1) {
|
|
|
- errorList.add(sample_id + "标本已出库");
|
|
|
- } else if (State == 2) {
|
|
|
- errorList.add(sample_id + "标本正在审批");
|
|
|
- } else if (State == 3) {
|
|
|
- AdminUserDO userList = museumFlowService.selectAdminUserDOById(UserId);
|
|
|
- String name = event.getSampleName();
|
|
|
- sample_names.add(name);
|
|
|
- String reviewPerson = userList.getNickname();
|
|
|
- reviewVO.setReviewPerson(reviewPerson);
|
|
|
- } else if (State == 4) {
|
|
|
- errorList.add(sample_id + "标本审批已驳回");
|
|
|
- } else if (State == 0) {
|
|
|
- errorList.add(sample_id + "标本审批已回库");
|
|
|
- }
|
|
|
+ MuseumFlowDO result = museumFlowService.selectMuseumFlowById(saveVO.getId());
|
|
|
+ if (result != null) {
|
|
|
+ MuseumFlowReviewVO event = BeanUtils.toBean(result, MuseumFlowReviewVO.class);
|
|
|
+ int State = event.getState();
|
|
|
+ if (State == 3) {
|
|
|
+// Save中 1现为未出库或已回库,0为已出库
|
|
|
+// State中 0现为未出库或已回库,1为已出库,2为审批中,3为审批通过,4为审批驳回
|
|
|
+ museumFlowService.updateMuseumFlowSave0(event.getNumber());
|
|
|
+ museumFlowService.updateMuseumFlowOutbound(saveVO);
|
|
|
+ return CommonResult.success(true);
|
|
|
} else {
|
|
|
- errorList.add(sample_id + "标本未申请出库");
|
|
|
- }
|
|
|
- }
|
|
|
- if (errorList.isEmpty()) {
|
|
|
- for (String sample_id : sample_ids) {
|
|
|
- museumFlowService.updateMuseumFlowStateOutbound1(sample_id);
|
|
|
- museumFlowService.updateMuseumFlowSave0(sample_id);
|
|
|
+ return CommonResult.error(2, result.getNumber() + museumFlowService.isMuseumFlowStateForm(State));
|
|
|
}
|
|
|
- LocalDateTime outboundTime = LocalDateTime.now();
|
|
|
- reviewVO.setOutboundTime(outboundTime);
|
|
|
- reviewVO.setSampleName(sample_names);//设置标本名称
|
|
|
- reviewVO.setState(1);
|
|
|
- museumFlowService.createMuseumFlowReview(reviewVO);//创建表单
|
|
|
- return CommonResult.success(true);
|
|
|
} else {
|
|
|
- System.out.println(errorList);
|
|
|
- return CommonResult.error(200, errorList.toString());
|
|
|
+ return CommonResult.error(2, "找不到该审批单");
|
|
|
}
|
|
|
} else {
|
|
|
- return CommonResult.error(200, "您无此操作权限");
|
|
|
+ return CommonResult.error(2, "您无此操作权限");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @GetMapping("/selectPageS")
|
|
|
- @Operation(summary = "获取关于标本信息的分页")
|
|
|
- public PageResult<MuseumInfoDO> selectPageS(@Valid MuseumInfoPageReqVO pageVO) {
|
|
|
- return museumInfoService.getMuseumInfoPage(pageVO);
|
|
|
- }
|
|
|
-
|
|
|
- @GetMapping("/pagePerson")
|
|
|
- @Operation(summary = "获取关于出库员的分页")
|
|
|
- public PageResult<MuseumFlowDO> selectMuseumFlowOutboundPerson(@Valid MuseumFlowPageVO pageVO) {
|
|
|
- return museumFlowService.selectPageMuseumFlowOutboundPerson(pageVO);
|
|
|
- }
|
|
|
-
|
|
|
@PostMapping("/review")
|
|
|
- @Operation(summary = "通过的审批单")
|
|
|
+ @Operation(summary = "审批功能")
|
|
|
public CommonResult<Boolean> createMuseumFlowReview(@RequestBody MuseumFlowReviewVO reviewVO) {
|
|
|
Long UserId = getLoginUserId();
|
|
|
- List<String> sample_ids = reviewVO.getNumber();
|
|
|
- List<String> errorList = new ArrayList<>();
|
|
|
- List<String> sample_names = new ArrayList<>();
|
|
|
-//// Save中 1现为未出库或已回库,0为已出库
|
|
|
-//// State中 0现为未出库或已回库,1为已出库,2为审批中,3为审批通过,4为审批驳回
|
|
|
- if (permissionService.hasAnyRoles(UserId, "leader")) {
|
|
|
- for (String sample_id : sample_ids) {
|
|
|
- MuseumInfoDO result = museumFlowService.selectMuseumFlowSampleId(sample_id);
|
|
|
- MuseumFlowDO event = museumFlowService.selectMuseumFlowNumber(sample_id);
|
|
|
- String name = result.getChineseName();
|
|
|
- if (event != null) {
|
|
|
- int State = event.getState();
|
|
|
- if (State == 2) {
|
|
|
- sample_names.add(name);
|
|
|
- } else if (State == 3) {
|
|
|
- errorList.add(sample_id + "标本审批已通过");
|
|
|
- } else if (State == 4) {
|
|
|
- errorList.add(sample_id + "标本审批已驳回");
|
|
|
- } else {
|
|
|
- if (State == 0) {
|
|
|
- errorList.add(sample_id + "标本审批已回库");
|
|
|
- } else if (State == 1) {
|
|
|
- errorList.add(sample_id + "标本已出库");
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- errorList.add(sample_id + "标本未申请出库");
|
|
|
- }
|
|
|
- }
|
|
|
- if (errorList.isEmpty()) {
|
|
|
- for (String sample_id : sample_ids) {
|
|
|
- museumFlowService.updateMuseumFlowStateReview3(sample_id);
|
|
|
- }
|
|
|
- AdminUserDO userList = museumFlowService.selectAdminUserDOById(UserId);
|
|
|
- String reviewPerson = userList.getNickname();
|
|
|
- reviewVO.setReviewPerson(reviewPerson);
|
|
|
- reviewVO.setSampleName(sample_names);//设置标本名称
|
|
|
- LocalDateTime reviewTime = LocalDateTime.now();
|
|
|
- reviewVO.setReviewTime(reviewTime);
|
|
|
- museumFlowService.createMuseumFlowReview(reviewVO);//创建表单
|
|
|
- museumFlowService.updateMuseumFlowStateReviews3(reviewVO);//更改标本状态为3 审批通过
|
|
|
- return CommonResult.success(true);
|
|
|
- } else {
|
|
|
- System.out.println(errorList);
|
|
|
- return CommonResult.error(200, errorList.toString());
|
|
|
- }
|
|
|
- } else {
|
|
|
- return CommonResult.error(200, "您无此操作权限");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @PostMapping("/reject")
|
|
|
- @Operation(summary = "新增驳回的审批单")
|
|
|
- public CommonResult<Boolean> createMuseumFlowReject(@RequestBody MuseumFlowReviewVO reviewVO) {
|
|
|
- Long UserId = getLoginUserId();
|
|
|
- List<String> sample_ids = reviewVO.getNumber();
|
|
|
- List<String> errorList = new ArrayList<>();
|
|
|
- List<String> sample_names = new ArrayList<>();
|
|
|
//// Save中 1现为未出库或已回库,0为已出库
|
|
|
//// State中 0现为未出库或已回库,1为已出库,2为审批中,3为审批通过,4为审批驳回
|
|
|
if (permissionService.hasAnyRoles(UserId, "leader")) {
|
|
|
- for (String sample_id : sample_ids) {
|
|
|
- MuseumInfoDO result = museumFlowService.selectMuseumFlowSampleId(sample_id);
|
|
|
- MuseumFlowDO event = museumFlowService.selectMuseumFlowNumber(sample_id);
|
|
|
- String name = result.getChineseName();
|
|
|
- if (event != null) {
|
|
|
- int State = event.getState();
|
|
|
- if (State == 2) {
|
|
|
- sample_names.add(name);
|
|
|
- } else if (State == 3) {
|
|
|
- errorList.add(sample_id + "标本审批已通过");
|
|
|
- } else if (State == 4) {
|
|
|
- errorList.add(sample_id + "标本审批已驳回");
|
|
|
+ MuseumFlowDO result = museumFlowService.selectMuseumFlowById(reviewVO.getId());
|
|
|
+ MuseumFlowReviewVO event = BeanUtils.toBean(result, MuseumFlowReviewVO.class);
|
|
|
+ if (event != null) {
|
|
|
+ int State = event.getState();
|
|
|
+ if (State == 2) {
|
|
|
+ int state = reviewVO.getState();
|
|
|
+ if (state == 3 || state == 4) {
|
|
|
+ museumFlowService.updateMuseumFlowStateReview(BeanUtils.toBean(reviewVO, MuseumFlowDO.class));
|
|
|
+ return CommonResult.success(true);
|
|
|
} else {
|
|
|
- if (State == 0) {
|
|
|
- errorList.add(sample_id + "标本审批已回库");
|
|
|
- } else if (State == 1) {
|
|
|
- errorList.add(sample_id + "标本已出库");
|
|
|
- }
|
|
|
+ return CommonResult.error(2, result.getId() + museumFlowService.isMuseumFlowStateForm(state));
|
|
|
}
|
|
|
} else {
|
|
|
- errorList.add(sample_id + "标本未申请出库");
|
|
|
- }
|
|
|
- }
|
|
|
- if (errorList.isEmpty()) {
|
|
|
- for (String sample_id : sample_ids) {
|
|
|
- museumFlowService.updateMuseumFlowStateReview4(sample_id);
|
|
|
+ return CommonResult.error(2, result.getId() + museumFlowService.isMuseumFlowStateForm(State));
|
|
|
}
|
|
|
- AdminUserDO userList = museumFlowService.selectAdminUserDOById(UserId);
|
|
|
- String reviewPerson = userList.getNickname();
|
|
|
- reviewVO.setReviewPerson(reviewPerson);
|
|
|
- reviewVO.setSampleName(sample_names);//设置标本名称
|
|
|
- LocalDateTime reviewTime = LocalDateTime.now();
|
|
|
- reviewVO.setReviewTime(reviewTime);
|
|
|
- museumFlowService.createMuseumFlowReview(reviewVO);//创建表单
|
|
|
- museumFlowService.updateMuseumFlowStateReviews4(reviewVO);//更改标本状态为出库
|
|
|
-// museumFlowService.selectPageS(respVO);
|
|
|
- return CommonResult.success(true);
|
|
|
} else {
|
|
|
- System.out.println(errorList);
|
|
|
- return CommonResult.error(200, errorList.toString());
|
|
|
+ return CommonResult.error(2, result.getId() + "id输入错误");
|
|
|
}
|
|
|
} else {
|
|
|
- return CommonResult.error(200, "您无此操作权限");
|
|
|
+ return CommonResult.error(2, "您无此操作权限");
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -347,40 +221,25 @@ public class MuseumFlowController {
|
|
|
@Operation(summary = "回库功能")
|
|
|
public CommonResult<Boolean> createMuseumFlowReturn(@RequestBody MuseumFlowReturnVO returnVO) {
|
|
|
Long UserId = getLoginUserId();
|
|
|
- String number = returnVO.getNumber();
|
|
|
- String sample_id = returnVO.getNumber();
|
|
|
- MuseumFlowDO event = museumFlowService.selectMuseumFlowNumber(number);
|
|
|
- MuseumInfoDO result = museumFlowService.selectMuseumFlowSampleId(sample_id);
|
|
|
-// Save中 1现为未出库或已回库,0为已出库
|
|
|
-// State中 0现为未出库或已回库,1为已出库,2为审批中,3为审批通过,4为审批驳回
|
|
|
+//// Save中 1现为未出库或已回库,0为已出库
|
|
|
+//// State中 0现为未出库或已回库,1为已出库,2为审批中,3为审批通过,4为审批驳回
|
|
|
if (permissionService.hasAnyRoles(UserId, "operate")) {
|
|
|
- if (event == null) {
|
|
|
- return CommonResult.error(200, "标本未申请出库");
|
|
|
- } else {
|
|
|
- int Save = result.getStore();
|
|
|
- if (Save == 0) {
|
|
|
- int State = event.getState();
|
|
|
- if (State == 0) {
|
|
|
- return CommonResult.error(200, "标本已返回库中");
|
|
|
- } else if (State == 1) {
|
|
|
- museumFlowService.updateMuseumFlowStateReturn1(returnVO);
|
|
|
- museumFlowService.updateMuseumFlowSave1(sample_id);
|
|
|
- LocalDateTime returnTime = LocalDateTime.now();
|
|
|
- returnVO.setReturnTime(returnTime);
|
|
|
- } else if (State == 2) {
|
|
|
- return CommonResult.error(200, "标本正在审批");
|
|
|
- } else if (State == 3) {
|
|
|
- return CommonResult.error(200, "标本审批已通过但未出库");
|
|
|
- } else if (State == 4) {
|
|
|
- return CommonResult.error(200, "标本审批已驳回");
|
|
|
- }
|
|
|
+ MuseumFlowDO result = museumFlowService.selectMuseumFlowById(returnVO.getId());
|
|
|
+ MuseumFlowReviewVO event = BeanUtils.toBean(result, MuseumFlowReviewVO.class);
|
|
|
+ if (event != null) {
|
|
|
+ int State = event.getState();
|
|
|
+ if (State == 1) {
|
|
|
+ museumFlowService.updateMuseumFlowSave1(event.getNumber());
|
|
|
+ museumFlowService.updateMuseumFlowStateReturn(returnVO);
|
|
|
+ return CommonResult.success(true);
|
|
|
} else {
|
|
|
- return CommonResult.error(200, "标本还未出库");
|
|
|
+ return CommonResult.error(2, returnVO.getId() + museumFlowService.isMuseumFlowStateForm(State));
|
|
|
}
|
|
|
+ } else {
|
|
|
+ return CommonResult.error(2, returnVO.getId() + "id输入错误");
|
|
|
}
|
|
|
- return CommonResult.success(true);
|
|
|
} else {
|
|
|
- return CommonResult.error(200, "您无此操作权限");
|
|
|
+ return CommonResult.error(2, "您无此操作权限");
|
|
|
}
|
|
|
}
|
|
|
}
|