diff --git a/src/WMS.Web.Domain/Entitys/OutStockTask.cs b/src/WMS.Web.Domain/Entitys/OutStockTask.cs index 62ef8e43..79702111 100644 --- a/src/WMS.Web.Domain/Entitys/OutStockTask.cs +++ b/src/WMS.Web.Domain/Entitys/OutStockTask.cs @@ -211,7 +211,7 @@ namespace WMS.Web.Domain.Entitys if (list.Where(w => w.Type != OutStockType.Sal).Any()) return Result.ReFailure(ResultCodes.MergeStatusError); if (list.GroupBy(g => g.DeliveryOrgId).Count() > 1) return Result.ReFailure(ResultCodes.MergeStatusError); if (list.GroupBy(g => g.ReceiptCustomerId).Count() > 1) return Result.ReFailure(ResultCodes.MergeStatusError); - var details = list.SelectMany(s => s.Details).ToList(); + var details = list.SelectMany(s => s.Details).ToList().Clone(); if (list.GroupBy(g => g.StockCode).Count() > 1) return Result.ReFailure(ResultCodes.MergeStatusError); List details_new = new List(); @@ -239,6 +239,9 @@ namespace WMS.Web.Domain.Entitys this.OperatorId = creatorId; this.OperateTime = DateTime.Now; this.Status = OutStockStatus.Wait; + this.DeliveryOrgId = list.First().DeliveryOrgId; + this.ReceiptCustomerId = list.First().ReceiptCustomerId; + this.StockCode = list.First().StockCode; this.Type = OutStockType.Sal; this.Details = details_new;