|
|
@ -471,6 +471,7 @@ namespace BBWY.Server.Business |
|
|
|
var storageType = ConvertStoreOrder(storeOrder); |
|
|
|
|
|
|
|
decimal? actualProductAmount = 0M; |
|
|
|
decimal actualAmount = 0M; //实收金额
|
|
|
|
decimal? preferentialAmount = 0M; |
|
|
|
decimal? pingtaiChengDanYouHuiQuan = 0M; |
|
|
|
|
|
|
@ -480,6 +481,7 @@ namespace BBWY.Server.Business |
|
|
|
//actualProductAmount = orderPayment - freightPrice + pingtaibutie;
|
|
|
|
pingtaiChengDanYouHuiQuan = (orderTotalInfo?.TotalPingTaiChengDanYouHuiQuan ?? 0M); |
|
|
|
actualProductAmount = orderSellerPrice + pingtaiChengDanYouHuiQuan; |
|
|
|
actualAmount = orderSellerPrice + freightPrice + (pingtaiChengDanYouHuiQuan ?? 0M); |
|
|
|
//preferentialAmount = orderTotalPrice - (actualProductAmount ?? 0M) - freightPrice;
|
|
|
|
preferentialAmount = orderTotalPrice - (actualProductAmount ?? 0M); |
|
|
|
dbOrder = new Order() |
|
|
@ -596,6 +598,7 @@ namespace BBWY.Server.Business |
|
|
|
|
|
|
|
pingtaiChengDanYouHuiQuan = (orderTotalInfo?.TotalPingTaiChengDanYouHuiQuan ?? 0M); |
|
|
|
actualProductAmount = orderSellerPrice + pingtaiChengDanYouHuiQuan; |
|
|
|
actualAmount = orderSellerPrice + freightPrice + (pingtaiChengDanYouHuiQuan ?? 0M); |
|
|
|
//preferentialAmount = orderTotalPrice - (actualProductAmount ?? 0M) - freightPrice;
|
|
|
|
preferentialAmount = orderTotalPrice - (actualProductAmount ?? 0M); |
|
|
|
|
|
|
@ -675,34 +678,6 @@ namespace BBWY.Server.Business |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
|
|
|
|
//#region 订单优惠
|
|
|
|
|
|
|
|
//var orderCouponJArray = (JArray)orderJToken["couponDetailList"];
|
|
|
|
//if (orderCouponJArray.HasValues)
|
|
|
|
//{
|
|
|
|
// foreach (var orderCouponJToken in orderCouponJArray)
|
|
|
|
// {
|
|
|
|
// var couponType = orderCouponJToken.Value<string>("couponType");
|
|
|
|
// if (string.IsNullOrEmpty(couponType))
|
|
|
|
// continue;
|
|
|
|
// //dbOrder.PreferentialAmount += orderCouponJToken.Value<decimal>("couponPrice");
|
|
|
|
// preferentialAmount += orderCouponJToken.Value<decimal>("couponPrice");
|
|
|
|
// if (!dbOrderCouponList.Any(oc => oc.OrderId == orderId))
|
|
|
|
// {
|
|
|
|
// insertOrderCouponList.Add(new OrderCoupon()
|
|
|
|
// {
|
|
|
|
// Id = idGenerator.NewLong(),
|
|
|
|
// SkuId = orderCouponJToken.Value<string>("skuId"),
|
|
|
|
// OrderId = orderId,
|
|
|
|
// CreateTime = DateTime.Now,
|
|
|
|
// CouponType = couponType,
|
|
|
|
// CouponPrice = orderCouponJToken.Value<decimal>("couponPrice")
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
#region 订单状态转换
|
|
|
|
var orderState = ConvertOrderState(orderJToken, dbOrder.StorageType); |
|
|
|
#endregion
|
|
|
@ -923,7 +898,7 @@ namespace BBWY.Server.Business |
|
|
|
if (dbOrder.OrderTotalPrice != 0) |
|
|
|
orderCost.CalculationOrderProfitAndCost(dbOrder, null); |
|
|
|
else |
|
|
|
orderCost.CalculationOrderProfitAndCost(actualProductAmount ?? 0M, null); |
|
|
|
orderCost.CalculationOrderProfitAndCost(actualAmount, null); |
|
|
|
|
|
|
|
insertOrderCostList.Add(orderCost); |
|
|
|
#endregion
|
|
|
|