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); calendar.add(Calendar.DATE, -1);
Date time = calendar.getTime(); Date time = calendar.getTime();
// startTime = DateDUtil.DateToStr(DateDUtil.yyyy_MM_dd, time) + " 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"; endTime = DateDUtil.DateToStr(DateDUtil.yyyy_MM_dd, new Date()) + " 00:00:00";
trade_date=DateDUtil.DateToStr(DateDUtil.yyyy_MM_dd, time); trade_date=DateDUtil.DateToStr(DateDUtil.yyyy_MM_dd, time);
}else { }else {
startTime = trade_date + " 00:00:00"; startTime = trade_date + " 00:00:00";
@@ -105,8 +105,8 @@ public class HISGetDataMethodByJH {
} }
//组织request //组织request
startTime="2024-08-06 15:33:12"; // startTime="2024-08-06 15:33:12";
endTime="2024-08-07 15:33:12"; // endTime="2024-08-07 15:33:12";
String requestStr=""; String requestStr="";
requestStr="<Request>" + requestStr="<Request>" +
" <HisOperNum>"+ operatorsCodeStr +"</HisOperNum>" + " <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.ReconciliationLogService;
import com.saye.hospitalgd.service.historyLog.impl.ReconciliationLogServiceImpl; import com.saye.hospitalgd.service.historyLog.impl.ReconciliationLogServiceImpl;
import com.saye.hospitalgd.service.impl.*; 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; import java.math.BigDecimal;
@@ -41,7 +43,7 @@ public class ReconciliationMethod {
ReconciliationLogService reconciliationLogService = GetBeanUtil.getBean(ReconciliationLogServiceImpl.class); ReconciliationLogService reconciliationLogService = GetBeanUtil.getBean(ReconciliationLogServiceImpl.class);
// ServiceParamsService serviceParamsService = GetBeanUtil.getBean(ServiceParamsServiceImpl.class); ServiceParamsService serviceParamsService = GetBeanUtil.getBean(ServiceParamsServiceImpl.class);
HisbillsHistoryService hisbillsHistoryService = GetBeanUtil.getBean(HisbillsHistoryServiceImpl.class); HisbillsHistoryService hisbillsHistoryService = GetBeanUtil.getBean(HisbillsHistoryServiceImpl.class);
@@ -72,8 +74,10 @@ public class ReconciliationMethod {
TransactionDetailService transactionDetailService = GetBeanUtil.getBean(TransactionDetailServiceImpl.class); TransactionDetailService transactionDetailService = GetBeanUtil.getBean(TransactionDetailServiceImpl.class);
UnilateralService unilateralService = GetBeanUtil.getBean(UnilateralServiceImpl.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); transactionDetailService.insertHisAndThirdJoinData(searchMap);
@@ -458,6 +462,7 @@ public class ReconciliationMethod {
searchNotUniqueObjMap.put("orderby_je", "true"); searchNotUniqueObjMap.put("orderby_je", "true");
//todo
//his端重复记录 //his端重复记录
List<HashMap<Object, Object>> list = hisbillsHistoryService.findHisDetailByParam(searchNotUniqueObjMap); List<HashMap<Object, Object>> list = hisbillsHistoryService.findHisDetailByParam(searchNotUniqueObjMap);
// hisDetailService.findHisDetailByParam(searchNotUniqueObjMap); // hisDetailService.findHisDetailByParam(searchNotUniqueObjMap);

View File

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

View File

@@ -37,27 +37,9 @@
</if> </if>
</select> </select>
<select id="findBankBillsByDate" parameterType="HashMap" resultType="HashMap"> <select id="findBankBillsByDate" parameterType="HashMap" resultType="HashMap">
select I_JYRQ select *
, I_JYSJ from bankbill_history
, I_JZRQ where C_JYRQ = #{trade_date}
, 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> </select>
<insert id="saveOriginalData" parameterType="java.util.List"> <insert id="saveOriginalData" parameterType="java.util.List">
insert into bankbills_original ( insert into bankbills_original (

View File

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

View File

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