优化智能勾选

release
yishiqihuasheng 2 years ago
parent 72bd25056c
commit 6fc3e4a5cf
  1. 14
      dxhy-base/src/main/java/com/dxhy/base/service/invoicecheck/BaseInvoiceManualCheckServiceImpl.java

@ -542,7 +542,7 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
if (i<pageList.size()-1){ if (i<pageList.size()-1){
List<BaseTDxRecordInvoice> collect = pageList.stream().skip(i + 1).sorted(Comparator.comparing(BaseTDxRecordInvoice::getTaxAmount)).collect(Collectors.toList()); List<BaseTDxRecordInvoice> collect = pageList.stream().skip(i + 1).sorted(Comparator.comparing(BaseTDxRecordInvoice::getTaxAmount)).collect(Collectors.toList());
log.info("collect====>{}",collect); log.info("collect====>{}",collect.stream().map(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++) {
@ -562,8 +562,8 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
|| pageList.get(i).getInvoiceAmount() != null && pageList.get(i).getInvoiceAmount().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) { || pageList.get(i).getTaxAmount() != null && pageList.get(i).getTaxAmount().compareTo(new BigDecimal(0)) < 0) {
currentTax = currentTax.subtract(pageList.get(i).getTaxAmount()); currentTax = currentTax.subtract(pageList.get(j).getTaxAmount());
hjje = hjje.subtract(pageList.get(i).getInvoiceAmount()); hjje = hjje.subtract(pageList.get(j).getInvoiceAmount());
count--; count--;
log.info("最小排序count--{}"+count+",currentTax==》"+currentTax+",hjje===>"+hjje); log.info("最小排序count--{}"+count+",currentTax==》"+currentTax+",hjje===>"+hjje);
continue; continue;
@ -571,8 +571,8 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
//发票税号一申请抵扣统计 //发票税号一申请抵扣统计
if (!gfshList1.contains(pageList.get(i).getGfTaxNo())) { if (!gfshList1.contains(pageList.get(i).getGfTaxNo())) {
//该发票税号已申请抵扣统计 //该发票税号已申请抵扣统计
currentTax = currentTax.subtract(pageList.get(i).getTaxAmount()); currentTax = currentTax.subtract(pageList.get(j).getTaxAmount());
hjje = hjje.subtract(pageList.get(i).getInvoiceAmount()); hjje = hjje.subtract(pageList.get(j).getInvoiceAmount());
count--; count--;
log.info("最小排序已申请抵扣统计 count-- ==={}"+count+",currentTax==》"+currentTax+",hjje===>"+hjje); log.info("最小排序已申请抵扣统计 count-- ==={}"+count+",currentTax==》"+currentTax+",hjje===>"+hjje);
@ -584,8 +584,8 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
returnList.add(vo); returnList.add(vo);
}else { }else {
log.info("最小排序统计税额超出税额上限减去最后一个,并结束循环遍历"); log.info("最小排序统计税额超出税额上限减去最后一个,并结束循环遍历");
currentTax = currentTax.subtract(pageList.get(i).getTaxAmount()); currentTax = currentTax.subtract(pageList.get(j).getTaxAmount());
hjje = hjje.subtract(pageList.get(i).getInvoiceAmount()); hjje = hjje.subtract(pageList.get(j).getInvoiceAmount());
break; break;
} }
} }

Loading…
Cancel
Save