From 8a696df0dc708989e9f46a59056b206684a5e622 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期四, 10 四月 2025 10:53:28 +0800
Subject: [PATCH] 已领用的 也支持拆机
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/vo/DevRentRespVO.java | 3 +++
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentService.java | 2 +-
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/DevRentController.java | 10 ++++------
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java | 4 ++--
4 files changed, 10 insertions(+), 9 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 d119636..20ee98f 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
@@ -1,12 +1,10 @@
package cn.lihu.jh.module.ecg.controller.admin.devrent;
-import cn.lihu.jh.framework.common.util.exception.ExceptionUtils;
import cn.lihu.jh.framework.security.core.util.SecurityFrameworkUtils;
import cn.lihu.jh.module.ecg.dal.dataobject.devmanage.DeviceDO;
import cn.lihu.jh.module.ecg.enums.DevStateEnum;
import cn.lihu.jh.module.ecg.service.devmanage.DeviceService;
import cn.lihu.jh.module.ecg.service.queue.QueueService;
-import io.swagger.v3.oas.models.security.SecurityScheme;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
@@ -27,7 +25,6 @@
import cn.lihu.jh.framework.apilog.core.annotation.ApiAccessLog;
import static cn.lihu.jh.framework.apilog.core.enums.OperateTypeEnum.*;
-import static cn.lihu.jh.module.ecg.enums.ErrorCodeConstants.*;
import cn.lihu.jh.module.ecg.controller.admin.devrent.vo.*;
import cn.lihu.jh.module.ecg.dal.dataobject.devrent.DevRentDO;
@@ -248,12 +245,12 @@
return CommonResult.success(devRentRespVO);
}
- @GetMapping("/get-installed-rent")
- @Operation(summary = "鑾峰彇宸插畨瑁呯璧佹儏鍐�")
+ @GetMapping("/get-existing-rent")
+ @Operation(summary = "鑾峰彇宸插畨瑁呫�佸凡棰嗙敤鐨勭璧佹儏鍐�")
@PreAuthorize("@ss.hasPermission('ecg:doctor:task')")
public CommonResult<DevRentRespVO> getInstalledRent( @Valid DevRentSearchReqVO searchReqVO )
{
- DevRentDO devRent = devRentService.getInstalledOrCancelledRent( searchReqVO );
+ DevRentDO devRent = devRentService.getExistingRent( searchReqVO );
if (null == devRent) {
return CommonResult.success(null);
}
@@ -264,6 +261,7 @@
devRentRespVO.setCategory( deviceDO.getCategory() );
devRentRespVO.setBrand( deviceDO.getBrand() );
devRentRespVO.setModel( deviceDO.getModel() );
+ devRentRespVO.setDevState( devRent.getState() );
return CommonResult.success(devRentRespVO);
}
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/vo/DevRentRespVO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/vo/DevRentRespVO.java
index 5aed9ce..016d8b8 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/vo/DevRentRespVO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/vo/DevRentRespVO.java
@@ -94,4 +94,7 @@
@Schema(description = "鍨嬪彿")
private String model;
+
+ @Schema(description = "璁惧鐘舵��")
+ private Integer devState;
}
\ No newline at end of file
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentService.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentService.java
index 58beb4d..e34d230 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentService.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentService.java
@@ -133,7 +133,7 @@
*/
PageResult<DevRentDO> getDevRentPage(DevRentPageReqVO pageReqVO);
- DevRentDO getInstalledOrCancelledRent(DevRentSearchReqVO searchReqVO);
+ DevRentDO getExistingRent(DevRentSearchReqVO searchReqVO);
DevRentDO getFreeRent(DevRentSearchReqVO searchReqVO);
DevRentDO getReadyOrCancelledRent(DevRentSearchReqVO searchReqVO);
DevRentDO getDismantledRent(DevRentSearchReqVO searchReqVO);
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java
index f43f465..45c883e 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java
@@ -688,10 +688,10 @@
}
@Override
- public DevRentDO getInstalledOrCancelledRent(DevRentSearchReqVO searchReqVO) {
+ public DevRentDO getExistingRent(DevRentSearchReqVO searchReqVO) {
List<Integer> stateList = new ArrayList<>();
stateList.add( DevRentStateEnum.INSTALLED.getState() );
- stateList.add( DevRentStateEnum.INSTALL_CANCELLED.getState());
+ stateList.add( DevRentStateEnum.READY.getState());
searchReqVO.setStateList( stateList );
return devRentMapper.getRentByState(searchReqVO);
}
--
Gitblit v1.9.3