From f2f709bbefa5052ff89b91c534c118f10a45363f Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期一, 25 十一月 2024 21:54:42 +0800
Subject: [PATCH] 装机设备需要医生手动输入,防止出错
---
jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/ErrorCodeConstants.java | 1 +
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/ErrorCodeConstants.java b/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/ErrorCodeConstants.java
index 658fdc1..e7e097e 100644
--- a/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/ErrorCodeConstants.java
+++ b/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/ErrorCodeConstants.java
@@ -35,6 +35,7 @@
ErrorCode DEVICE_NOT_EXISTS = new ErrorCode(1_010_005_001, "璁惧涓嶅瓨鍦�");
ErrorCode DEVICE_NOT_FREE = new ErrorCode(1_010_005_002, "璁惧闈炵┖闂叉垨涓嶅瓨鍦�");
ErrorCode DEVICE_NOT_RECEIVED = new ErrorCode(1_010_005_003, "璁惧鏈鐢ㄦ垨涓嶅瓨鍦�");
+ ErrorCode DEVICE_NOT_PAT_RECEIVED = new ErrorCode(1_010_005_004, "涓嶆槸璇ユ偅鑰呴鐢ㄧ殑璁惧");
ErrorCode DEV_INSTALL_NOT_EXISTS = new ErrorCode(1_010_006_000, "瑁呮満涓嶅瓨鍦�");
ErrorCode DEV_INSTALL_EXCEPTION = new ErrorCode(1_010_006_001, "瑁呮満鍐呴儴閿欒");
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 16fb61b..c74c791 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
@@ -252,10 +252,11 @@
String userNickname = SecurityFrameworkUtils.getLoginUserNickname();
Long rent_id = createReqVO.getId();
- // 瀵逛簬宸叉湁棰嗙敤锛屼絾鏄鏈烘椂浣跨敤鐨勪笉鏄凡棰嗙敤璁惧锛岄渶閲婃斁 婧愰鐢� 璁惧
DevRentDO devRentDO = getDevRent(rent_id);
+
+ // 瀵逛簬宸叉湁棰嗙敤锛屼絾鏄鏈烘椂浣跨敤鐨勪笉鏄凡棰嗙敤璁惧锛屾姤閿�
if ( null != devRentDO.getDevId() && !createReqVO.getDevId().equals(devRentDO.getDevId()) ) {
- markDevFree( devRentDO.getDevId(), rent_id);
+ throw exception(DEVICE_NOT_PAT_RECEIVED);
}
// 璁剧疆璁惧 浣跨敤涓�
--
Gitblit v1.9.3