From 1d7f0862e5f4c4bcc0e4661661de015d24b45855 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期二, 26 十一月 2024 22:55:37 +0800
Subject: [PATCH] 自动确费 异常处理
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 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 c7bacba..50f0a29 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
@@ -21,6 +21,7 @@
import cn.lihu.jh.module.ecg.service.queue.QueueServiceTxFunctions;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
@@ -53,13 +54,14 @@
*/
@Service
@Validated
+@Slf4j
public class DevRentServiceImpl implements DevRentService {
@Resource
QueueServiceTxFunctions queueServiceTxFunctions;
@Resource
- private RemoteDataService remoteDataService;
+ private FeeConfirmFeignService feeConfirmFeignService;
@Resource
private DevRentMapper devRentMapper;
@@ -250,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);
}
// 璁剧疆璁惧 浣跨敤涓�
@@ -749,12 +752,13 @@
exmRequest.setPatientType( getPatientType(patDetails.getSource()) ); //
exmRequest.setItem(item);
hisFeeConfirmReqBody.setExmRequest(exmRequest);
- HisFeeConfirmRespResult result = remoteDataService.httpFeeApi("UpdateExmRequestStatus", "ECG", "ECG", hisFeeConfirmReqBody);
+ HisFeeConfirmRespResult result = feeConfirmFeignService.httpFeeApi("UpdateExmRequestStatus", "ECG", "ECG", hisFeeConfirmReqBody);
+ log.info( result.getMsgHeader().getStatus() );
Integer returnValue = result.getMsgHeader().getStatus().equals("true") ? 0 : 1;
if (0 == returnValue) {
devRentMapper.setPaid(rentId, isFeeConfirmOrCancel ? 1 : 0);
}
- return returnValue;
+ return returnValue; // 0 鎴愬姛 1 澶辫触
}
// 鏍囪 璁惧宸茶棰嗗彇
--
Gitblit v1.9.3