From 865b737c6a2300f7dfc79ae6e96dafe4561f66ff Mon Sep 17 00:00:00 2001 From: 18942506660 <18942506660@A18942506660> Date: Wed, 27 Dec 2023 11:27:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/WMS.Web.Domain/Entitys/OutStockTask.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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;