|
@ -540,7 +540,14 @@ namespace BBWYB.Server.Business |
|
|
{ |
|
|
{ |
|
|
foreach (var cargoParam in allCargoParamList) |
|
|
foreach (var cargoParam in allCargoParamList) |
|
|
{ |
|
|
{ |
|
|
|
|
|
var createOrderItem = createdPurchaseOrderItemList.FirstOrDefault(x => x.SkuId == cargoParam.SkuId); |
|
|
|
|
|
if (createOrderItem != null) |
|
|
|
|
|
{ |
|
|
|
|
|
var update = fsql.Update<PurchaseSchemeProductSku>() |
|
|
|
|
|
.Set(pss => pss.LastPurchasePriceCost, createOrderItem.Price) |
|
|
|
|
|
.Where(pss => pss.SkuId == cargoParam.SkuId && pss.SkuPurchaseSchemeId == cargoParam.SchemeId); |
|
|
|
|
|
updatePssList.Add(update); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
#endregion
|
|
|
#endregion
|
|
@ -742,6 +749,11 @@ namespace BBWYB.Server.Business |
|
|
foreach (var update in updatePurchaseSchemeList) |
|
|
foreach (var update in updatePurchaseSchemeList) |
|
|
update.ExecuteAffrows(); |
|
|
update.ExecuteAffrows(); |
|
|
} |
|
|
} |
|
|
|
|
|
if (updatePssList.Count() > 0) |
|
|
|
|
|
{ |
|
|
|
|
|
foreach (var update in updatePssList) |
|
|
|
|
|
update.ExecuteAffrows(); |
|
|
|
|
|
} |
|
|
fsql.Update<Order>(request.OrderId).Set(o => o.OrderState, dbOrder.OrderState) |
|
|
fsql.Update<Order>(request.OrderId).Set(o => o.OrderState, dbOrder.OrderState) |
|
|
.SetIf(!string.IsNullOrEmpty(request.Remark), o => o.PurchaseRemark, request.Remark) |
|
|
.SetIf(!string.IsNullOrEmpty(request.Remark), o => o.PurchaseRemark, request.Remark) |
|
|
.Set(o => o.IsPurchased, true) |
|
|
.Set(o => o.IsPurchased, true) |
|
|