Merge branches '0614-增加税率筛选条件' and 'test' of http://192.168.12.182/invoice/pt into test

 Conflicts:
	dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml
release
yefei 2 years ago
commit 0d9e71ab3f
  1. 12
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java
  2. 6
      dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml
  3. 243
      dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml

@ -227,9 +227,9 @@ public class BaseInvoiceController extends AbstractController {
}
if (!StringUtils.isNotBlank(taxRate) && !"99".equals(taxRate)){
List<String> rates = new ArrayList<>();
rates = convertRates(taxRate,rates);
pramsMap.put("taxRate",rates);
// List<String> rates = new ArrayList<>();
// rates = convertRates(taxRate,rates);
pramsMap.put("taxRate",taxRate);
}
if (!StringHelper.isBlank(invoiceType)) {
@ -576,9 +576,9 @@ public class BaseInvoiceController extends AbstractController {
}
if (!StringUtils.isNotBlank(taxRate) && !"99".equals(taxRate)){
List<String> rates = new ArrayList<>();
rates = convertRates(taxRate,rates);
pramsMap.put("taxRate",rates);
// List<String> rates = new ArrayList<>();
// rates = convertRates(taxRate,rates);
pramsMap.put("taxRate",taxRate);
}
List<String> gfshList = new ArrayList<>();
if (!"99".equals(gfsh) && StringUtils.isNotBlank(gfsh)) {

@ -498,6 +498,12 @@
<if test="eleInvoiceNo!=null and eleInvoiceNo!='' and eleInvoiceNo!='null'">
and t.ele_invoice_no = #{eleInvoiceNo}
</if>
<if test="taxRate!=null and taxRate!='' and taxRate != null and taxRate !='99'">
and t.tax_rate like %#{taxRate}%
</if>
<if test="taxRate==''">
and t.tax_rate #{taxRate}
</if>
</select>
<select id="selectRzfpHj" parameterType="java.util.Map"
resultMap="RzcxhjResultMap" databaseId="oracle">

@ -105,12 +105,13 @@
<!-- #{companyCode}-->
<!-- </foreach>-->
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode == '99'">
and t.comp_code in
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>
<!-- or t.comp_code is null or t.comp_code = ''-->
<if test="companyCode != null and companyCode != '99' and companyCode != '88' and companyCode != '' and companyCode != 'null'" >
and t.comp_code = #{companyCode}
</if>
@ -135,9 +136,6 @@
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and bzdh != '99'">
and t.bzdh = #{bzdh}
</if>
<if test="bzdh == null or bzdh == '' or bzdh == 'null' or bzdh == '99'">
and t.bzdh is not null and t.inaccount_status = '1'
</if>
<if test="taxRate != null and taxRate != '' and taxRate != 'null' and taxRate != '99'">
and (t.tax_rate in
<foreach collection="rates" index="index" item="taxRate" separator="," open="(" close=")">
@ -231,119 +229,119 @@
<!-- <if test="qsksrq==null or qsksrq=='' or qsjsrq==null or qsjsrq==''">-->
<!-- order by t.invoice_date desc-->
<!-- </if>-->
<!-- order by t.bzdh desc-->
</select>
<select id="selectDksh" parameterType="java.util.Map"
resultType="com.dxhy.base.entity.BaseTDxDkCount"
databaseId="oracle">
select t.current_tax_period skssq,t.taxno taxno,d.tj_status tjStatus,tj_date tjDate from
t_dx_tax_current
t,t_dx_dk_count d
where t.taxno=d.taxno
and t.current_tax_period=d.skssq
and t.taxno in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="selectSggxcx" parameterType="java.util.Map"
resultMap="SggxcxResultMap" databaseId="oracle">
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,
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,
case to_char(t.invoice_date,'yyyy-MM-dd') between c.select_start_date and c.select_end_date when
true then 1
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
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
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.rzh_yesorno = '0'
and t.auth_status in('0','5','6')
and t.export_mark = '0'
and t.company = #{company}
<if
test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '1'.toString()">
and t.invoice_status = '0'
and t.invoice_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 d.tj_status in('0','3')
</if>
<if
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
to_char(t.invoice_date,'yyyyMMdd') &lt;= c.select_start_date or
to_char(t.invoice_date,'yyyyMMdd') &gt;=
c.select_end_date or d.tj_status in ('1','2'))
</if>
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="qszt != null and qszt != '' and qszt != 'null' ">
and t.qs_status = #{qszt}
</if>
<if
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}
</if>
<if test="voucherNumber != null and voucherNumber != ''">
and t.voucher_number like concat('%',concat(#{voucherNumber},'%'))
</if>
<if test="paymentDateStart != null and paymentDateStart != '' and paymentDateStart != 'null' ">
<![CDATA[ AND to_char(t.payment_date,'yyyy-MM-dd') >= #{paymentDateStart} ]]>
</if>
<if test="paymentDateEnd != null and paymentDateEnd != '' and paymentDateEnd != 'null' ">
<![CDATA[ AND to_char(t.payment_date,'yyyy-MM-dd') <= #{paymentDateEnd} ]]>
</if>
<if test="paymentStatus != null and paymentStatus != '' and paymentStatus != '99'">
and t.payment_status = #{paymentStatus}
</if>
<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')
</if>
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '14' ">
and t.invoice_type = #{invoiceType}
</if>
<if test="invoiceSource!=null and invoiceSource!='99' and invoiceSource!='null' and invoiceSource!=''">
and t.invoice_source =#{invoiceSource}
</if>
<if test="fpzt != null and fpzt != '' and fpzt != 'null'">
and t.invoice_status = #{fpzt}
</if>
<if
test="qsfs != null and qsfs != '' and qsfs != 'null' ">
and t.qs_type = #{qsfs}
</if>
<if test="xfmc != null and xfmc != '' and xfmc != 'null' ">
and t.xf_name like concat(#{xfmc},'%')
</if>
<if test="qsr != null and qsr != '' and qsr != 'null' ">
and t.qs_name = #{qsr}
</if>
<if test="paymentDateStart != null and paymentDateStart != '' and paymentDateStart != 'null' ">
<![CDATA[ AND date_format(t.payment_date,'%Y-%m-%d') >= #{paymentDateStart} ]]>
</if>
<if test="paymentDateEnd != null and paymentDateEnd != '' and paymentDateEnd != 'null' ">
<![CDATA[ AND date_format(t.payment_date,'%Y-%m-%d') <= #{paymentDateEnd} ]]>
</if>
<if test="paymentStatus != null and paymentStatus != '' and paymentStatus != '99'">
and t.payment_status = #{paymentStatus}
</if>
<if test="settlementNo != null and settlementNo != ''">
and t.settlement_no like concat(#{settlementNo},'%')
</if>
<if
test="invoiceNo != null and invoiceNo != '' and invoiceNo != 'null' ">
and t.invoice_no = #{invoiceNo}
</if>
<!-- 按签收人查询 -->
order by t.bzdh desc
</select>
<select id="selectDksh" parameterType="java.util.Map"
resultType="com.dxhy.base.entity.BaseTDxDkCount"
databaseId="oracle">
select t.current_tax_period skssq,t.taxno taxno,d.tj_status tjStatus,tj_date tjDate from
t_dx_tax_current
t,t_dx_dk_count d
where t.taxno=d.taxno
and t.current_tax_period=d.skssq
and t.taxno in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="selectSggxcx" parameterType="java.util.Map"
resultMap="SggxcxResultMap" databaseId="oracle">
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,
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,
case to_char(t.invoice_date,'yyyy-MM-dd') between c.select_start_date and c.select_end_date when
true then 1
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
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
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.rzh_yesorno = '0'
and t.auth_status in('0','5','6')
and t.export_mark = '0'
and t.company = #{company}
<if
test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '1'.toString()">
and t.invoice_status = '0'
and t.invoice_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 d.tj_status in('0','3')
</if>
<if
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
to_char(t.invoice_date,'yyyyMMdd') &lt;= c.select_start_date or
to_char(t.invoice_date,'yyyyMMdd') &gt;=
c.select_end_date or d.tj_status in ('1','2'))
</if>
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="qszt != null and qszt != '' and qszt != 'null' ">
and t.qs_status = #{qszt}
</if>
<if
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}
</if>
<if test="voucherNumber != null and voucherNumber != ''">
and t.voucher_number like concat('%',concat(#{voucherNumber},'%'))
</if>
<if test="paymentDateStart != null and paymentDateStart != '' and paymentDateStart != 'null' ">
<![CDATA[ AND to_char(t.payment_date,'yyyy-MM-dd') >= #{paymentDateStart} ]]>
</if>
<if test="paymentDateEnd != null and paymentDateEnd != '' and paymentDateEnd != 'null' ">
<![CDATA[ AND to_char(t.payment_date,'yyyy-MM-dd') <= #{paymentDateEnd} ]]>
</if>
<if test="paymentStatus != null and paymentStatus != '' and paymentStatus != '99'">
and t.payment_status = #{paymentStatus}
</if>
<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')
</if>
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '14' ">
and t.invoice_type = #{invoiceType}
</if>
<if test="invoiceSource!=null and invoiceSource!='99' and invoiceSource!='null' and invoiceSource!=''">
and t.invoice_source =#{invoiceSource}
</if>
<if test="fpzt != null and fpzt != '' and fpzt != 'null'">
and t.invoice_status = #{fpzt}
</if>
<if
test="qsfs != null and qsfs != '' and qsfs != 'null' ">
and t.qs_type = #{qsfs}
</if>
<if test="xfmc != null and xfmc != '' and xfmc != 'null' ">
and t.xf_name like concat(#{xfmc},'%')
</if>
<if test="qsr != null and qsr != '' and qsr != 'null' ">
and t.qs_name = #{qsr}
</if>
<if test="paymentDateStart != null and paymentDateStart != '' and paymentDateStart != 'null' ">
<![CDATA[ AND date_format(t.payment_date,'%Y-%m-%d') >= #{paymentDateStart} ]]>
</if>
<if test="paymentDateEnd != null and paymentDateEnd != '' and paymentDateEnd != 'null' ">
<![CDATA[ AND date_format(t.payment_date,'%Y-%m-%d') <= #{paymentDateEnd} ]]>
</if>
<if test="paymentStatus != null and paymentStatus != '' and paymentStatus != '99'">
and t.payment_status = #{paymentStatus}
</if>
<if test="settlementNo != null and settlementNo != ''">
and t.settlement_no like concat(#{settlementNo},'%')
</if>
<if
test="invoiceNo != null and invoiceNo != '' and invoiceNo != 'null' ">
and t.invoice_no = #{invoiceNo}
</if>
<!-- 按签收人查询 -->
<if
test="position != null and position != '' and position != 'null' and position == '1'.toString()">
and t.qs_name = #{username}
@ -517,8 +515,11 @@
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and bzdh != '99'">
and t.bzdh = #{bzdh}
</if>
<if test="bzdh == null or bzdh == '' or bzdh == 'null' or bzdh == '99'">
and t.bzdh is not null
<if test="taxRate != null and taxRate != '' and taxRate != 'null' and taxRate != '99'">
and (t.tax_rate in
<foreach collection="rates" index="index" item="taxRate" separator="," open="(" close=")">
#{taxRate}
</foreach>
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99' and inAccountStatus == '1'.toString()">
and t.inaccount_status = #{inAccountStatus}
@ -564,7 +565,7 @@
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<!-- order by t.bzdh desc -->
order by t.bzdh desc
</select>
<select id="selectHj" parameterType="java.util.Map"

Loading…
Cancel
Save