发票未全部上传问题

dev
anthonywj 2 years ago
parent 678e04d42f
commit 1eb784ee3c

@ -225,15 +225,15 @@ public class PtxhyyClient extends CommonHttpClient {
}
String fphm = "";
String fprq = null;
if (CollectionUtil.isNotEmpty(ioOrderInvoiceEntities)) {
List<IoOrderInvoiceEntity> invoiceList = ioOrderInvoiceEntities.stream().filter(s -> i.getBindRlFk().equals(s.getBindRlFk()) && i.getBatchNo().equals(s.getBatchNo()))
.sorted(Comparator.comparing(IoOrderInvoiceEntity::getInvoiceDate, Comparator.reverseOrder())).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(invoiceList)) {
fphm = invoiceList.stream().map(IoOrderInvoiceEntity::getInvoiceEncode).collect(Collectors.joining(","));
if (invoiceList.get(0).getInvoiceDate() != null)
fprq = DateUtil.formatDateTime(invoiceList.get(0).getInvoiceDate());
ioOrderInvoiceEntities.removeAll(invoiceList);
}
List<IoOrderInvoiceEntity> invoiceList = IoOrderInvoiceEntity.builder().build()
.selectList(Wrappers.lambdaQuery(IoOrderInvoiceEntity.class).eq(IoOrderInvoiceEntity::getOrderIdFk, orderEntity.getBillNo())
.eq(IoOrderInvoiceEntity::getBindRlFk, i.getBindRlFk())
.eq(StrUtil.isNotEmpty(i.getBatchNo()), IoOrderInvoiceEntity::getBatchNo, i.getBatchNo()).
groupBy(IoOrderInvoiceEntity::getInvoiceEncode));
if (CollectionUtil.isNotEmpty(invoiceList)) {
fphm = invoiceList.stream().map(IoOrderInvoiceEntity::getInvoiceEncode).collect(Collectors.joining(","));
if (invoiceList.get(0).getInvoiceDate() != null)
fprq = DateUtil.formatDateTime(invoiceList.get(0).getInvoiceDate());
}
BigDecimal wzje = i.getPrice().multiply(BigDecimal.valueOf(i.getCount().intValue()));

Loading…
Cancel
Save