From fdd0918aee2a41f991a44ad39c1012724acd38c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Wed, 6 Nov 2024 14:53:35 +0800 Subject: [PATCH] UP --- .../CustomerProductionReturnNoteAppService.cs | 20 ++++----- .../DeliverRequestFisAppService.cs | 44 +++++++++---------- 2 files changed, 32 insertions(+), 32 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 171d6981b..9cf037964 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 @@ -60,19 +60,19 @@ public class CustomerProductionReturnNoteAppService : var parts= input.Details.Select(itm => itm.ItemCode).Distinct(); - var ls=await IsExistCustomerItemPrice(parts.ToList(),input.CustomerCode).ConfigureAwait(false); + //var ls=await IsExistCustomerItemPrice(parts.ToList(),input.CustomerCode).ConfigureAwait(false); - if (ls.Count > 0) - { - throw new UserFriendlyException($"销售价格表中没有查到客户为{input.CustomerCode}零件号为{string.Join(",", ls.ToArray())}的零件关系和价格"); - } + //if (ls.Count > 0) + //{ + // throw new UserFriendlyException($"销售价格表中没有查到客户为{input.CustomerCode}零件号为{string.Join(",", ls.ToArray())}的零件关系和价格"); + //} - var errlist= await CheckCustomerItem(parts.ToList(), input.CustomerCode).ConfigureAwait(false); + //var errlist= await CheckCustomerItem(parts.ToList(), input.CustomerCode).ConfigureAwait(false); - if (errlist.Count > 0) - { - throw new UserFriendlyException($"客户零件关系表中没有查到客户为{input.CustomerCode}零件号为{string.Join(",", ls.ToArray())}的零件关系"); - } + // if (errlist.Count > 0) + // { + // throw new UserFriendlyException($"客户零件关系表中没有查到客户为{input.CustomerCode}零件号为{string.Join(",", ls.ToArray())}的零件关系"); + // } var custitmDetail = await _customerItemAppService.GetListByPartsAsync(parts.ToList()).ConfigureAwait(false); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs index f269ac5f1..7edd5d8f5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs @@ -144,18 +144,18 @@ public class DeliverRequestFisAppService : detail.Uom = itemBasicDto.BasicUom; detail.StdPackQty=itemBasicDto.StdPackQty; } - var itemlist=itemTransformRequest.Details.Select(p => p.ItemCode).Distinct(); - var customerCode = itemTransformRequest.CustomerCode; - var errors=await CheckCustomerItem(itemlist.ToList(),customerCode).ConfigureAwait(false); - if (errors.Count > 0) - { - throw new UserFriendlyException($"客户零件关系表中没有查到客户为{customerCode},零件号为{string.Join(",", errors.ToArray())}的零件关系"); - } - var priceErrors=await IsExistCustomerItemPrice(itemlist.ToList(), customerCode).ConfigureAwait(false); - if (priceErrors.Count > 0) - { - throw new UserFriendlyException($"销售价格表中没有查到客户为{customerCode},零件号为{string.Join(",", priceErrors.ToArray())}的零件关系和价格"); - } + //var itemlist=itemTransformRequest.Details.Select(p => p.ItemCode).Distinct(); + //var customerCode = itemTransformRequest.CustomerCode; + //var errors=await CheckCustomerItem(itemlist.ToList(),customerCode).ConfigureAwait(false); + //if (errors.Count > 0) + //{ + // throw new UserFriendlyException($"客户零件关系表中没有查到客户为{customerCode},零件号为{string.Join(",", errors.ToArray())}的零件关系"); + //} + //var priceErrors=await IsExistCustomerItemPrice(itemlist.ToList(), customerCode).ConfigureAwait(false); + //if (priceErrors.Count > 0) + //{ + // throw new UserFriendlyException($"销售价格表中没有查到客户为{customerCode},零件号为{string.Join(",", priceErrors.ToArray())}的零件关系和价格"); + //} } @@ -278,16 +278,16 @@ public class DeliverRequestFisAppService : var itemlist = entity.Details.Select(p => p.ItemCode).Distinct(); var customerCode = entity.CustomerCode; - var errors = await CheckCustomerItem(itemlist.ToList(), customerCode).ConfigureAwait(false); - if (errors.Count > 0) - { - throw new UserFriendlyException($"客户零件关系表中没有查到客户为{customerCode},零件号为{string.Join(",", errors.ToArray())}的零件关系"); - } - var priceErrors = await IsExistCustomerItemPrice(itemlist.ToList(), customerCode).ConfigureAwait(false); - if (priceErrors.Count > 0) - { - throw new UserFriendlyException($"销售价格表中没有查到客户为{customerCode},零件号为{string.Join(",", priceErrors.ToArray())}的零件关系和价格"); - } + //var errors = await CheckCustomerItem(itemlist.ToList(), customerCode).ConfigureAwait(false); + //if (errors.Count > 0) + //{ + // throw new UserFriendlyException($"客户零件关系表中没有查到客户为{customerCode},零件号为{string.Join(",", errors.ToArray())}的零件关系"); + //} + //var priceErrors = await IsExistCustomerItemPrice(itemlist.ToList(), customerCode).ConfigureAwait(false); + //if (priceErrors.Count > 0) + //{ + // throw new UserFriendlyException($"销售价格表中没有查到客户为{customerCode},零件号为{string.Join(",", priceErrors.ToArray())}的零件关系和价格"); + //} await _deliverRequestManager.CreateAsync(entity).ConfigureAwait(false);