|
|
@ -69,8 +69,7 @@ |
|
|
|
and t.auth_status in('0','5','6') |
|
|
|
and t.auth_status in('0','5','6') |
|
|
|
and t.export_mark = '0' |
|
|
|
and t.export_mark = '0' |
|
|
|
and t.company = #{company} |
|
|
|
and t.company = #{company} |
|
|
|
<if |
|
|
|
<if test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '1'.toString()"> |
|
|
|
test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '1'.toString()"> |
|
|
|
|
|
|
|
and t.invoice_status in ('0','7') |
|
|
|
and t.invoice_status in ('0','7') |
|
|
|
and t.invoice_amount>0 |
|
|
|
and t.invoice_amount>0 |
|
|
|
and t.tax_amount>=0 |
|
|
|
and t.tax_amount>=0 |
|
|
@ -78,8 +77,7 @@ |
|
|
|
and d.tj_status in('0','3') |
|
|
|
and d.tj_status in('0','3') |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
|
|
<if |
|
|
|
<if test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '0'.toString()"> |
|
|
|
test="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 |
|
|
|
and (t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount <0 or t.tax_amount <0 or |
|
|
|
date_format(t.invoice_date,'%Y%m%d') <= c.select_start_date or |
|
|
|
date_format(t.invoice_date,'%Y%m%d') <= c.select_start_date or |
|
|
|
date_format(t.invoice_date,'%Y%m%d') >= |
|
|
|
date_format(t.invoice_date,'%Y%m%d') >= |
|
|
@ -93,8 +91,7 @@ |
|
|
|
<if test="qszt != null and qszt != '' and qszt != 'null' "> |
|
|
|
<if test="qszt != null and qszt != '' and qszt != 'null' "> |
|
|
|
and t.qs_status = #{qszt} |
|
|
|
and t.qs_status = #{qszt} |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<if |
|
|
|
<if test="qsksrq != null and qsksrq != '' and qsksrq != 'null' and qsjsrq != null and qsjsrq != '' and qsjsrq != 'null'"> |
|
|
|
test="qsksrq != null and qsksrq != '' and qsksrq != 'null' and qsjsrq != null and qsjsrq != '' and qsjsrq != 'null'"> |
|
|
|
|
|
|
|
and date_format(t.qs_date,'%Y-%m-%d') between #{qsksrq} and #{qsjsrq} |
|
|
|
and date_format(t.qs_date,'%Y-%m-%d') between #{qsksrq} and #{qsjsrq} |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<if test="voucherNumber != null and voucherNumber != ''"> |
|
|
|
<if test="voucherNumber != null and voucherNumber != ''"> |
|
|
@ -121,8 +118,7 @@ |
|
|
|
<if test="fpzt != null and fpzt != '' and fpzt != 'null'"> |
|
|
|
<if test="fpzt != null and fpzt != '' and fpzt != 'null'"> |
|
|
|
and t.invoice_status = #{fpzt} |
|
|
|
and t.invoice_status = #{fpzt} |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<if |
|
|
|
<if test="qsfs != null and qsfs != '' and qsfs != 'null' "> |
|
|
|
test="qsfs != null and qsfs != '' and qsfs != 'null' "> |
|
|
|
|
|
|
|
and t.qs_type = #{qsfs} |
|
|
|
and t.qs_type = #{qsfs} |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<if test="xfmc != null and xfmc != '' and xfmc != 'null' "> |
|
|
|
<if test="xfmc != null and xfmc != '' and xfmc != 'null' "> |
|
|
@ -134,18 +130,15 @@ |
|
|
|
<if test="settlementNo != null and settlementNo != ''"> |
|
|
|
<if test="settlementNo != null and settlementNo != ''"> |
|
|
|
and t.settlement_no like concat(#{settlementNo},'%') |
|
|
|
and t.settlement_no like concat(#{settlementNo},'%') |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<if |
|
|
|
<if test="invoiceNo != null and invoiceNo != '' and invoiceNo != 'null' "> |
|
|
|
test="invoiceNo != null and invoiceNo != '' and invoiceNo != 'null' "> |
|
|
|
|
|
|
|
and t.invoice_no = #{invoiceNo} |
|
|
|
and t.invoice_no = #{invoiceNo} |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<!-- 按签收人查询 --> |
|
|
|
<!-- 按签收人查询 --> |
|
|
|
<if |
|
|
|
<if test="position != null and position != '' and position != 'null' and position == '1'.toString()"> |
|
|
|
test="position != null and position != '' and position != 'null' and position == '1'.toString()"> |
|
|
|
|
|
|
|
and t.qs_name = #{username} |
|
|
|
and t.qs_name = #{username} |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
|
|
<if |
|
|
|
<if test="businessCode != '99' and businessCode != null and businessCode != '' and businessCode != 'null' "> |
|
|
|
test="businessCode != '99' and businessCode != null and businessCode != '' and businessCode != 'null' "> |
|
|
|
|
|
|
|
and t.dept_id = #{businessCode} |
|
|
|
and t.dept_id = #{businessCode} |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<if test="businessCode==''"> |
|
|
|
<if test="businessCode==''"> |
|
|
|