update:修复军保统计页面bug

This commit is contained in:
Yuan
2025-10-23 15:11:04 +08:00
parent ff5bad9967
commit 94e8850a40
16 changed files with 237 additions and 355 deletions

View File

@@ -71,7 +71,7 @@
select a.PlatformTransId, a.Amount, b.C_JYJE, a.PayType, b.C_ZFFS, a.trade_date, a.TradeTime
from temp_hisbill_history a
left join temp_bankbill_history b on a.PlatformTransId = b.C_YSDDH
where a.Amount != b.C_JYJE
where ROUND(CAST(a.Amount AS DECIMAL(18,2)), 2) != ROUND(CAST(b.C_JYJE AS DECIMAL(18,2)), 2)
</select>
<select id="findHisAndThirdJoinDataNumByTime" parameterType="HashMap" resultType="HashMap">
@@ -95,7 +95,7 @@
, HisOperNum, PatientID, PatientName
, sort_date, trade_date, err_type, check_result, is_active)
select concat(b.C_JYRQ, ' ', b.C_JYSJ) as jysj
, b.C_YSDDH
, b.C_SHDDH
, b.C_JYJE
, b.C_JYLX
, b.C_ZFFS
@@ -114,16 +114,13 @@
, '0'
, '1'
from (select * from hisbill_history where trade_date = #{trade_date} and payType!=#{cash_code}
<if test="excludeMilitaryOperators != null and excludeMilitaryOperators.size() > 0">
and HisOperCode not in
<foreach collection="excludeMilitaryOperators" item="operator" open="(" separator="," close=")">
#{operator.HisOperCode}
</foreach>
<if test="military_code != null and military_code != ''">
and payType!=#{military_code}
</if>
) a
inner join
(select * from bankbill_history where C_JYRQ = #{trade_date}) b
on a.PlatformTransId = b.C_SHDDH and a.TradingStatus = b.C_JYLX and a.Amount+0 = b.C_JYJE+0
on a.PlatformTransId = b.C_SHDDH and a.TradingStatus = b.C_JYLX and ROUND(CAST(a.Amount AS DECIMAL(18,2)), 2) = ROUND(CAST(b.C_JYJE AS DECIMAL(18,2)), 2)
</insert>
<insert id="insertHisUnilateral" parameterType="HashMap">
@@ -132,7 +129,7 @@
, HisOperNum, PatientID, PatientName
, sort_date, trade_date, err_type, check_result, is_active)
select a.TradeTime as jysj
, b.C_YSDDH
, b.C_SHDDH
, b.C_JYJE
, b.C_JYLX
, b.C_ZFFS
@@ -151,16 +148,13 @@
, '1'
, '1'
from (select * from hisbill_history where trade_date = #{trade_date} and payType!=#{cash_code}
<if test="excludeMilitaryOperators != null and excludeMilitaryOperators.size() > 0">
and HisOperCode not in
<foreach collection="excludeMilitaryOperators" item="operator" open="(" separator="," close=")">
#{operator.HisOperCode}
</foreach>
<if test="military_code != null and military_code != ''">
and payType!=#{military_code}
</if>
) a
left join
(select * from bankbill_history where C_JYRQ = #{trade_date}) b
on a.PlatformTransId = b.C_SHDDH and a.TradingStatus = b.C_JYLX and a.Amount+0 = b.C_JYJE+0
on a.PlatformTransId = b.C_SHDDH and a.TradingStatus = b.C_JYLX and ROUND(CAST(a.Amount AS DECIMAL(18,2)), 2) = ROUND(CAST(b.C_JYJE AS DECIMAL(18,2)), 2)
where b.C_SHDDH is null
</insert>
@@ -170,12 +164,12 @@
, HisOperNum, PatientID, PatientName
, sort_date, trade_date, err_type, check_result, is_active)
select concat(b.C_JYRQ, ' ', b.C_JYSJ) as jysj
, b.C_YSDDH
, b.C_SHDDH
, b.C_JYJE
, b.C_JYLX
, b.C_ZFFS
, b.C_JYSJ
, a.HisTransId
, a.PlatformTransId
, a.BizType
, a.TradingStatus
, a.Amount
@@ -189,16 +183,13 @@
, '1'
, '1'
from (select * from hisbill_history where trade_date = #{trade_date} and payType!=#{cash_code}
<if test="excludeMilitaryOperators != null and excludeMilitaryOperators.size() > 0">
and HisOperCode not in
<foreach collection="excludeMilitaryOperators" item="operator" open="(" separator="," close=")">
#{operator.HisOperCode}
</foreach>
<if test="military_code != null and military_code != ''">
and payType!=#{military_code}
</if>
) a
right join
(select * from bankbill_history where C_JYRQ = #{trade_date}) b
on a.PlatformTransId = b.C_SHDDH and a.TradingStatus = b.C_JYLX and a.Amount + 0 = b.C_JYJE + 0
on a.PlatformTransId = b.C_SHDDH and a.TradingStatus = b.C_JYLX and ROUND(CAST(a.Amount AS DECIMAL(18,2)), 2) = ROUND(CAST(b.C_JYJE AS DECIMAL(18,2)), 2)
where a.PlatformTransId is null
</insert>
@@ -324,7 +315,7 @@
check_result='1'
where trade_date = #{trade_date}
and check_result = '0'
and (I_JYJE + 0) != (Amount + 0)
and ROUND(CAST(I_JYJE AS DECIMAL(18,2)), 2) != ROUND(CAST(Amount AS DECIMAL(18,2)), 2)
</update>
<delete id="deleteHisAndThirdJoinData" parameterType="HashMap">