给账户流水接口增加筛选条件
This commit is contained in:
@@ -230,6 +230,16 @@
|
||||
<if test="accountId != null">
|
||||
and dh.account_id=#{accountId}
|
||||
</if>
|
||||
<if test="number != null and number !=''">
|
||||
<bind name="bindNumber" value="'%'+number+'%'"/>
|
||||
and dh.number like #{bindNumber}
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime !=''">
|
||||
and dh.oper_time >= #{beginTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime !=''">
|
||||
and dh.oper_time <= #{endTime}
|
||||
</if>
|
||||
and ifnull(dh.change_amount, 0)!=0
|
||||
and ifnull(dh.delete_flag,'0') !='1'
|
||||
<!--主表收入和支出涉及的账户 -->
|
||||
@@ -240,6 +250,16 @@
|
||||
<if test="accountId != null">
|
||||
and ah.account_id=#{accountId}
|
||||
</if>
|
||||
<if test="number != null and number !=''">
|
||||
<bind name="bindNumber" value="'%'+number+'%'"/>
|
||||
and ah.bill_no like #{bindNumber}
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime !=''">
|
||||
and ah.bill_time >= #{beginTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime !=''">
|
||||
and ah.bill_time <= #{endTime}
|
||||
</if>
|
||||
and ifnull(ah.change_amount, 0)!=0
|
||||
and ifnull(ah.delete_flag,'0') !='1'
|
||||
<!--明细中涉及的账户(收款,付款,收预付款) -->
|
||||
@@ -251,6 +271,16 @@
|
||||
<if test="accountId != null">
|
||||
and ai.account_id=#{accountId}
|
||||
</if>
|
||||
<if test="number != null and number !=''">
|
||||
<bind name="bindNumber" value="'%'+number+'%'"/>
|
||||
and ah.bill_no like #{bindNumber}
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime !=''">
|
||||
and ah.bill_time >= #{beginTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime !=''">
|
||||
and ah.bill_time <= #{endTime}
|
||||
</if>
|
||||
and ifnull(ai.each_amount, 0)!=0
|
||||
and ifnull(ah.delete_flag,'0') !='1'
|
||||
<!--主表中转出的账户 -->
|
||||
@@ -261,6 +291,16 @@
|
||||
<if test="accountId != null">
|
||||
and ah.account_id=#{accountId}
|
||||
</if>
|
||||
<if test="number != null and number !=''">
|
||||
<bind name="bindNumber" value="'%'+number+'%'"/>
|
||||
and ah.bill_no like #{bindNumber}
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime !=''">
|
||||
and ah.bill_time >= #{beginTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime !=''">
|
||||
and ah.bill_time <= #{endTime}
|
||||
</if>
|
||||
and ifnull(ah.change_amount, 0)!=0
|
||||
and ifnull(ah.delete_flag,'0') !='1'
|
||||
<!--明细中被转入的账户 -->
|
||||
@@ -271,6 +311,16 @@
|
||||
<if test="accountId != null">
|
||||
and ai.account_id=#{accountId}
|
||||
</if>
|
||||
<if test="number != null and number !=''">
|
||||
<bind name="bindNumber" value="'%'+number+'%'"/>
|
||||
and ah.bill_no like #{bindNumber}
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime !=''">
|
||||
and ah.bill_time >= #{beginTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime !=''">
|
||||
and ah.bill_time <= #{endTime}
|
||||
</if>
|
||||
and ifnull(ai.each_amount, 0)!=0
|
||||
and ifnull(ah.delete_flag,'0') !='1'
|
||||
<!--多账户的情况 -->
|
||||
@@ -283,6 +333,16 @@
|
||||
<bind name="bindAccountId" value="'%'+accountId+'%'"/>
|
||||
and dh.account_id_list like #{bindAccountId}
|
||||
</if>
|
||||
<if test="number != null and number !=''">
|
||||
<bind name="bindNumber" value="'%'+number+'%'"/>
|
||||
and dh.number like #{bindNumber}
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime !=''">
|
||||
and dh.oper_time >= #{beginTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime !=''">
|
||||
and dh.oper_time <= #{endTime}
|
||||
</if>
|
||||
and ifnull(dh.change_amount, 0)!=0
|
||||
and ifnull(dh.delete_flag,'0') !='1'
|
||||
ORDER BY oTime desc
|
||||
@@ -301,6 +361,16 @@
|
||||
<if test="accountId != null">
|
||||
and dh.account_id=#{accountId}
|
||||
</if>
|
||||
<if test="number != null and number !=''">
|
||||
<bind name="bindNumber" value="'%'+number+'%'"/>
|
||||
and dh.number like #{bindNumber}
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime !=''">
|
||||
and dh.oper_time >= #{beginTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime !=''">
|
||||
and dh.oper_time <= #{endTime}
|
||||
</if>
|
||||
and ifnull(dh.change_amount, 0)!=0
|
||||
and ifnull(dh.delete_flag,'0') !='1'
|
||||
<!--主表收入和支出涉及的账户 -->
|
||||
@@ -311,6 +381,16 @@
|
||||
<if test="accountId != null">
|
||||
and ah.account_id=#{accountId}
|
||||
</if>
|
||||
<if test="number != null and number !=''">
|
||||
<bind name="bindNumber" value="'%'+number+'%'"/>
|
||||
and ah.bill_no like #{bindNumber}
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime !=''">
|
||||
and ah.bill_time >= #{beginTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime !=''">
|
||||
and ah.bill_time <= #{endTime}
|
||||
</if>
|
||||
and ifnull(ah.change_amount, 0)!=0
|
||||
and ifnull(ah.delete_flag,'0') !='1'
|
||||
<!--明细中涉及的账户(收款,付款,收预付款) -->
|
||||
@@ -322,6 +402,16 @@
|
||||
<if test="accountId != null">
|
||||
and ai.account_id=#{accountId}
|
||||
</if>
|
||||
<if test="number != null and number !=''">
|
||||
<bind name="bindNumber" value="'%'+number+'%'"/>
|
||||
and ah.bill_no like #{bindNumber}
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime !=''">
|
||||
and ah.bill_time >= #{beginTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime !=''">
|
||||
and ah.bill_time <= #{endTime}
|
||||
</if>
|
||||
and ifnull(ai.each_amount, 0)!=0
|
||||
and ifnull(ah.delete_flag,'0') !='1'
|
||||
<!--主表中转出的账户 -->
|
||||
@@ -332,6 +422,16 @@
|
||||
<if test="accountId != null">
|
||||
and ah.account_id=#{accountId}
|
||||
</if>
|
||||
<if test="number != null and number !=''">
|
||||
<bind name="bindNumber" value="'%'+number+'%'"/>
|
||||
and ah.bill_no like #{bindNumber}
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime !=''">
|
||||
and ah.bill_time >= #{beginTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime !=''">
|
||||
and ah.bill_time <= #{endTime}
|
||||
</if>
|
||||
and ifnull(ah.change_amount, 0)!=0
|
||||
and ifnull(ah.delete_flag,'0') !='1'
|
||||
<!--明细中被转入的账户 -->
|
||||
@@ -342,6 +442,16 @@
|
||||
<if test="accountId != null">
|
||||
and ai.account_id=#{accountId}
|
||||
</if>
|
||||
<if test="number != null and number !=''">
|
||||
<bind name="bindNumber" value="'%'+number+'%'"/>
|
||||
and ah.bill_no like #{bindNumber}
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime !=''">
|
||||
and ah.bill_time >= #{beginTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime !=''">
|
||||
and ah.bill_time <= #{endTime}
|
||||
</if>
|
||||
and ifnull(ai.each_amount, 0)!=0
|
||||
and ifnull(ah.delete_flag,'0') !='1'
|
||||
<!--多账户的情况 -->
|
||||
@@ -353,6 +463,16 @@
|
||||
<bind name="bindAccountId" value="'%'+accountId+'%'"/>
|
||||
and dh.account_id_list like #{bindAccountId}
|
||||
</if>
|
||||
<if test="number != null and number !=''">
|
||||
<bind name="bindNumber" value="'%'+number+'%'"/>
|
||||
and dh.number like #{bindNumber}
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime !=''">
|
||||
and dh.oper_time >= #{beginTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime !=''">
|
||||
and dh.oper_time <= #{endTime}
|
||||
</if>
|
||||
and ifnull(dh.change_amount, 0)!=0
|
||||
and ifnull(dh.delete_flag,'0') !='1'
|
||||
) cc
|
||||
|
||||
Reference in New Issue
Block a user