解决账户流水记录的bug

This commit is contained in:
季圣华
2021-12-16 23:10:09 +08:00
parent 016c3cda5a
commit 8a1ea04596

View File

@@ -82,12 +82,11 @@
and dh.account_id=#{accountId} and dh.account_id=#{accountId}
</if> </if>
and ifnull(dh.delete_flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
<!--主表收入和支出涉及的账户 --> <!--主表收入和支出涉及的账户 -->
UNION ALL UNION ALL
select ah.bill_no,ah.type as newType, 'financial' as fromType, s.supplier,ah.change_amount,date_format(ah.bill_time,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList select ah.bill_no,ah.type as newType, 'financial' as fromType, s.supplier,ah.change_amount,date_format(ah.bill_time,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList
from jsh_account_head ah left join jsh_supplier s on ah.organ_id=s.id and ifnull(s.delete_flag,'0') !='1' from jsh_account_head ah left join jsh_supplier s on ah.organ_id=s.id and ifnull(s.delete_flag,'0') !='1'
where 1=1 where ah.type!='转账'
<if test="accountId != null"> <if test="accountId != null">
and ah.account_id=#{accountId} and ah.account_id=#{accountId}
</if> </if>
@@ -152,7 +151,7 @@
UNION ALL UNION ALL
select count(1) a select count(1) a
from jsh_account_head ah left join jsh_supplier s on ah.organ_id=s.id and ifnull(s.delete_flag,'0') !='1' from jsh_account_head ah left join jsh_supplier s on ah.organ_id=s.id and ifnull(s.delete_flag,'0') !='1'
where 1=1 where ah.type!='转账'
<if test="accountId != null"> <if test="accountId != null">
and ah.account_id=#{accountId} and ah.account_id=#{accountId}
</if> </if>