ariesy 手工认证和认证查询界面增加税率筛选条件

release
yefei 2 years ago
parent 982c6d7d4c
commit 4553b9d062
  1. 228
      dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml

@ -232,119 +232,119 @@
<!-- <if test="qsksrq==null or qsksrq=='' or qsjsrq==null or qsjsrq==''">--> <!-- <if test="qsksrq==null or qsksrq=='' or qsjsrq==null or qsjsrq==''">-->
<!-- order by t.invoice_date desc--> <!-- order by t.invoice_date desc-->
<!-- </if>--> <!-- </if>-->
order by t.bzdh desc <!-- order by t.bzdh desc-->
</select> </select>
<select id="selectDksh" parameterType="java.util.Map" <select id="selectDksh" parameterType="java.util.Map"
resultType="com.dxhy.base.entity.BaseTDxDkCount" resultType="com.dxhy.base.entity.BaseTDxDkCount"
databaseId="oracle"> databaseId="oracle">
select t.current_tax_period skssq,t.taxno taxno,d.tj_status tjStatus,tj_date tjDate from select t.current_tax_period skssq,t.taxno taxno,d.tj_status tjStatus,tj_date tjDate from
t_dx_tax_current t_dx_tax_current
t,t_dx_dk_count d t,t_dx_dk_count d
where t.taxno=d.taxno where t.taxno=d.taxno
and t.current_tax_period=d.skssq and t.current_tax_period=d.skssq
and t.taxno in and t.taxno in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</select> </select>
<select id="selectSggxcx" parameterType="java.util.Map" <select id="selectSggxcx" parameterType="java.util.Map"
resultMap="SggxcxResultMap" databaseId="oracle"> resultMap="SggxcxResultMap" databaseId="oracle">
select t.invoice_type,t.dept_id select t.invoice_type,t.dept_id
,t.id,t.invoice_code,t.invoice_no,t.gf_name,t.gf_tax_no,t.xf_name, ,t.id,t.invoice_code,t.invoice_no,t.gf_name,t.gf_tax_no,t.xf_name,
to_char(t.invoice_date,'yyyy-MM-dd')invoice_date,t.invoice_amount,t.tax_amount,t.invoice_status,to_char(t.qs_date,'yyyy-MM-dd')qs_date to_char(t.invoice_date,'yyyy-MM-dd')invoice_date,t.invoice_amount,t.tax_amount,t.invoice_status,to_char(t.qs_date,'yyyy-MM-dd')qs_date
,t.qs_type,t.qs_status,t.dk_tax_amount,t.qs_name,t.voucher_number, ,t.qs_type,t.qs_status,t.dk_tax_amount,t.qs_name,t.voucher_number,
case to_char(t.invoice_date,'yyyy-MM-dd') between c.select_start_date and c.select_end_date when case to_char(t.invoice_date,'yyyy-MM-dd') between c.select_start_date and c.select_end_date when
true then 1 true then 1
else 2 end authStatus, else 2 end authStatus,
t.in_account_status,t.payment_status,to_char(t.payment_date,'yyyy-MM-dd')payment_date,t.settlement_no,t.ele_invoice_no t.in_account_status,t.payment_status,to_char(t.payment_date,'yyyy-MM-dd')payment_date,t.settlement_no,t.ele_invoice_no
from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno
left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq
WHERE to_char(t.invoice_date,'yyyy-MM-dd') between #{kpksrq} and #{kpjsrq} WHERE to_char(t.invoice_date,'yyyy-MM-dd') between #{kpksrq} and #{kpjsrq}
and t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08') and t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08')
and t.rzh_yesorno = '0' and t.rzh_yesorno = '0'
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 = '0' and t.invoice_status = '0'
and t.invoice_amount>0 and t.invoice_amount>0
and t.tax_amount>=0 and t.tax_amount>=0
and to_char(t.invoice_date,'yyyyMMdd') between c.select_start_date and c.select_end_date and to_char(t.invoice_date,'yyyyMMdd') between c.select_start_date and c.select_end_date
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 &lt;&gt; '0' or t.invoice_amount &lt;0 or t.tax_amount &lt;0 or and (t.invoice_status &lt;&gt; '0' or t.invoice_amount &lt;0 or t.tax_amount &lt;0 or
to_char(t.invoice_date,'yyyyMMdd') &lt;= c.select_start_date or to_char(t.invoice_date,'yyyyMMdd') &lt;= c.select_start_date or
to_char(t.invoice_date,'yyyyMMdd') &gt;= to_char(t.invoice_date,'yyyyMMdd') &gt;=
c.select_end_date or d.tj_status in ('1','2')) c.select_end_date or d.tj_status in ('1','2'))
</if> </if>
and t.gf_tax_no in and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
<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 to_char(t.qs_date,'yyyy-MM-dd') between #{qsksrq} and #{qsjsrq} and to_char(t.qs_date,'yyyy-MM-dd') between #{qsksrq} and #{qsjsrq}
</if> </if>
<if test="voucherNumber != null and voucherNumber != ''"> <if test="voucherNumber != null and voucherNumber != ''">
and t.voucher_number like concat('%',concat(#{voucherNumber},'%')) and t.voucher_number like concat('%',concat(#{voucherNumber},'%'))
</if> </if>
<if test="paymentDateStart != null and paymentDateStart != '' and paymentDateStart != 'null' "> <if test="paymentDateStart != null and paymentDateStart != '' and paymentDateStart != 'null' ">
<![CDATA[ AND to_char(t.payment_date,'yyyy-MM-dd') >= #{paymentDateStart} ]]> <![CDATA[ AND to_char(t.payment_date,'yyyy-MM-dd') >= #{paymentDateStart} ]]>
</if> </if>
<if test="paymentDateEnd != null and paymentDateEnd != '' and paymentDateEnd != 'null' "> <if test="paymentDateEnd != null and paymentDateEnd != '' and paymentDateEnd != 'null' ">
<![CDATA[ AND to_char(t.payment_date,'yyyy-MM-dd') <= #{paymentDateEnd} ]]> <![CDATA[ AND to_char(t.payment_date,'yyyy-MM-dd') <= #{paymentDateEnd} ]]>
</if> </if>
<if test="paymentStatus != null and paymentStatus != '' and paymentStatus != '99'"> <if test="paymentStatus != null and paymentStatus != '' and paymentStatus != '99'">
and t.payment_status = #{paymentStatus} and t.payment_status = #{paymentStatus}
</if> </if>
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType == '14' "> <if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType == '14' ">
and t.invoice_type = '14' or (t.invoice_type = '32' and t.lq_tdyslxDm='08') and t.invoice_type = '14' or (t.invoice_type = '32' and t.lq_tdyslxDm='08')
</if> </if>
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '14' "> <if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '14' ">
and t.invoice_type = #{invoiceType} and t.invoice_type = #{invoiceType}
</if> </if>
<if test="invoiceSource!=null and invoiceSource!='99' and invoiceSource!='null' and invoiceSource!=''"> <if test="invoiceSource!=null and invoiceSource!='99' and invoiceSource!='null' and invoiceSource!=''">
and t.invoice_source =#{invoiceSource} and t.invoice_source =#{invoiceSource}
</if> </if>
<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' ">
and t.xf_name like concat(#{xfmc},'%') and t.xf_name like concat(#{xfmc},'%')
</if> </if>
<if test="qsr != null and qsr != '' and qsr != 'null' "> <if test="qsr != null and qsr != '' and qsr != 'null' ">
and t.qs_name = #{qsr} and t.qs_name = #{qsr}
</if> </if>
<if test="paymentDateStart != null and paymentDateStart != '' and paymentDateStart != 'null' "> <if test="paymentDateStart != null and paymentDateStart != '' and paymentDateStart != 'null' ">
<![CDATA[ AND date_format(t.payment_date,'%Y-%m-%d') >= #{paymentDateStart} ]]> <![CDATA[ AND date_format(t.payment_date,'%Y-%m-%d') >= #{paymentDateStart} ]]>
</if> </if>
<if test="paymentDateEnd != null and paymentDateEnd != '' and paymentDateEnd != 'null' "> <if test="paymentDateEnd != null and paymentDateEnd != '' and paymentDateEnd != 'null' ">
<![CDATA[ AND date_format(t.payment_date,'%Y-%m-%d') <= #{paymentDateEnd} ]]> <![CDATA[ AND date_format(t.payment_date,'%Y-%m-%d') <= #{paymentDateEnd} ]]>
</if> </if>
<if test="paymentStatus != null and paymentStatus != '' and paymentStatus != '99'"> <if test="paymentStatus != null and paymentStatus != '' and paymentStatus != '99'">
and t.payment_status = #{paymentStatus} and t.payment_status = #{paymentStatus}
</if> </if>
<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}
@ -562,7 +562,7 @@
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'"> <if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod} and t.account_period = #{accountPeriod}
</if> </if>
order by t.bzdh desc <!-- order by t.bzdh desc -->
</select> </select>
<select id="selectHj" parameterType="java.util.Map" <select id="selectHj" parameterType="java.util.Map"

Loading…
Cancel
Save