|
|
|
@ -70,10 +70,28 @@ |
|
|
|
|
t.settlement_status,t.voucher_number,t.total_amount,t.sn_voucher_number,t.posting_time,t.image_id,t.account_period |
|
|
|
|
from t_dx_record_invoice t |
|
|
|
|
WHERE t.company = #{company} and t.invoice_date between #{kpksrq} and #{kpjsrq} |
|
|
|
|
and t.gf_tax_no in |
|
|
|
|
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
|
|
|
|
|
<if test="sign != '88'"> |
|
|
|
|
and t.gf_tax_no in |
|
|
|
|
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode == '99'"> |
|
|
|
|
and (t.comp_code in |
|
|
|
|
<foreach collection="companyCodes" index="index" item="companyCode" separator="," open="(" close=")"> |
|
|
|
|
#{companyCode} |
|
|
|
|
</foreach> |
|
|
|
|
or t.comp_code is null or t.comp_code = '' |
|
|
|
|
) |
|
|
|
|
</if> |
|
|
|
|
<if test="companyCode != null and companyCode != '99' and companyCode != '88' and companyCode != '' and companyCode != 'null'" > |
|
|
|
|
and t.comp_code = #{companyCode} |
|
|
|
|
</if> |
|
|
|
|
<if test="companyCode != null and companyCode != '' and companyCode == '88'"> |
|
|
|
|
and (t.comp_code = '' or t.comp_code is null) |
|
|
|
|
</if> |
|
|
|
|
<if test="bzdh != null and bzdh != '' and bzdh != 'null'"> |
|
|
|
|
and t.bzdh = #{bzdh} |
|
|
|
|
</if> |
|
|
|
@ -331,10 +349,29 @@ |
|
|
|
|
select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse |
|
|
|
|
from t_dx_record_invoice t |
|
|
|
|
where t.invoice_date between #{kpksrq} and #{kpjsrq} |
|
|
|
|
and t.company = #{company} and t.gf_tax_no in |
|
|
|
|
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
and t.company = #{company} |
|
|
|
|
|
|
|
|
|
<if test="sign != '88'"> |
|
|
|
|
and t.gf_tax_no in |
|
|
|
|
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode == '99'"> |
|
|
|
|
and (t.comp_code in |
|
|
|
|
<foreach collection="companyCodes" index="index" item="companyCode" separator="," open="(" close=")"> |
|
|
|
|
#{companyCode} |
|
|
|
|
</foreach> |
|
|
|
|
or t.comp_code is null or t.comp_code = '' |
|
|
|
|
) |
|
|
|
|
</if> |
|
|
|
|
<if test="companyCode != null and companyCode != '99' and companyCode != '88' and companyCode != '' and companyCode != 'null'" > |
|
|
|
|
and t.comp_code = #{companyCode} |
|
|
|
|
</if> |
|
|
|
|
<if test="companyCode != null and companyCode != '' and companyCode == '88'"> |
|
|
|
|
and (t.comp_code = '' or t.comp_code is null) |
|
|
|
|
</if> |
|
|
|
|
<if |
|
|
|
|
test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' and invoiceStatus != '99'"> |
|
|
|
|
and t.invoice_status = #{invoiceStatus} |
|
|
|
|