@ -267,21 +267,12 @@
t_dx_customs_record p
where
p.rzh_yesorno = '0'
and p.gf_tax_no = #{queryParams.gfsh}
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
and p.auth_status in('0','5','6')
and p.data_type = '17'
and p.export_mark = '0'
and p.data_sources = '0'
<if test= "queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0" >
and p.gf_tax_no in
<foreach close= ")" collection= "queryParams.gfTaxNo" index= "index" item= "item" open= "("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test= "queryParams.gfsh!=null and queryParams.gfsh!=''" >
and p.gf_tax_no = #{queryParams.gfsh}
</if>
<if test= "queryParams.bzdh != null and queryParams.bzdh != '' and queryParams.bzdh != 'null'" >
and p.bzdh = #{queryParams.bzdh}
@ -372,17 +363,12 @@
t_dx_customs_record p
where
p.rzh_yesorno = '0'
and p.gf_tax_no = #{queryParams.gfsh}
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
and p.auth_status in('0','5','6')
and p.data_type = '17'
and p.export_mark = '0'
and p.data_sources = '0'
<if test= "queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0" >
and p.gf_tax_no in
<foreach close= ")" collection= "queryParams.gfTaxNo" index= "index" item= "item" open= "("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test= "queryParams.bzdh != null and queryParams.bzdh != '' and queryParams.bzdh != 'null'" >
and p.bzdh = #{queryParams.bzdh}
@ -404,10 +390,6 @@
and p.account_period = #{queryParams.accountPeriod}
</if>
<if test= "queryParams.gfsh!=null and queryParams.gfsh!=''" >
and p.gf_tax_no = #{queryParams.gfsh}
</if>
<if test= "queryParams.customsCode!=null and queryParams.customsCode!=''" >
and p.customs_code = #{queryParams.customsCode}
</if>
@ -504,18 +486,9 @@
t_dx_customs_record p
where
p.data_type = '17'
and p.gf_tax_no = #{queryParams.gfsh}
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
and p.export_mark = '0'
<if test= "queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0" >
and p.gf_tax_no in
<foreach close= ")" collection= "queryParams.gfTaxNo" index= "index" item= "item" open= "("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test= "queryParams.gfsh!=null and queryParams.gfsh!=''" >
and p.gf_tax_no = #{queryParams.gfsh}
</if>
<if test= "queryParams.sfDkStatus!=null and queryParams.sfDkStatus == '0'.toString()" >
and (p.auth_status in('0','5','6') or (p.bdk_status = '2' and p.auth_status != '4')) and p.data_sources =
@ -599,19 +572,10 @@
t_dx_customs_record p
where
p.data_type = '17'
and p.gf_tax_no = #{queryParams.gfsh}
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
and p.export_mark = '0'
and p.data_sources = '0'
<if test= "queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0" >
and p.gf_tax_no in
<foreach close= ")" collection= "queryParams.gfTaxNo" index= "index" item= "item" open= "("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test= "queryParams.gfsh!=null and queryParams.gfsh!=''" >
and p.gf_tax_no = #{queryParams.gfsh}
</if>
<if test= "queryParams.sfDkStatus!=null and queryParams.sfDkStatus == '0'.toString()" >
and (p.auth_status in('0','5','6') or (p.bdk_status = '2' and p.auth_status != '4'))
@ -804,18 +768,10 @@
FROM
t_dx_customs_record t
where t.qs_status = '0'
and t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
and t.export_mark = '0'
and (t.data_sources = '0' or (t.data_sources != '0' and t.collect_upload_status = '2'))
<if test= "queryParams.gfTaxNoList!=null and queryParams.gfTaxNoList.size>0" >
and t.gf_tax_no in
<foreach close= ")" collection= "queryParams.gfTaxNoList" index= "index" item= "item" open= "("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test= "queryParams.gfTaxNo!=null and queryParams.gfTaxNo!=''" >
and t.gf_tax_no = #{queryParams.gfTaxNo}
</if>
<if test= "queryParams.fillInDateBegin!=null and queryParams.fillInDateBegin!=''" >
and t.fill_in_date > = #{queryParams.fillInDateBegin}
</if>
@ -875,15 +831,10 @@
t_dx_customs_record p
where
p.export_mark = '0'
and p.gf_tax_no = #{queryParams.gfsh}
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
and p.auth_status != '0'
and p.bdk_status in ('1','2')
<if test= "queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0" >
and p.gf_tax_no in
<foreach close= ")" collection= "queryParams.gfTaxNo" index= "index" item= "item" open= "("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test= "queryParams.bzdh != null and queryParams.bzdh != '' and queryParams.bzdh != 'null'" >
and p.bzdh = #{queryParams.bzdh}
@ -905,10 +856,6 @@
and p.account_period = #{queryParams.accountPeriod}
</if>
<if test= "queryParams.gfsh!=null and queryParams.gfsh!=''" >
and p.gf_tax_no = #{queryParams.gfsh}
</if>
<if test= "queryParams.customsCode!=null and queryParams.customsCode!=''" >
and p.customs_code = #{queryParams.customsCode}
</if>
@ -1047,19 +994,9 @@
r.comp_code as compCode
FROM
t_dx_customs t left join t_dx_customs_record r on t.customs_code = r.customs_code
where t.user_account = #{queryParams.userAccount}
<if test= "queryParams.gfTaxNoList!=null and queryParams.gfTaxNoList.size>0" >
and t.gf_tax_no in
<foreach close= ")" collection= "queryParams.gfTaxNoList" index= "index" item= "item" open= "("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test= "queryParams.gfTaxNo!=null and queryParams.gfTaxNo!=''" >
and t.gf_tax_no = #{queryParams.gfTaxNo}
</if>
where r.gf_tax_no = #{gfsh}
and (r.comp_code = #{companyCode} or r.comp_code = '' or r.comp_code is null)
t.user_account = #{queryParams.userAccount}
<if test= "queryParams.qsDateBegin!=null and queryParams.qsDateBegin!=''" >
and t.qs_date > = #{queryParams.qsDateBegin}
</if>
@ -1125,16 +1062,10 @@
t_dx_customs_record p
where
p.export_mark = '0'
and p.gf_tax_no = #{queryParams.gfsh}
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
and p.auth_status != '0'
and p.bdk_status in ('1','2')
<if test= "queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0" >
and p.gf_tax_no in
<foreach close= ")" collection= "queryParams.gfTaxNo" index= "index" item= "item" open= "("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test= "queryParams.bzdh != null and queryParams.bzdh != '' and queryParams.bzdh != 'null'" >
and p.bzdh = #{queryParams.bzdh}
</if>
@ -1153,11 +1084,6 @@
<if test= "queryParams.accountPeriod != null and queryParams.accountPeriod != '' and queryParams.accountPeriod != 'null' and queryParams.accountPeriod != '99'" >
and p.account_period = #{queryParams.accountPeriod}
</if>
<if test= "queryParams.gfsh!=null and queryParams.gfsh!=''" >
and p.gf_tax_no = #{queryParams.gfsh}
</if>
<if test= "queryParams.customsCode!=null and queryParams.customsCode!=''" >
and p.customs_code = #{queryParams.customsCode}
</if>