Browse Source

更新关联

pjzs_starttask_update
sanji 2 years ago
parent
commit
24d6ae567a
  1. 26
      BBWY.Server.Business/Order/OrderBusiness.cs

26
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<OrderCost>().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

Loading…
Cancel
Save