Compare commits

...

3 Commits

Author SHA1 Message Date
Elliott
ea813c3dc5 update:财付通金额统计sql不区分操作员大小写 2026-02-06 10:10:26 +08:00
Elliott
1e21ea3c81 update:建行龙支付区分自助机住院账单 2026-01-13 16:46:39 +08:00
Elliott
bad857217d bugfix:银行一正一负交易不自动核销 2026-01-08 14:48:54 +08:00
4 changed files with 16 additions and 36 deletions

View File

@@ -716,13 +716,18 @@ public class BankGetDataMethodByJHLZF {
bankbillHistory.setCZddh(""); // 子订单号(空) bankbillHistory.setCZddh(""); // 子订单号(空)
bankbillHistory.setBillTableName("建行龙支付对账单"); // 对账表名 bankbillHistory.setBillTableName("建行龙支付对账单"); // 对账表名
// 根据终端号判断是否为住院订单 String shddh = bankbillHistory.getCShddh();
// 终端号为10091548或10091549的为住院订单不参与对账 if ("10091548".equals(zdh)
if ("10091548".equals(zdh) || "10091549".equals(zdh) || "10091546".equals(zdh) || "10091547".equals(zdh) || "10091544".equals(zdh) || "10091545".equals(zdh)) { || "10091549".equals(zdh)
bankbillHistory.setIsInpatient("1"); // 标记为住院订单 || "10091546".equals(zdh)
log.info("标记为住院订单: 终端号=" + zdh + ", 订单号=" + bankbillHistory.getCShddh()); || "10091547".equals(zdh)
|| "10091544".equals(zdh)
|| "10091545".equals(zdh)
|| (shddh != null && shddh.endsWith("ZZJZY"))) {
bankbillHistory.setIsInpatient("1");
log.info("标记为住院订单: 终端号=" + zdh + ", 订单号=" + shddh);
} else { } else {
bankbillHistory.setIsInpatient("0"); // 标记为非住院订单 bankbillHistory.setIsInpatient("0");
} }
bankbillHistoryList.add(bankbillHistory); bankbillHistoryList.add(bankbillHistory);

View File

@@ -75,23 +75,6 @@
<if test="likeFiled!=null and likeFiled!=''"> <if test="likeFiled!=null and likeFiled!=''">
and C_SHDDH like concat('%',concat(#{likeFiled},'%')) and C_SHDDH like concat('%',concat(#{likeFiled},'%'))
</if> </if>
and C_SHDDH in (
select C_SHDDH
from bankbill_history
<where>
<if test="startTime!=null and startTime!=''">
and C_JYRQ &gt;= #{startTime}
</if>
<if test="endTime!=null and endTime!=''">
and C_JYRQ &lt;= #{endTime}
</if>
<if test="c_zffs!=null and c_zffs!=''">
and C_ZFFS = #{c_zffs}
</if>
</where>
group by C_SHDDH
having ROUND(SUM(CAST(C_JYJE AS DECIMAL(18,2))), 2) != 0
)
</where> </where>
order by C_JYRQ,C_JYSJ order by C_JYRQ,C_JYSJ
</select> </select>

View File

@@ -69,7 +69,7 @@
<if test="endTime != null and endTime != ''"> <if test="endTime != null and endTime != ''">
AND trade_date &lt;= #{endTime} AND trade_date &lt;= #{endTime}
</if> </if>
AND LOWER(HisOperCode) in ('wx' , 'yb') AND HisOperCode in ('wx' , 'yb')
AND TradingStatus = '1' AND TradingStatus = '1'
AND PayType in ('2','1') AND PayType in ('2','1')
</where> </where>
@@ -93,7 +93,7 @@
<if test="endTime != null and endTime != ''"> <if test="endTime != null and endTime != ''">
AND trade_date &lt;= #{endTime} AND trade_date &lt;= #{endTime}
</if> </if>
AND LOWER(HisOperCode) in ('wx' , 'yb') AND HisOperCode in ('wx' , 'yb')
AND TradingStatus = '2' AND TradingStatus = '2'
AND PayType in ('2','1') AND PayType in ('2','1')
</where> </where>
@@ -109,7 +109,7 @@
<if test="endTime != null and endTime != ''"> <if test="endTime != null and endTime != ''">
AND trade_date &lt;= #{endTime} AND trade_date &lt;= #{endTime}
</if> </if>
AND LOWER(HisOperCode) in ('wx' , 'yb') AND HisOperCode in ('wx' , 'yb')
AND TradingStatus IN ('1','2') AND TradingStatus IN ('1','2')
AND PayType in ('2','1') AND PayType in ('2','1')
</where> </where>

View File

@@ -217,7 +217,7 @@
from (select * from hisbill_history where trade_date = #{trade_date} and payType!=#{cash_code} from (select * from hisbill_history where trade_date = #{trade_date} and payType!=#{cash_code}
and PayMethod != '2' -- 排除不参与对账的记录 and PayMethod != '2' -- 排除不参与对账的记录
and PayType != '9' -- 排除账户支付,不参与常规对账 and PayType != '9' -- 排除账户支付,不参与常规对账
and PayType != '10' -- 排除统筹支付,不参与常规对账 and PayType != '10'
<if test="military_code != null and military_code != ''"> <if test="military_code != null and military_code != ''">
and payType!=#{military_code} and payType!=#{military_code}
</if> </if>
@@ -236,15 +236,7 @@
select * from bankbill_history select * from bankbill_history
where C_JYRQ = #{trade_date} where C_JYRQ = #{trade_date}
and (is_inpatient is null or is_inpatient = '0') and (is_inpatient is null or is_inpatient = '0')
and C_SHDDH in ( ) b
select C_SHDDH
from bankbill_history
where C_JYRQ = #{trade_date}
and (is_inpatient is null or is_inpatient = '0')
group by C_SHDDH
having ROUND(SUM(CAST(C_JYJE AS DECIMAL(18,2))), 2) != 0
)
) b -- 排除住院订单且排除同订单号正负抵消为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) 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 where a.PlatformTransId is null
</insert> </insert>