update:his账单明细查询页面

This commit is contained in:
Yuan
2025-08-21 10:00:57 +08:00
parent f18ec9ff2e
commit b636852ad7
10 changed files with 128 additions and 106 deletions

View File

@@ -3,21 +3,21 @@
<mapper namespace="com.saye.hospitalgd.mapper.HisDetailMapper">
<select id="findHisDetail" parameterType="HashMap" resultType="HashMap">
select HisOperCode
,PayMethod
select PayMethod
,TradingStatus
,BizType
,PayType
,TradeTime
,HisOperCode
,Amount
,remarks
,PlatformTransId
,HisTransId
,PatientID
,PatientId
,PatientName
,trade_date
,source
from hisbills_history
,his_wsdl_id
,HisTransId
from hisbill_history
<where>
<if test="payType!=null and payType!=''">
and PayType = #{payType}
@@ -35,6 +35,26 @@
order by trade_date,TradeTime
</select>
<!-- 添加一个明确的count查询避免分页插件的自动生成问题 -->
<select id="findHisDetailCount" parameterType="HashMap" resultType="long">
select count(1)
from hisbill_history
<where>
<if test="payType!=null and payType!=''">
and PayType = #{payType}
</if>
<if test="startTime!=null and startTime!=''">
and trade_date &gt;= #{startTime}
</if>
<if test="endTime!=null and endTime!=''">
and trade_date &lt;= #{endTime}
</if>
<if test="likeFiled!=null and likeFiled!=''">
and PlatformTransId like concat('%',concat(#{likeFiled},'%'))
</if>
</where>
</select>
<delete id="deleteHisBillOriginalByParam" parameterType="HashMap">
delete from hisbill_original where trade_date=#{trade_date}
</delete>
@@ -86,18 +106,15 @@
)
</foreach>
</insert>
<!--insert into hisbill_history(PayMethod,TradingStatus,BizType,PayType,TradeTime,HisOperCode,Amount,remarks,PlatformTransId,PatientId,PatientName,trade_date,his_wsdl_id)
select a.PayMethod,a.TradingStatus,a.BizType,a.PayType,a.TradeTime,a.HisOperCode,a.Amount,a.remarks,a.PlatformTransId,a.PatientId,a.PatientName,a.trade_date,a.his_wsdl_id
from hisbill_original a
where a.trade_date=#{trade_date} 之前的存一份省的又改回来-->
<insert id="insertAllHisBillHistory" parameterType="java.util.List">
insert into
hisbill_history(PayMethod,TradingStatus,BizType,PayType,TradeTime,HisOperCode,Amount,remarks,PlatformTransId,PatientId,PatientName,trade_date,his_wsdl_id)
hisbill_history(PayMethod,TradingStatus,BizType,PayType,TradeTime,HisOperCode,Amount,remarks,PlatformTransId,PatientId,PatientName,trade_date,his_wsdl_id,HisTransId)
values
<foreach collection="list" index="index" item="itm" separator=",">
(
#{itm.payMethod},#{itm.tradingStatus},#{itm.bizType},#{itm.payType},#{itm.tradeTime},#{itm.hisOperCode},#{itm.amount},#{itm.remarks},#{itm.platformTransId},#{itm.patientId}
,#{itm.patientName},#{itm.trade_date},#{itm.his_wsdl_id}
,#{itm.patientName},#{itm.trade_date},#{itm.his_wsdl_id},#{itm.hisTransId}
)
</foreach>
</insert>
@@ -116,37 +133,36 @@
</insert>
<select id="findHisDetailByParam" parameterType="HashMap" resultType="HashMap">
select BRNM
,BRID
,ZFJE
,HISDDH
,GHDDH
,ZFFS
,CZY
,JYRQ
,JYSJ
,XTJSH
,ZDH
,JYKH
,ZFZT
from hisbills_history
select PayMethod
,TradingStatus
,BizType
,PayType
,TradeTime
,HisOperCode
,Amount
,remarks
,PlatformTransId
,PatientId
,PatientName
,trade_date
,his_wsdl_id
,HisTransId
from hisbill_history
where trade_date=#{trade_date}
<if test="h_ghddh!=null and h_ghddh!=''">
and H_GHDDH=#{h_ghddh}
<if test="payType!=null and payType!=''">
and PayType = #{payType}
</if>
<if test="zfzt!=null and zfzt!=''">
and ZFZT=#{zfzt}
<if test="tradingStatus!=null and tradingStatus!=''">
and TradingStatus = #{tradingStatus}
</if>
<if test="orderby_je!=null and orderby_je!=''">
order by ZFJE desc
<if test="orderby_amount!=null and orderby_amount!=''">
order by Amount desc
</if>
</select>
<select id="findHisDetailByTimeAndYSDDH" parameterType="HashMap" resultType="HashMap">
select PayMethod,TradingStatus,BizType,PayType,TradeTime,HisOperCode,Amount,remarks,PlatformTransId,
PatientId,PatientName
PatientId,PatientName,HisTransId
from hisbill_history
where trade_date=#{searchTime}
and PlatformTransId = #{c_ysddh}
@@ -161,7 +177,7 @@
</select>
<select id="findHisCashDetail" parameterType="HashMap" resultType="HashMap">
select PayMethod, TradingStatus, BizType, PayType, TradeTime, HisOperCode, Amount, remarks, PlatformTransId, PatientId, PatientName, trade_date, his_wsdl_id
select PayMethod, TradingStatus, BizType, PayType, TradeTime, HisOperCode, Amount, remarks, PlatformTransId, PatientId, PatientName, trade_date, his_wsdl_id, HisTransId
from hisbill_history
where trade_date=#{trade_date} and PayType='5'
</select>