|
|
|
@ -497,6 +497,9 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
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()); |
|
|
|
|
hjje = hjje.add(pageList.get(i).getInvoiceAmount()); |
|
|
|
|
log.info("maxTax====>"+maxTax+",currentTax====>"+currentTax); |
|
|
|
@ -537,7 +540,7 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx |
|
|
|
|
currentTax = currentTax.subtract(pageList.get(i).getTaxAmount()); |
|
|
|
|
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){ |
|
|
|
|
log.info("从小到大排序在进行添加"); |
|
|
|
|
for (int j = 0; j < collect.size(); j++) { |
|
|
|
|