优化智能勾选

release
yishiqihuasheng 2 years ago
parent ef65832a30
commit 9293058870
  1. 5
      dxhy-base/src/main/java/com/dxhy/base/service/invoicecheck/BaseInvoiceManualCheckServiceImpl.java
  2. 1
      dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml

@ -497,6 +497,9 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
} }
for (int i = 0; i < pageList.size(); i++) { for (int i = 0; i < pageList.size(); i++) {
if(pageList.get(i).getTaxAmount().compareTo(new BigDecimal("0"))<1){
continue;
}
currentTax = currentTax.add(pageList.get(i).getTaxAmount()); currentTax = currentTax.add(pageList.get(i).getTaxAmount());
hjje = hjje.add(pageList.get(i).getInvoiceAmount()); hjje = hjje.add(pageList.get(i).getInvoiceAmount());
log.info("maxTax====>"+maxTax+",currentTax====>"+currentTax); log.info("maxTax====>"+maxTax+",currentTax====>"+currentTax);
@ -537,7 +540,7 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
currentTax = currentTax.subtract(pageList.get(i).getTaxAmount()); currentTax = currentTax.subtract(pageList.get(i).getTaxAmount());
hjje = hjje.subtract(pageList.get(i).getInvoiceAmount()); hjje = hjje.subtract(pageList.get(i).getInvoiceAmount());
List<BaseTDxRecordInvoice> collect = pageList.stream().skip(i + 1).sorted(Comparator.comparing(BaseTDxRecordInvoice::getTaxAmount)).collect(Collectors.toList()); List<BaseTDxRecordInvoice> collect = pageList.stream().skip(i + 1).filter(e->e.getTaxAmount().compareTo(new BigDecimal("0"))<1).sorted(Comparator.comparing(BaseTDxRecordInvoice::getTaxAmount)).collect(Collectors.toList());
if (collect != null && collect.size() > 0){ if (collect != null && collect.size() > 0){
log.info("从小到大排序在进行添加"); log.info("从小到大排序在进行添加");
for (int j = 0; j < collect.size(); j++) { for (int j = 0; j < collect.size(); j++) {

@ -1284,6 +1284,7 @@
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}
and t.invoice_status = '0'
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=")">

Loading…
Cancel
Save