From 9ddc38c82866653987733935c380496a79d70945 Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期五, 13 九月 2024 15:26:03 +0800 Subject: [PATCH] 设备遗失功能完成 --- jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/DevRentController.java | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/DevRentController.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/DevRentController.java index a1bca10..f153b61 100644 --- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/DevRentController.java +++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/DevRentController.java @@ -82,6 +82,19 @@ } } + @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')") @@ -138,11 +151,10 @@ @GetMapping("/get-latest-rent") @Operation(summary = "鑾峰彇鎮h�呰澶囩殑鏈�杩戠璧佹儏鍐�") - @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)); } } -- Gitblit v1.9.3