|
@@ -1,5 +1,6 @@
|
|
|
package cn.iocoder.yudao.module.museums.controller.admin.specimenoutbound;
|
|
|
|
|
|
+import cn.iocoder.yudao.module.museums.controller.admin.specimeninfo.vo.SpecimenInfoPageReqVO;
|
|
|
import cn.iocoder.yudao.module.museums.dal.mysql.specimenoutbound.SpecimenOutboundMapper;
|
|
|
import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -86,7 +87,7 @@ public class SpecimenOutboundController {
|
|
|
|
|
|
@PutMapping("/recompile")
|
|
|
@Operation(summary = "修改标本出库信息")
|
|
|
- @PreAuthorize("@ss.hasPermission('museums:specimen-outbound:update')")
|
|
|
+ @PreAuthorize("@ss.hasPermission('museums:specimen-outbound:recompile')")
|
|
|
public CommonResult<Boolean> recompileSpecimenOutbound(@Valid @RequestBody SpecimenOutboundSaveReqVO updateReqVO) {
|
|
|
// 从数据库获取当前标本出库信息
|
|
|
SpecimenOutboundDO specimenOutbound = specimenOutboundMapper.selectById(updateReqVO.getId());
|
|
@@ -149,7 +150,7 @@ public class SpecimenOutboundController {
|
|
|
@GetMapping("/getReturn")
|
|
|
@Operation(summary = "获得标本回库信息")
|
|
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
|
- @PreAuthorize("@ss.hasPermission('museums:specimen-outbound:query')")
|
|
|
+ @PreAuthorize("@ss.hasPermission('museums:specimen-outbound:return')")
|
|
|
public CommonResult<SpecimenOutboundRespVO> getSpecimenReturnInformation(@RequestParam("id") Long id) {
|
|
|
SpecimenOutboundDO specimenOutbound = specimenOutboundService.getSpecimenReturnInformation(id);
|
|
|
if (specimenOutbound != null && specimenOutbound.getStatus() == 4) {
|
|
@@ -229,15 +230,28 @@ public class SpecimenOutboundController {
|
|
|
}
|
|
|
|
|
|
//获取出库单,方便操作员查看标本编号、图片及标本存放位置等。
|
|
|
+// @GetMapping("/specimenInfo")
|
|
|
+// @Operation(summary = "获得标本出库单")
|
|
|
+// @Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
|
+// @PreAuthorize("@ss.hasPermission('museums:specimen-outbound:query')")
|
|
|
+// public CommonResult<SpecimenOutboundWithInfoRespVO> getSpecimen(@RequestParam("id") Long id) {
|
|
|
+// SpecimenOutboundWithInfoRespVO specimenOutbound = specimenOutboundService.getSpecimenOutboundWithInfo(id);
|
|
|
+// if (specimenOutbound == null) {
|
|
|
+// throw exception(SPECIMEN_OUTBOUND_ORDER_NOT_EXISTS);
|
|
|
+// }
|
|
|
+// return success(specimenOutbound);
|
|
|
+// }
|
|
|
@GetMapping("/specimenInfo")
|
|
|
- @Operation(summary = "获得标本出库单")
|
|
|
+ @Operation(summary = "获得标本出库单及分页的关联标本信息")
|
|
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
|
@PreAuthorize("@ss.hasPermission('museums:specimen-outbound:query')")
|
|
|
- public CommonResult<SpecimenOutboundWithInfoRespVO> getSpecimen(@RequestParam("id") Long id) {
|
|
|
- SpecimenOutboundWithInfoRespVO specimenOutbound = specimenOutboundService.getSpecimenOutboundWithInfo(id);
|
|
|
+ public CommonResult<SpecimenOutboundWithInfoRespVO> getSpecimen(@RequestParam("id") Long id,
|
|
|
+ @Valid SpecimenInfoPageReqVO pageReqVO) {
|
|
|
+ SpecimenOutboundWithInfoRespVO specimenOutbound = specimenOutboundService.getSpecimenOutboundWithInfo(id, pageReqVO);
|
|
|
if (specimenOutbound == null) {
|
|
|
throw exception(SPECIMEN_OUTBOUND_ORDER_NOT_EXISTS);
|
|
|
}
|
|
|
return success(specimenOutbound);
|
|
|
}
|
|
|
+
|
|
|
}
|