From 24d6ae567a0b5266b6ea41fd72589d7c70436a41 Mon Sep 17 00:00:00 2001 From: sanji Date: Mon, 11 Dec 2023 16:47:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=85=B3=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BBWY.Server.Business/Order/OrderBusiness.cs | 26 ++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/BBWY.Server.Business/Order/OrderBusiness.cs b/BBWY.Server.Business/Order/OrderBusiness.cs index a7232797..db1c0b62 100644 --- a/BBWY.Server.Business/Order/OrderBusiness.cs +++ b/BBWY.Server.Business/Order/OrderBusiness.cs @@ -1021,14 +1021,15 @@ namespace BBWY.Server.Business if (orderCost != null) { orderCost.PlatformCommissionRatio = relationPurchaseOrderRequestV2.PlatformCommissionRatio; - orderCost.PlatformCommissionAmount = dbOrder.OrderSellerPrice * relationPurchaseOrderRequestV2.PlatformCommissionRatio; + //orderCost.PlatformCommissionAmount = dbOrder.OrderSellerPrice * relationPurchaseOrderRequestV2.PlatformCommissionRatio; orderCost.DeliveryExpressFreight = totalDeliveryFreight; orderCost.PurchaseAmount = totalPurchaseAmount; - orderCost.Profit = dbOrder.OrderSellerPrice + - dbOrder.FreightPrice - - orderCost.PurchaseAmount - - orderCost.DeliveryExpressFreight - - orderCost.PlatformCommissionAmount; + orderCost.CalculationOrderProfitAndCost(dbOrder, null); + //orderCost.Profit = dbOrder.OrderSellerPrice + + // dbOrder.FreightPrice - + // orderCost.PurchaseAmount - + // orderCost.DeliveryExpressFreight - + // orderCost.PlatformCommissionAmount; orderCost.IsEstimateCost = false; orderCost.IsManualEdited = true; updateOrderCost = fsql.Update().SetSource(orderCost).IgnoreColumns(oc => new @@ -1053,16 +1054,15 @@ namespace BBWY.Server.Business SDCommissionAmount = 0, SDOrderAmount = 0, PurchaseAmount = totalPurchaseAmount, - PlatformCommissionAmount = dbOrder.OrderSellerPrice * relationPurchaseOrderRequestV2.PlatformCommissionRatio, PreferentialAmount = preferentialAmount, IsManualEdited = true }; - - orderCost.Profit = dbOrder.OrderSellerPrice + - dbOrder.FreightPrice - - orderCost.PurchaseAmount - - orderCost.DeliveryExpressFreight - - orderCost.PlatformCommissionAmount; + orderCost.CalculationOrderProfitAndCost(dbOrder, null); + //orderCost.Profit = dbOrder.OrderSellerPrice + + // dbOrder.FreightPrice - + // orderCost.PurchaseAmount - + // orderCost.DeliveryExpressFreight - + // orderCost.PlatformCommissionAmount; insertOrderCost = fsql.Insert(orderCost); } #endregion