From 6ae75c73e98f11e50725fe44949ae690b3a4c4a9 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期三, 11 十二月 2024 13:01:24 +0800
Subject: [PATCH] 根据检查类型决定是否确费
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java | 15 +++++++++++++--
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/checktype/CheckTypeMapper.java | 6 ++++++
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/checktype/CheckTypeMapper.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/checktype/CheckTypeMapper.java
index de911b4..3a3b54f 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/checktype/CheckTypeMapper.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/checktype/CheckTypeMapper.java
@@ -56,4 +56,10 @@
})
List<CheckTypeDO> simpleCheckTypeList();
+ @Select("SELECT * FROM lihu.check_type where value = #{checkTypeCode} limit 1;")
+ @Results({
+ @Result(property = "displayBarcode", column = "display_barcode", typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler.class),
+ @Result(property = "affinityCheckTypes", column = "affinity_check_types", typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler.class)
+ })
+ CheckTypeDO getCheckTypeByValue(@Param("checkTypeCode") Integer checkTypeCode);
}
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 d3722b7..69f3e1a 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
@@ -10,6 +10,7 @@
import cn.lihu.jh.module.ecg.dal.dataobject.patient.PatDetails;
import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO;
import cn.lihu.jh.module.ecg.dal.mysql.appointment.AppointmentMapper;
+import cn.lihu.jh.module.ecg.dal.mysql.checktype.CheckTypeMapper;
import cn.lihu.jh.module.ecg.dal.mysql.devmanage.DeviceMapper;
import cn.lihu.jh.module.ecg.dal.mysql.jobrecord.JobRecordMapper;
import cn.lihu.jh.module.ecg.dal.mysql.queue.QueueMapper;
@@ -74,6 +75,9 @@
@Resource
QueueMapper queueMapper;
+
+ @Resource
+ CheckTypeMapper checkTypeMapper;
@Override
public CommonResult<Long> registerOperation(DevRentSaveReqVO createReqVO) {
@@ -726,11 +730,18 @@
}
// 纭垂澶勭悊
+ // 杩斿洖鍊�: 0 鎴愬姛 1 澶辫触 2 涓嶇敤纭垂
@Override
public Integer feeConfirm(Long rentId, String hisId, String userNickname, Boolean isFeeConfirmOrCancel) {
DevRentDO devRentDO = devRentMapper.selectById(rentId);
- PatDetails patDetails = devRentDO.getPatDetails();
+ // 鏌ヨ妫�鏌ョ被鍨嬶紝纭畾鏄惁闇�瑕佺‘璐�
+ CheckTypeDO checkTypeDO = checkTypeMapper.getCheckTypeByValue(devRentDO.getCheckType());
+ if (0 == checkTypeDO.getExpenseRecognition()) {
+ return 2;
+ }
+
+ PatDetails patDetails = devRentDO.getPatDetails();
HisFeeConfirmReqBody hisFeeConfirmReqBody = new HisFeeConfirmReqBody();
MsgHeader msgHeader = new MsgHeader();
msgHeader.setMsgType("ODS_2212");
@@ -758,7 +769,7 @@
if (0 == returnValue) {
devRentMapper.setPaid(rentId, isFeeConfirmOrCancel ? 1 : 0);
}
- return returnValue; // 0 鎴愬姛 1 澶辫触
+ return returnValue; // 0 鎴愬姛 1 澶辫触 2 涓嶇敤纭垂
}
// 鏍囪 璁惧宸茶棰嗗彇
--
Gitblit v1.9.3