update:初版对账
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#
|
||||
server:
|
||||
port: 8080
|
||||
port: 18089
|
||||
servlet:
|
||||
context-path: /
|
||||
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user