update:修复军保统计页面bug
This commit is contained in:
@@ -187,13 +187,13 @@
|
||||
from hisbill_history
|
||||
<where>
|
||||
<if test="payType!=null and payType!=''">
|
||||
and PayType = #{payType}
|
||||
and (PayType = #{payType} or PayType = CAST(#{payType} AS UNSIGNED))
|
||||
</if>
|
||||
<if test="startTime!=null and startTime!=''">
|
||||
and (TradeTime >= #{startTime} or trade_date >= #{startTime})
|
||||
and trade_date >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null and endTime!=''">
|
||||
and (TradeTime <= #{endTime} or trade_date <= #{endTime})
|
||||
and trade_date <= #{endTime}
|
||||
</if>
|
||||
<if test="likeFiled!=null and likeFiled!=''">
|
||||
and PlatformTransId like concat('%',concat(#{likeFiled},'%'))
|
||||
|
||||
@@ -24,11 +24,8 @@
|
||||
select *
|
||||
from hisbill_history
|
||||
where trade_date = #{trade_date}
|
||||
<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>
|
||||
</select>
|
||||
|
||||
@@ -50,11 +47,8 @@
|
||||
|
||||
from hisbills_history
|
||||
where trade_date=#{trade_date}
|
||||
<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>
|
||||
<if test="tranID!=null and tranID!=''">
|
||||
and HisTransId=#{tranID}
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -122,3 +122,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -67,3 +67,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user