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 8480dd421..a3d4c6fcd 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 @@ -93,7 +93,7 @@ public class CustomerProductionReturnNoteAppService : if (customerlist.Count > 0) { - entity.CustomerName = customerlist.FirstOrDefault().Name; + entity.CustomerName =$"{customerlist.FirstOrDefault().Name}({entity.CustomerCode})" ; } else { @@ -105,16 +105,16 @@ public class CustomerProductionReturnNoteAppService : var custitmDetail = await _customerItemAppService.GetListByPartsAsync(parts.ToList()).ConfigureAwait(false); #region 20241230修改 - var query = from itm in custitmDetail - join itm1 in custitmDetail on itm.ItemCode equals itm1.ItemCode - where itm.CustomerCode != itm1.CustomerCode - select itm; - var diff= query.ToList(); - if (diff.Count > 0) - { - var diffparts=diff.Select(p => p.ItemCode).Distinct().ToList(); - throw new UserFriendlyException($"零件编号{string.Join(",",diffparts)},对应多个客户不能进行退货,请查看客户零件关系表!"); - } + //var query = from itm in custitmDetail + // join itm1 in custitmDetail on itm.ItemCode equals itm1.ItemCode + // where itm.CustomerCode != itm1.CustomerCode + // select itm; + //var diff= query.ToList(); + //if (diff.Count > 0) + //{ + // var diffparts=diff.Select(p => p.ItemCode).Distinct().ToList(); + // throw new UserFriendlyException($"零件编号{string.Join(",",diffparts)},对应多个客户不能进行退货,请查看客户零件关系表!"); + //} #endregion #region 20241230修改 @@ -123,15 +123,9 @@ public class CustomerProductionReturnNoteAppService : var part= custitmDetail.FirstOrDefault(p => p.CustomerCode == entity.CustomerCode && p.ItemCode==itm.ItemCode); if (part == null) { - throw new UserFriendlyException($"零件编号{itm.ItemCode}客户编码{entity.CustomerCode}在零件关系表中不存在!"); + throw new UserFriendlyException($"零件编号{itm.ItemCode}客户编码{entity.CustomerCode}在客户物料关系表中不存在!"); } } - - - - - - #endregion