|
|
|
@ -67,23 +67,9 @@ |
|
|
|
|
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> |
|
|
|
|
<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) |
|
|
|
|
and t.gf_tax_no = #{gfsh} |
|
|
|
|
<if test="companyCode != null and companyCode != '' and companyCode != 'null'"> |
|
|
|
|
and (t.comp_code = #{companyCode} or t.comp_code is null or t.comp_code = '') |
|
|
|
|
</if> |
|
|
|
|
<if test="bzdh != null and bzdh != '' and bzdh != 'null'"> |
|
|
|
|
and t.bzdh = #{bzdh} |
|
|
|
|