|
@@ -168,108 +168,19 @@ public class SpecimenOutboundController {
|
|
|
@Operation(summary = "根据出库登记情况统计本年标本出库信息")
|
|
|
@Parameter(name = "year", description = "年份", required = true, example = "2024")
|
|
|
@PreAuthorize("@ss.hasPermission('museums:specimen-outbound:query')")
|
|
|
- public CommonResult<List<SpecimenOutboundDO>> getOutboundStatistics(@PathVariable int year) {
|
|
|
- List<SpecimenOutboundDO> outboundStatistics = specimenOutboundService.getOutboundStatistics(year);
|
|
|
+ public CommonResult<List<SpecimenOutboundOutgoingReqVO>> getOutboundStatistics(@PathVariable int year) {
|
|
|
+ List<SpecimenOutboundOutgoingReqVO> outboundStatistics = specimenOutboundService.getOutboundStatistics(year);
|
|
|
return success(outboundStatistics);
|
|
|
}
|
|
|
|
|
|
@GetMapping("/statistics/return/{year}")
|
|
|
@Operation(summary = "统计本年标本回库信息")
|
|
|
@Parameter(name = "year", description = "年份", required = true, example = "2024")
|
|
|
- public CommonResult<List<SpecimenOutboundDO>> getReturnStatistics(@PathVariable int year) {
|
|
|
- List<SpecimenOutboundDO> result = specimenOutboundService.getReturnStatistics(year);
|
|
|
+ public CommonResult<List<SpecimenOutboundReturnReqVO>> getReturnStatistics(@PathVariable int year) {
|
|
|
+ List<SpecimenOutboundReturnReqVO> result = specimenOutboundService.getReturnStatistics(year);
|
|
|
return success(result);
|
|
|
}
|
|
|
|
|
|
-// @GetMapping("/outboundOrder")
|
|
|
-// @Operation(summary = "获得标本出库单")
|
|
|
-// @Parameter(name = "infoIds", description = "标本ID列表", required = true, example = "1,2,3,4")
|
|
|
-// @PreAuthorize("@ss.hasPermission('museums:specimen-outbound:query')")
|
|
|
-// public CommonResult<List<SpecimenOutboundInfoVO>> getSpecimenOutbound(@RequestParam("infoIds") String infoIds) {
|
|
|
-// List<Long> ids = Arrays.stream(infoIds.split(","))
|
|
|
-// .map(Long::valueOf)
|
|
|
-// .collect(Collectors.toList());
|
|
|
-// List<SpecimenOutboundDO> specimenOutbounds = specimenOutboundService.getSpecimenOutboundsByIds(ids);
|
|
|
-//
|
|
|
-// // 手动转换 SpecimenOutboundDO 到 SpecimenOutboundRespVO
|
|
|
-// List<SpecimenOutboundInfoVO> response = specimenOutbounds.stream()
|
|
|
-// .map(outbound -> {
|
|
|
-// SpecimenOutboundInfoVO vo = new SpecimenOutboundInfoVO();
|
|
|
-// vo.setId(outbound.getId());
|
|
|
-// vo.setChineseName(outbound.getChineseName());
|
|
|
-// vo.setSpecimenNumber(outbound.getSpecimenNumber());
|
|
|
-// vo.setApplicantName(outbound.getApplicantName());
|
|
|
-// vo.setApplicationDate(outbound.getApplicationDate());
|
|
|
-// vo.setImagePath(outbound.getImagePath());
|
|
|
-// vo.setStorageLocation(outbound.getStorageLocation());
|
|
|
-// // 这里可以继续设置其他字段
|
|
|
-// return vo;
|
|
|
-// })
|
|
|
-// .collect(Collectors.toList());
|
|
|
-//
|
|
|
- //能用
|
|
|
-// return success(response);
|
|
|
-// }
|
|
|
-
|
|
|
-// @GetMapping("/specimenInfo")
|
|
|
-// @Operation(summary = "获得标本信息")
|
|
|
-// @Parameter(name = "outboundOrderId", description = "标本出库回库表的ID", required = true, example = "1")
|
|
|
-// @PreAuthorize("@ss.hasPermission('museums:specimen-outbound:query')")
|
|
|
-// public CommonResult<List<SpecimenOutboundInfoVO>> getSpecimenInfo(@RequestParam("outboundOrderId") Long outboundOrderId) {
|
|
|
-// // 根据出库单ID获取信息
|
|
|
-// List<SpecimenOutboundDO> specimenOutbounds = specimenOutboundService.getSpecimenOutboundsByOutboundOrderId(outboundOrderId);
|
|
|
-//
|
|
|
-// // 手动转换 SpecimenOutboundDO 到 SpecimenOutboundInfoVO
|
|
|
-// List<SpecimenOutboundInfoVO> response = specimenOutbounds.stream()
|
|
|
-// .map(outbound -> {
|
|
|
-// SpecimenOutboundInfoVO vo = new SpecimenOutboundInfoVO();
|
|
|
-// vo.setInfoId(outbound.getInfoId()); // 直接获取infoId
|
|
|
-// vo.setImagePath(outbound.getImagePath());
|
|
|
-// vo.setStorageLocation(outbound.getStorageLocation());
|
|
|
-// vo.setSpecimenNumber(outbound.getSpecimenNumber());
|
|
|
-// return vo;
|
|
|
-// })
|
|
|
-// .collect(Collectors.toList());
|
|
|
-//
|
|
|
-// return success(response);
|
|
|
-// }
|
|
|
-
|
|
|
-// @GetMapping("/specimenInfo")
|
|
|
-// @Operation(summary = "获得标本信息")
|
|
|
-// @Parameter(name = "outboundOrderId", description = "标本出库回库表的ID", required = true, example = "1")
|
|
|
-// @PreAuthorize("@ss.hasPermission('museums:specimen-outbound:query')")
|
|
|
-// public CommonResult<List<SpecimenOutboundInfoVO>> getSpecimenInfo(@RequestParam("outboundOrderId") Long outboundOrderId) {
|
|
|
-// // 根据出库单ID获取信息
|
|
|
-// List<SpecimenOutboundDO> specimenOutbounds = specimenOutboundService.getSpecimenOutboundsByOutboundOrderId(outboundOrderId);
|
|
|
-//
|
|
|
-// // 手动转换 SpecimenOutboundDO 到 SpecimenOutboundInfoVO
|
|
|
-// List<SpecimenOutboundInfoVO> response = specimenOutbounds.stream()
|
|
|
-// .map(outbound -> {
|
|
|
-// SpecimenOutboundInfoVO vo = new SpecimenOutboundInfoVO();
|
|
|
-// vo.setInfoId(outbound.getInfoId()); // 直接获取infoId
|
|
|
-// vo.setImagePath(outbound.getImagePath());
|
|
|
-// vo.setStorageLocation(outbound.getStorageLocation());
|
|
|
-// vo.setSpecimenNumber(outbound.getSpecimenNumber());
|
|
|
-// return vo;
|
|
|
-// })
|
|
|
-// .collect(Collectors.toList());
|
|
|
-//
|
|
|
-// return success(response);
|
|
|
-// }
|
|
|
-
|
|
|
-// @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(NO_PERMISSION_VIEW_NON_RETURNED_SPECIMENS);
|
|
|
-// }
|
|
|
-//
|
|
|
-// return success(specimenOutbound);
|
|
|
-// }
|
|
|
|
|
|
@GetMapping("/specimenInfo")
|
|
|
@Operation(summary = "获得标本出库回库信息")
|