| | |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/dev-lose") |
| | | @Operation(summary = "遗失") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") |
| | | public CommonResult<Long> devLose(@Valid @RequestBody DevRentSaveReqVO loseReqVO) { |
| | | try { |
| | | return devRentService.loseOperation(loseReqVO); |
| | | } catch ( RuntimeException runtimeException ) { |
| | | String err = ExceptionUtils.formatException( runtimeException ); |
| | | log.error("devLose: " + err); |
| | | return CommonResult.error(DEV_LOSE_EXCEPTION); |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/create") |
| | | @Operation(summary = "创建装机拆机") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") |
| | |
| | | |
| | | @GetMapping("/get-latest-rent") |
| | | @Operation(summary = "获取患者设备的最近租赁情况") |
| | | @Parameter(name = "dev-id", description = "设备编号", required = true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") |
| | | public CommonResult<DevRentRespVO> getLatestRent( @RequestParam("dev-id") String devId ) |
| | | public CommonResult<DevRentRespVO> getLatestRent( @Valid DevRentSearchReqVO searchReqVO ) |
| | | { |
| | | DevRentDO devRent = devRentService.getLatestRent( devId ); |
| | | DevRentDO devRent = devRentService.getLatestRent( searchReqVO ); |
| | | return CommonResult.success(BeanUtils.toBean(devRent, DevRentRespVO.class)); |
| | | } |
| | | } |