|
@ -246,21 +246,21 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
.filter(Objects::nonNull).mapToDouble(SysSalesOrder::getRmbTaxSum).sum(); |
|
|
.filter(Objects::nonNull).mapToDouble(SysSalesOrder::getRmbTaxSum).sum(); |
|
|
|
|
|
|
|
|
// 计算所有订单的物料合计
|
|
|
// 计算所有订单的物料合计
|
|
|
long totalMaterialSum = sysSalesOrders.stream() |
|
|
int totalMaterialSum = sysSalesOrders.stream() |
|
|
.mapToLong(order -> order.getMaterialSum() != null ? order.getMaterialSum() : 0L) |
|
|
.filter(Objects::nonNull).mapToInt(SysSalesOrder::getMaterialSum).sum(); |
|
|
.sum(); |
|
|
|
|
|
|
|
|
|
|
|
// 计算所有订单的数量合计
|
|
|
// 计算所有订单的数量合计
|
|
|
long totalEnterpriseSum = sysSalesOrders.stream() |
|
|
int totalEnterpriseSum = sysSalesOrders.stream() |
|
|
.mapToLong(order -> order.getEnterpriseSum() != null ? order.getEnterpriseSum() : 0L) |
|
|
.filter(Objects::nonNull).mapToInt(SysSalesOrder::getEnterpriseSum).sum(); |
|
|
.sum(); |
|
|
|
|
|
|
|
|
|
|
|
// 设置到sysSalesShippingInform对象中
|
|
|
// 设置到sysSalesShippingInform对象中
|
|
|
sysSalesShippingInform.setAllPriceExcludingTaxDollar(BigDecimal.valueOf(totalNoUsdSum)); |
|
|
sysSalesShippingInform.setAllPriceExcludingTaxDollar(BigDecimal.valueOf(totalNoUsdSum)); |
|
|
sysSalesShippingInform.setAllPriceExcludingTaxRmb(BigDecimal.valueOf(totalNoRmbSum)); |
|
|
sysSalesShippingInform.setAllPriceExcludingTaxRmb(BigDecimal.valueOf(totalNoRmbSum)); |
|
|
sysSalesShippingInform.setAllPriceIncludesTax(BigDecimal.valueOf(totalRmbTaxSum)); |
|
|
sysSalesShippingInform.setAllPriceIncludesTax(BigDecimal.valueOf(totalRmbTaxSum)); |
|
|
sysSalesShippingInform.setMaterialSum(Math.toIntExact(totalMaterialSum)); |
|
|
sysSalesShippingInform.setMaterialSum(totalMaterialSum); |
|
|
sysSalesShippingInform.setEnterpriseSum(Math.toIntExact(totalEnterpriseSum)); |
|
|
sysSalesShippingInform.setEnterpriseSum(totalEnterpriseSum); |
|
|
|
|
|
|
|
|
sysSalesShippingInform.setCustomerContact(sysSalesOrder.getCustomerDelivery()); |
|
|
sysSalesShippingInform.setCustomerContact(sysSalesOrder.getCustomerDelivery()); |
|
|
sysSalesShippingInform.setContactNumber(sysSalesOrder.getDeliveryPhone()); |
|
|
sysSalesShippingInform.setContactNumber(sysSalesOrder.getDeliveryPhone()); |
|
|