|
|
@@ -209,7 +209,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
return x.add(y.getPurchaseAmount().multiply(y.getOrderQuantity()));
|
|
|
},BigDecimal::add);//采购金额求和
|
|
|
BigDecimal amount = list.stream().map(OrderItems::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);//金额求和
|
|
|
- BigDecimal grossProfit = amount.subtract(reduce.add(order.getPredictOceanFreight()));//毛利润
|
|
|
+ BigDecimal grossProfit = amount.subtract(reduce.add(order.getPredictOceanFreight())).subtract(order.getThisUsedProfit());
|
|
|
BigDecimal grossProfitRate = new BigDecimal(BigInteger.ZERO);
|
|
|
if (amount.compareTo(BigDecimal.ZERO) > 0){
|
|
|
grossProfitRate = (grossProfit.divide(amount,2)).multiply(new BigDecimal(100));
|
|
|
@@ -631,7 +631,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
if(order.getThisUsedProfit()!=null && order.getThisUsedProfit().compareTo(BigDecimal.ZERO)==1)
|
|
|
{
|
|
|
//增加客户的总返利
|
|
|
- basicCorpsProfitChange.setChangeProfitReturn(order.getThisUsedProfit());
|
|
|
+ /*basicCorpsProfitChange.setChangeProfitReturn(order.getThisUsedProfit());*/
|
|
|
//增加客户的已用返利
|
|
|
basicCorpsProfitChange.setChangeUsedProfit(order.getThisUsedProfit());
|
|
|
//减少客户的可用返利
|