From ca0d4e1090be55afac97ee479696f07943031c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Thu, 16 Jan 2025 10:08:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomerProductionReturnNoteAppService.cs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs index 5a4d0c2d3..51165c654 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs @@ -59,19 +59,12 @@ public class CustomerProductionReturnNoteAppService : [HttpGet("{id}")] public override async Task GetAsync(Guid id) { - - var entity=await base.GetAsync(id).ConfigureAwait(false); - foreach (var itm in entity.Details) { itm.CustomerCode=entity.CustomerCode; itm.CustomerName=entity.CustomerName; } - - - - return entity; } @@ -120,9 +113,9 @@ public class CustomerProductionReturnNoteAppService : foreach (var itm in input.Details) { - var part= custitmDetail.FirstOrDefault(p => p.CustomerCode == entity.CustomerCode && p.ItemCode==itm.ItemCode); - if (part == null) - { + var part = custitmDetail.FirstOrDefault(p => p.CustomerCode == entity.CustomerCode && p.ItemCode == itm.ItemCode); + if (part == null) + { throw new UserFriendlyException($"零件编号{itm.ItemCode}客户编码{entity.CustomerCode}在客户物品关系表中不存在!"); } }