update:建行账单接入
This commit is contained in:
@@ -3,21 +3,54 @@
|
||||
<mapper namespace="com.saye.hospitalgd.mapper.historyLog.ReconciliationLogMapper">
|
||||
|
||||
<select id="findReconciliationLogPageList" parameterType="HashMap" resultType="HashMap">
|
||||
select trade_date,modify_time,create_time,manager_num,status,user_name,remark
|
||||
from reconciliation_info
|
||||
|
||||
<where>
|
||||
<if test="startTime!=null and startTime!=''">
|
||||
and trade_date >=#{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null and endTime!=''">
|
||||
and trade_date <=#{endTime}
|
||||
</if>
|
||||
<if test="status!=null and status!=''">
|
||||
and status=#{status}
|
||||
</if>
|
||||
</where>
|
||||
order by trade_date desc
|
||||
select
|
||||
t.trade_date as TRADE_DATE,
|
||||
t.modify_time as MODIFY_TIME,
|
||||
t.create_time as CREATE_TIME,
|
||||
t.manager_num as MANAGER_NUM,
|
||||
t.status as STATUS,
|
||||
t.user_name as USER_NAME,
|
||||
t.remark as REMARK
|
||||
from (
|
||||
select
|
||||
trade_date,
|
||||
modify_time,
|
||||
create_time,
|
||||
manager_num,
|
||||
status,
|
||||
user_name,
|
||||
remark,
|
||||
ROW_NUMBER() OVER (PARTITION BY trade_date ORDER BY create_time DESC) as rn
|
||||
from reconciliation_info
|
||||
<where>
|
||||
<!-- 确保trade_date是有效的日期格式 -->
|
||||
and trade_date is not null
|
||||
and trade_date != ''
|
||||
and trade_date REGEXP '^[0-9]{4}-[0-9]{2}-[0-9]{2}$'
|
||||
<!-- 确保status是有效值 -->
|
||||
and status in ('0', '1')
|
||||
<!-- 确保manager_num是整数且不包含小数点(排除金额数据) -->
|
||||
and manager_num is not null
|
||||
and manager_num not like '%.%'
|
||||
and manager_num REGEXP '^[0-9]+$'
|
||||
and CAST(manager_num AS UNSIGNED) < 10000
|
||||
<!-- 确保时间字段不包含小数点(排除金额数据) -->
|
||||
and (modify_time is null or modify_time not like '%.%')
|
||||
and (create_time is null or create_time not like '%.%')
|
||||
|
||||
<if test="startTime!=null and startTime!=''">
|
||||
and trade_date >=#{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null and endTime!=''">
|
||||
and trade_date <=#{endTime}
|
||||
</if>
|
||||
<if test="status!=null and status!=''">
|
||||
and status=#{status}
|
||||
</if>
|
||||
</where>
|
||||
) t
|
||||
where t.rn = 1
|
||||
order by t.trade_date desc
|
||||
</select>
|
||||
|
||||
<select id="findReconciliationLogByParam" parameterType="HashMap" resultType="HashMap">
|
||||
|
||||
Reference in New Issue
Block a user