|
|
|
@ -113,10 +113,10 @@ |
|
|
|
|
<if test="keyWord != null and keyWord != '' and keyWord != 'null' "> |
|
|
|
|
AND CONCAT(IFNULL(invoice_code,''),IFNULL(invoice_no,'')) like CONCAT('%',#{keyWord},'%') |
|
|
|
|
</if> |
|
|
|
|
and gf_tax_no in |
|
|
|
|
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
<!-- and gf_tax_no in--> |
|
|
|
|
<!-- <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">--> |
|
|
|
|
<!-- #{item}--> |
|
|
|
|
<!-- </foreach>--> |
|
|
|
|
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '999' "> |
|
|
|
|
and invoice_type = #{invoiceType} |
|
|
|
|
</if> |
|
|
|
@ -132,6 +132,20 @@ |
|
|
|
|
<if test="qsfs != null and qsfs != '' and qsfs != 'null' and qsfs != '99'"> |
|
|
|
|
and qs_type = #{qsfs} |
|
|
|
|
</if> |
|
|
|
|
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode == '99'"> |
|
|
|
|
and (comp_code in |
|
|
|
|
<foreach collection="companyCodes" index="index" item="companyCode" separator="," open="(" close=")"> |
|
|
|
|
#{companyCode} |
|
|
|
|
</foreach> |
|
|
|
|
or comp_code is null or comp_code = '' |
|
|
|
|
) |
|
|
|
|
</if> |
|
|
|
|
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'"> |
|
|
|
|
and comp_code = #{companyCode} |
|
|
|
|
</if> |
|
|
|
|
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'"> |
|
|
|
|
and (comp_code is null or comp_code = '') |
|
|
|
|
</if> |
|
|
|
|
GROUP BY uuid having min(create_date) |
|
|
|
|
ORDER BY create_date DESC |
|
|
|
|
</select> |
|
|
|
@ -193,10 +207,10 @@ |
|
|
|
|
like |
|
|
|
|
CONCAT('%',#{keyWord},'%') |
|
|
|
|
</if> |
|
|
|
|
and t.gf_tax_no in |
|
|
|
|
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
<!-- and t.gf_tax_no in--> |
|
|
|
|
<!-- <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">--> |
|
|
|
|
<!-- #{item}--> |
|
|
|
|
<!-- </foreach>--> |
|
|
|
|
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' "> |
|
|
|
|
and t.invoice_type = #{invoiceType} |
|
|
|
|
</if> |
|
|
|
@ -251,6 +265,20 @@ |
|
|
|
|
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'"> |
|
|
|
|
and t.account_period = #{accountPeriod} |
|
|
|
|
</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 != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'"> |
|
|
|
|
and t.comp_code = #{companyCode} |
|
|
|
|
</if> |
|
|
|
|
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'"> |
|
|
|
|
and (t.comp_code = '' or t.comp_code is null) |
|
|
|
|
</if> |
|
|
|
|
</select> |
|
|
|
|
<!--销项票池查询--> |
|
|
|
|
<select id="listSaleInvoice" parameterType="java.util.Map" |
|
|
|
@ -272,10 +300,10 @@ |
|
|
|
|
like |
|
|
|
|
CONCAT('%',#{keyWord},'%') |
|
|
|
|
</if> |
|
|
|
|
and t.xf_tax_no in |
|
|
|
|
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
<!-- and t.xf_tax_no in--> |
|
|
|
|
<!-- <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">--> |
|
|
|
|
<!-- #{item}--> |
|
|
|
|
<!-- </foreach>--> |
|
|
|
|
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' "> |
|
|
|
|
and t.invoice_type = #{invoiceType} |
|
|
|
|
</if> |
|
|
|
@ -312,6 +340,20 @@ |
|
|
|
|
<if test="invoiceSource!=null and invoiceSource!='' and invoiceSource!='99'"> |
|
|
|
|
and t.invoice_source = #{invoiceSource} |
|
|
|
|
</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 != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'"> |
|
|
|
|
and t.comp_code = #{companyCode} |
|
|
|
|
</if> |
|
|
|
|
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'"> |
|
|
|
|
and (t.comp_code = '' or t.comp_code is null) |
|
|
|
|
</if> |
|
|
|
|
GROUP BY t.uuid |
|
|
|
|
ORDER BY t.create_date DESC |
|
|
|
|
</select> |
|
|
|
|