ariesy 解决进项bug v2

release
yefei 2 years ago
parent aa1bdafa76
commit 6f284d26f3
  1. 8
      dxhy-base/src/main/java/com/dxhy/base/service/invoicecheck/BaseInvoiceManualCheckServiceImpl.java
  2. 2
      dxhy-base/src/main/java/com/dxhy/base/service/receipt/BaseReceiptOutServiceImpl.java
  3. 32
      dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml

@ -14,6 +14,7 @@ import java.util.Map;
import javax.annotation.Resource;
import com.dxhy.common.constant.DictConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSONObject;
@ -49,6 +50,7 @@ import com.github.pagehelper.PageInfo;
* @version 1.0
*/
@SuppressWarnings({"AlibabaLowerCamelCaseVariableNaming", "AlibabaUndefineMagicConstant", "AlibabaMethodTooLong"})
@Slf4j
@Service("baseInvoiceManualCheckService")
public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDxRecordInvoiceDao, BaseTDxRecordInvoice>
implements BaseInvoiceManualCheckService {
@ -204,10 +206,12 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
if (!"1".equals(pageList.get(i).getAuthStatus())) {
vo.setSelect(false);
}
log.info("返回的发票信息是:{}",pageList.get(i));
String invoiceStatus="07";
if ( !invoiceStatus.contains(pageList.get(i).getInvoiceStatus())
|| pageList.get(i).getInvoiceAmount().compareTo(new BigDecimal(0)) < 0
|| pageList.get(i).getTaxAmount().compareTo(new BigDecimal(0)) < 0) {
|| pageList.get(i).getInvoiceAmount() != null && pageList.get(i).getInvoiceAmount().compareTo(new BigDecimal(0)) < 0
|| pageList.get(i).getTaxAmount() != null && pageList.get(i).getTaxAmount().compareTo(new BigDecimal(0)) < 0) {
vo.setSelect(false);
vo.setUpgradeStatus("0");
}

@ -190,6 +190,7 @@ public class BaseReceiptOutServiceImpl extends MpBaseServiceImpl<BaseReceiptOutD
// 转出金额
vo.setOutAmount(AmountFormatUtil.fmtMicrometer(MathUtil.round(record.getOutInvoiceAmout().toPlainString())));
// 转出税额
if (record.getOutTaxAmount() != null)
vo.setOutTax(AmountFormatUtil.fmtMicrometer(MathUtil.round(record.getOutTaxAmount().toPlainString())));
vo.setRemark(record.getOutRemark());
@ -644,6 +645,7 @@ public class BaseReceiptOutServiceImpl extends MpBaseServiceImpl<BaseReceiptOutD
// 转出金额
vo.setOutAmount(AmountFormatUtil.fmtMicrometer(MathUtil.round(record.getOutInvoiceAmout().toPlainString())));
// 转出税额
if (record.getOutTaxAmount() != null)
vo.setOutTax(AmountFormatUtil.fmtMicrometer(MathUtil.round(record.getOutTaxAmount().toPlainString())));
vo.setRemark(record.getOutRemark());
vo.setOutDate(DateUtils.dateToStr(record.getOutDate()));

@ -110,7 +110,7 @@
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') )
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}
@ -257,7 +257,7 @@
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') )
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}
@ -355,7 +355,7 @@
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 date_format(t.invoice_date,'%Y-%m-%d') 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.auth_status in('0','5','6')
and t.export_mark = '0'
@ -392,7 +392,7 @@
and t.voucher_number like concat('%',concat(#{voucherNumber},'%'))
</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') )
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}
@ -463,7 +463,7 @@
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.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'
@ -479,10 +479,10 @@
<if
test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '0'.toString()">
and (t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount &lt;0 or t.tax_amount &lt;0 or
and t.invoice_status in ('1','2','3','4','8','80') 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'))
c.select_end_date or d.tj_status in ('1','2')
</if>
and t.gf_tax_no in
@ -500,7 +500,7 @@
and t.voucher_number like concat('%',concat(#{voucherNumber},'%'))
</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') )
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}
@ -755,7 +755,7 @@
where date_format(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq}
and t.rzh_yesorno = '0'
and t.invoice_status in ('0','7')
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.export_mark = '0'
and t.invoice_amount>0
and t.tax_amount>=0
@ -789,7 +789,7 @@
and date_format(t.qs_date,'%Y-%m-%d') between #{qsksrq} and #{qsjsrq}
</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') )
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}
@ -834,7 +834,7 @@
where to_char(t.invoice_date,'yyyy-MM-dd') between #{kpksrq} and #{kpjsrq}
and t.rzh_yesorno = '0'
and t.invoice_status in ('0','7')
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.invoice_amount>0
and t.tax_amount>=0
and t.auth_status in ('0','5','6')
@ -867,7 +867,7 @@
and to_char(t.qs_date,'yyyy-MM-dd') between #{qsksrq} and #{qsjsrq}
</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') )
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}
@ -925,7 +925,7 @@
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 date_format(t.invoice_date,'%Y-%m-%d') 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.invoice_status in ('0','7')
and t.auth_status in('0','5','6')
@ -1012,7 +1012,7 @@
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.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.invoice_status in ('0','7')
and t.auth_status in('0','5','6')
@ -1094,7 +1094,7 @@
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 date_format(t.invoice_date,'%Y-%m-%d') 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.invoice_status in ('0','7')
and t.auth_status in('0','5','6')
@ -1169,7 +1169,7 @@
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.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.invoice_status in ('0','7')
and t.auth_status in('0','5','6')

Loading…
Cancel
Save