update:初版对账

This commit is contained in:
Yuan
2025-09-17 11:20:06 +08:00
parent e2959b738b
commit e63ace40fd
6 changed files with 49 additions and 74 deletions

View File

@@ -92,8 +92,8 @@ public class HISGetDataMethodByJH {
calendar.add(Calendar.DATE, -1);
Date time = calendar.getTime();
// startTime = DateDUtil.DateToStr(DateDUtil.yyyy_MM_dd, time) + " 00:00:00";
// endTime = DateDUtil.DateToStr(DateDUtil.yyyy_MM_dd, new Date()) + " 00:00:00";
startTime = DateDUtil.DateToStr(DateDUtil.yyyy_MM_dd, time) + " 00:00:00";
endTime = DateDUtil.DateToStr(DateDUtil.yyyy_MM_dd, new Date()) + " 00:00:00";
trade_date=DateDUtil.DateToStr(DateDUtil.yyyy_MM_dd, time);
}else {
startTime = trade_date + " 00:00:00";
@@ -105,8 +105,8 @@ public class HISGetDataMethodByJH {
}
//组织request
startTime="2024-08-06 15:33:12";
endTime="2024-08-07 15:33:12";
// startTime="2024-08-06 15:33:12";
// endTime="2024-08-07 15:33:12";
String requestStr="";
requestStr="<Request>" +
" <HisOperNum>"+ operatorsCodeStr +"</HisOperNum>" +

View File

@@ -8,6 +8,8 @@ import com.saye.hospitalgd.service.*;
import com.saye.hospitalgd.service.historyLog.ReconciliationLogService;
import com.saye.hospitalgd.service.historyLog.impl.ReconciliationLogServiceImpl;
import com.saye.hospitalgd.service.impl.*;
import com.saye.hospitalgd.service.system.ServiceParamsService;
import com.saye.hospitalgd.service.system.impl.ServiceParamsServiceImpl;
import java.math.BigDecimal;
@@ -41,7 +43,7 @@ public class ReconciliationMethod {
ReconciliationLogService reconciliationLogService = GetBeanUtil.getBean(ReconciliationLogServiceImpl.class);
// ServiceParamsService serviceParamsService = GetBeanUtil.getBean(ServiceParamsServiceImpl.class);
ServiceParamsService serviceParamsService = GetBeanUtil.getBean(ServiceParamsServiceImpl.class);
HisbillsHistoryService hisbillsHistoryService = GetBeanUtil.getBean(HisbillsHistoryServiceImpl.class);
@@ -72,8 +74,10 @@ public class ReconciliationMethod {
TransactionDetailService transactionDetailService = GetBeanUtil.getBean(TransactionDetailServiceImpl.class);
UnilateralService unilateralService = GetBeanUtil.getBean(UnilateralServiceImpl.class);
String cash_code = StringDUtil.changeNullToEmpty(serviceParamsService.findParamValByParamCode("cash_code"));
//先创建关联表 用来后面查询交易明细
// searchMap.put("cash_code", cash_code);
searchMap.put("cash_code", cash_code);
transactionDetailService.insertHisAndThirdJoinData(searchMap);
@@ -458,6 +462,7 @@ public class ReconciliationMethod {
searchNotUniqueObjMap.put("orderby_je", "true");
//todo
//his端重复记录
List<HashMap<Object, Object>> list = hisbillsHistoryService.findHisDetailByParam(searchNotUniqueObjMap);
// hisDetailService.findHisDetailByParam(searchNotUniqueObjMap);

View File

@@ -1,6 +1,6 @@
#
server:
port: 8080
port: 18089
servlet:
context-path: /

View File

@@ -37,27 +37,9 @@
</if>
</select>
<select id="findBankBillsByDate" parameterType="HashMap" resultType="HashMap">
select I_JYRQ
, I_JYSJ
, I_JZRQ
, I_YHLSH
, I_SHLSH
, I_DDH
, I_DDZT
, I_FKFZH
, I_FKFHM
, I_DDJE
, I_JYJE
, I_SXF
, I_JSJE
, I_GTDM
, I_FXK
, I_ZFKZ
, I_JYLX
, I_QS
from bankbills_history
where I_JYRQ = #{trade_date}
select *
from bankbill_history
where C_JYRQ = #{trade_date}
</select>
<insert id="saveOriginalData" parameterType="java.util.List">
insert into bankbills_original (

View File

@@ -21,20 +21,8 @@
#{xtjsh}, #{zdh}, #{jykh}, #{zfzt})
</insert>
<select id="findHisBillsByDate" parameterType="HashMap" resultType="HashMap">
select HisOperCode
, PayMethod
, TradingStatus
, BizType
, PayType
, TradeTime
, Amount
, PlatformTransId
, HisTransId
, PatientID
, PatientName
, source
, trade_date
from hisbills_history
select *
from hisbill_history
where trade_date = #{trade_date}
</select>

View File

@@ -88,29 +88,29 @@
, PayType
, HisOperNum, PatientID, PatientName
, sort_date, trade_date, err_type, check_result, is_active)
select concat(b.I_JYRQ, ' ', b.I_JYSJ) as jysj
, b.I_DDH
, b.I_JYJE
, b.I_JYLX
, b.I_FXK
, b.I_JYSJ
select concat(b.C_JYRQ, ' ', b.C_JYSJ) as jysj
, b.C_YSDDH
, b.C_JYJE
, b.C_JYLX
, b.C_FKH
, b.C_JYSJ
, a.PlatformTransId
, a.BizType
, a.TradingStatus
, a.Amount
, a.PayType
, a.HisOperCode
, a.PatientID
, a.PatientId
, a.PatientName
, a.TradeTime
, a.trade_date
, ''
, '0'
, '1'
from (select * from hisbills_history where trade_date = #{trade_date}) a
from (select * from hisbill_history where trade_date = #{trade_date} and payType!=#{cash_code}) a
inner join
(select * from bankbills_history where I_JYRQ = #{trade_date}) b
on a.PlatformTransId = b.I_DDH and a.TradingStatus = b.I_JYLX and a.Amount+0 = b.I_JYJE+0
(select * from bankbill_history where C_JYRQ = #{trade_date}) b
on a.PlatformTransId = b.C_YSDDH and a.TradingStatus = b.C_JYLX and a.Amount+0 = b.C_JYJE+0
</insert>
<insert id="insertHisUnilateral" parameterType="HashMap">
@@ -119,29 +119,29 @@
, HisOperNum, PatientID, PatientName
, sort_date, trade_date, err_type, check_result, is_active)
select a.TradeTime as jysj
, b.I_DDH
, b.I_JYJE
, b.I_JYLX
, b.I_FXK
, b.I_JYSJ
, b.C_YSDDH
, b.C_JYJE
, b.C_JYLX
, b.C_FKH
, b.C_JYSJ
, a.PlatformTransId
, a.BizType
, a.TradingStatus
, a.Amount
, a.PayType
, a.HisOperCode
, a.PatientID
, a.PatientId
, a.PatientName
, a.TradeTime
, a.trade_date
, '1'
, '1'
, '1'
from (select * from hisbills_history where trade_date = #{trade_date}) a
from (select * from hisbill_history where trade_date = #{trade_date} and payType!=#{cash_code}) a
left join
(select * from bankbills_history where I_JYRQ = #{trade_date}) b
on a.PlatformTransId = b.I_DDH and a.TradingStatus = b.I_JYLX and a.Amount+0 = b.I_JYJE+0
where b.I_DDH is null
(select * from bankbill_history where C_JYRQ = #{trade_date}) b
on a.PlatformTransId = b.C_YSDDH and a.TradingStatus = b.C_JYLX and a.Amount+0 = b.C_JYJE+0
where b.C_YSDDH is null
</insert>
<insert id="insertThirdUnilateral" parameterType="HashMap">
@@ -149,29 +149,29 @@
, PayType
, HisOperNum, PatientID, PatientName
, sort_date, trade_date, err_type, check_result, is_active)
select concat(b.I_JYRQ, ' ', b.I_JYSJ) as jysj
, b.I_DDH
, b.I_JYJE
, b.I_JYLX
, b.I_FXK
, b.I_JYSJ
select concat(b.C_JYRQ, ' ', b.C_JYSJ) as jysj
, b.C_YSDDH
, b.C_JYJE
, b.C_JYLX
, b.C_FKH
, b.C_JYSJ
, a.HisTransId
, a.BizType
, a.TradingStatus
, a.Amount
, a.PayType
, a.HisOperCode
, a.PatientID
, a.PatientId
, a.PatientName
, b.I_JYSJ
, b.I_JYRQ
, b.C_JYSJ
, b.C_JYRQ
, '2'
, '1'
, '1'
from (select * from hisbills_history where trade_date = #{trade_date}) a
from (select * from hisbill_history where trade_date = #{trade_date} and payType!=#{cash_code}) a
right join
(select * from bankbills_history where I_JYRQ = #{trade_date}) b
on a.PlatformTransId = b.I_DDH and a.TradingStatus = b.I_JYLX and a.Amount + 0 = b.I_JYJE + 0
(select * from bankbill_history where C_JYRQ = #{trade_date}) b
on a.PlatformTransId = b.C_YSDDH and a.TradingStatus = b.C_JYLX and a.Amount + 0 = b.C_JYJE + 0
where a.PlatformTransId is null
</insert>