|
@ -2810,7 +2810,7 @@ namespace BBWYB.Server.Business |
|
|
bool isEditOrderPrice = true; |
|
|
bool isEditOrderPrice = true; |
|
|
try |
|
|
try |
|
|
{ |
|
|
{ |
|
|
var orderPurchaseInfo = fsql.Select<OrderPurchaseInfo>().Where(opi => opi.PurchaseOrderId == purchaseOrderId).ToOne(); |
|
|
var orderPurchaseInfo = fsql.Select<OrderPurchaseInfo>().Where(opi => opi.PurchaseOrderId == purchaseOrderId && opi.IsEnabled == true).ToOne(); |
|
|
if (orderPurchaseInfo == null) |
|
|
if (orderPurchaseInfo == null) |
|
|
throw new Exception($"采购单{purchaseOrderId}-未查询到采购单"); |
|
|
throw new Exception($"采购单{purchaseOrderId}-未查询到采购单"); |
|
|
|
|
|
|
|
@ -2862,6 +2862,8 @@ namespace BBWYB.Server.Business |
|
|
|
|
|
|
|
|
IList<OP_EditPriceSkuRequest> op_EditPriceSkuRequests = new List<OP_EditPriceSkuRequest>(); |
|
|
IList<OP_EditPriceSkuRequest> op_EditPriceSkuRequests = new List<OP_EditPriceSkuRequest>(); |
|
|
|
|
|
|
|
|
|
|
|
IUpdate<OrderPurchaseInfo> updatePurchaseOrder = null; |
|
|
|
|
|
|
|
|
var ppclient = ppPlatformClientFactory.GetClient(AdapterEnums.PlatformType.阿里巴巴); |
|
|
var ppclient = ppPlatformClientFactory.GetClient(AdapterEnums.PlatformType.阿里巴巴); |
|
|
|
|
|
|
|
|
var totalPurchaseProductAmount = 0M; |
|
|
var totalPurchaseProductAmount = 0M; |
|
@ -2944,6 +2946,8 @@ namespace BBWYB.Server.Business |
|
|
updateOrder = fsql.Update<Order>(dbOrder.Id).Set(o => o.OrderTotalPrice, dbOrder.OrderTotalPrice) |
|
|
updateOrder = fsql.Update<Order>(dbOrder.Id).Set(o => o.OrderTotalPrice, dbOrder.OrderTotalPrice) |
|
|
.Set(o => o.OrderSellerPrice, dbOrder.OrderSellerPrice) |
|
|
.Set(o => o.OrderSellerPrice, dbOrder.OrderSellerPrice) |
|
|
.Set(o => o.FreightPrice, dbOrder.FreightPrice); |
|
|
.Set(o => o.FreightPrice, dbOrder.FreightPrice); |
|
|
|
|
|
|
|
|
|
|
|
updatePurchaseOrder = fsql.Update<OrderPurchaseInfo>(orderPurchaseInfo.Id).Set(opi => opi.IsAutoEditOrderPrice, Enums.AutoEditOrderPriceType.已平价); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#region 订单Sku成本
|
|
|
#region 订单Sku成本
|
|
@ -2983,6 +2987,7 @@ namespace BBWYB.Server.Business |
|
|
|
|
|
|
|
|
fsql.Transaction(() => |
|
|
fsql.Transaction(() => |
|
|
{ |
|
|
{ |
|
|
|
|
|
updatePurchaseOrder?.ExecuteAffrows(); |
|
|
foreach (var update in updateOrderCostDetailList) |
|
|
foreach (var update in updateOrderCostDetailList) |
|
|
update.ExecuteAffrows(); |
|
|
update.ExecuteAffrows(); |
|
|
updateOrderCost?.ExecuteAffrows(); |
|
|
updateOrderCost?.ExecuteAffrows(); |
|
|