From f77fbfc8c07881f5239ce49b0dc78faaec3628b0 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期二, 10 十二月 2024 12:09:24 +0800
Subject: [PATCH] Fix Bug: 无预约时间的在预约表会有多条记录

---
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

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..d3722b7 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);
         }
 
         // 璁剧疆璁惧 浣跨敤涓�
@@ -747,7 +748,7 @@
         item.setExeDateTime( getCurTimeString() ); //
         ExmRequest exmRequest = new ExmRequest();
         exmRequest.setAuthorOrganization("47162057-2");
-        exmRequest.setRequestId( patDetails.getApplyNo() );  //
+        exmRequest.setRequestId( devRentDO.getApplyNo() );  //
         exmRequest.setPatientType( getPatientType(patDetails.getSource()) ); //
         exmRequest.setItem(item);
         hisFeeConfirmReqBody.setExmRequest(exmRequest);
@@ -757,7 +758,7 @@
         if (0 == returnValue) {
             devRentMapper.setPaid(rentId, isFeeConfirmOrCancel ? 1 : 0);
         }
-        return returnValue;
+        return returnValue;  // 0 鎴愬姛  1 澶辫触
     }
 
     // 鏍囪 璁惧宸茶棰嗗彇

--
Gitblit v1.9.3