<iftest="companyCode != null and companyCode != '99' and companyCode != '88' and companyCode != '' and companyCode != 'null'">
and t.comp_code = #{companyCode}
</if>
<iftest="companyCode != null and companyCode != '' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
<iftest="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '1'.toString()">
and t.invoice_status in ('0','7')
and t.invoice_amount>0
and t.tax_amount>=0
and t.invoice_date between c.select_start_date and c.select_end_date
and d.tj_status in('0','3')
</if>
<iftest="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '0'.toString()">
and (t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount <0 or t.tax_amount <0 or
t.invoice_date <= c.select_start_date or
t.invoice_date >=
c.select_end_date or d.tj_status in ('1','2'))
</if>
<iftest="suspendStatus != null and suspendStatus != '' and suspendStatus != 'null' and suspendStatus != '99' and suspendStatus == '1'.toString()">
and t.suspend_status = '1'
</if>
<iftest="suspendStatus != null and suspendStatus != '' and suspendStatus != 'null' and suspendStatus != '99' and suspendStatus == '0'.toString()">
and (t.suspend_status = '' or t.suspend_status is null or t.suspend_status = '0')
</if>
<iftest="suspendDate != null and suspendDate != '' and suspendDate != 'null' ">
and t.suspend_date = #{suspendDate}
</if>
<iftest="bzr != null and bzr != '' and bzr != 'null'">
and t.bzr like concat('%',#{bzr},'%')
</if>
<iftest="bzdh != null and bzdh != '' and bzdh != 'null' and bzdh != '99'">
and t.bzdh = #{bzdh}
</if>
<iftest="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99' and inAccountStatus == '1'.toString()">
and t.inaccount_status = #{inAccountStatus}
</if>
<iftest="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99' and inAccountStatus == '0'.toString()">
and (t.inaccount_status = '0' or t.inaccount_status = '' or t.inaccount_status is null)
</if>
<iftest="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<iftest="postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99' and postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99'">
and t.posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<iftest="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and t.image_id = #{imageNumber}
</if>
<iftest="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<iftest="qszt != null and qszt != '' and qszt != 'null' ">
and t.qs_status = #{qszt}
</if>
@ -1201,10 +1264,73 @@
and t.tax_amount>=0
and d.tj_status in('0','3')
and date_format(t.invoice_date,'%Y%m%d') between c.select_start_date and c.select_end_date
<iftest="companyCode != null and companyCode != '99' and companyCode != '88' and companyCode != '' and companyCode != 'null'">
and t.comp_code = #{companyCode}
</if>
<iftest="companyCode != null and companyCode != '' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
<iftest="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '1'.toString()">
and t.invoice_status in ('0','7')
and t.invoice_amount>0
and t.tax_amount>=0
and t.invoice_date between c.select_start_date and c.select_end_date
and d.tj_status in('0','3')
</if>
<iftest="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '0'.toString()">
and (t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount <0 or t.tax_amount <0 or
t.invoice_date <= c.select_start_date or
t.invoice_date >=
c.select_end_date or d.tj_status in ('1','2'))
</if>
<iftest="suspendStatus != null and suspendStatus != '' and suspendStatus != 'null' and suspendStatus != '99' and suspendStatus == '1'.toString()">
and t.suspend_status = '1'
</if>
<iftest="suspendStatus != null and suspendStatus != '' and suspendStatus != 'null' and suspendStatus != '99' and suspendStatus == '0'.toString()">
and (t.suspend_status = '' or t.suspend_status is null or t.suspend_status = '0')
</if>
<iftest="suspendDate != null and suspendDate != '' and suspendDate != 'null' ">
and t.suspend_date = #{suspendDate}
</if>
<iftest="bzr != null and bzr != '' and bzr != 'null'">
and t.bzr like concat('%',#{bzr},'%')
</if>
<iftest="bzdh != null and bzdh != '' and bzdh != 'null' and bzdh != '99'">
and t.bzdh = #{bzdh}
</if>
<iftest="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99' and inAccountStatus == '1'.toString()">
and t.inaccount_status = #{inAccountStatus}
</if>
<iftest="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99' and inAccountStatus == '0'.toString()">
and (t.inaccount_status = '0' or t.inaccount_status = '' or t.inaccount_status is null)
</if>
<iftest="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<iftest="postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99' and postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99'">
and t.posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<iftest="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and t.image_id = #{imageNumber}
</if>
<iftest="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<iftest="qszt != null and qszt != '' and qszt != 'null' ">