wanglang hace 6 días
padre
commit
ef8a559506

+ 4 - 0
trade-service/src/main/java/com/trade/service/trade/purchaseorder/service/impl/PurchaseOrderInvoiceServiceImpl.java

@@ -142,6 +142,10 @@ public class PurchaseOrderInvoiceServiceImpl extends ServiceImpl<PurchaseOrderIn
                 }
                 invoiceCommodityDtos.add(invoiceCommodityDto);
             }
+            BigDecimal allNumber = invoiceCommodityDtos.stream()
+                    .filter(commodityDto -> commodityDto.getNumber() != null).map(InvoiceCommodityDto::getNumber)
+                    .reduce(BigDecimal.ZERO, BigDecimal::add);
+            purchaseOrderInvoiceDetailsVo.setNumber(allNumber);
             purchaseOrderInvoiceDetailsVo.setInvoiceCommodityList(invoiceCommodityDtos);
         }
         return purchaseOrderInvoiceDetailsVo;