From 0f9d0005a41f8be45d2bff0c0998762ccd9db70b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Thu, 2 Jan 2025 16:04:53 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs | 3 +++ .../Jobs/UnplannedIssueJobs/UnplannedIssueJobAppService.cs | 2 +- .../Jobs/UnplannedReceiptJobs/UnplannedReceiptJobAppService.cs | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs index c1c9a8354..6c343d030 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs @@ -1250,6 +1250,9 @@ public class CoatingIssueJobAppService } var client = new AgvJobClient(_agvOptions.Value.Address, httpclient, _agvOptions.Value.Path); + + _logger.LogInformation($"发送Json{JsonSerializer.Serialize(request)}{DateTime.Now.ToString()}"); + ret = await client.PushOutTaskCoatingAsync(request).ConfigureAwait(false); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedIssueJobs/UnplannedIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedIssueJobs/UnplannedIssueJobAppService.cs index 845592ad0..f1eb58c1c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedIssueJobs/UnplannedIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedIssueJobs/UnplannedIssueJobAppService.cs @@ -882,7 +882,7 @@ public class UnplannedIssueJobAppService httpclient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}"))); } - + _logger.LogInformation($"发送Json{JsonSerializer.Serialize(request)}{DateTime.Now.ToString()}"); var client = new AgvJobClient(_agvOptions.Value.Address, httpclient, _agvOptions.Value.Path); ret = await client.PushOutTaskUnplannedAsync(request).ConfigureAwait(false); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobAppService.cs index 3837c28b6..cb3a039f5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobAppService.cs @@ -512,6 +512,9 @@ public class UnplannedReceiptJobAppService } var client = new AgvJobClient(_agvOptions.Value.Address, httpclient, _agvOptions.Value.Path); + _logger.LogInformation($"发送Json{JsonSerializer.Serialize(request)}{DateTime.Now.ToString()}"); + + ret = await client.PushOutTaskUnplannedReceiptAsync(request).ConfigureAwait(false); From 9aff6495aa8e0eabbef7900f69bc764d0bd257b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Thu, 2 Jan 2025 16:09:53 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs | 2 +- .../IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs | 2 +- .../IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs index f2e31f098..b9e03a79f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs @@ -1178,7 +1178,7 @@ public class AssembleIssueJobAppService var first = job.Details.FirstOrDefault(); var request = new AgvRequest(); request.MatCode = first.ItemCode; - request.MatQty = first.HandledToQty; + request.MatQty = first.HandledFromQty; request.OrderNum = job.Number; request.OrderType = EnumJobType.AssembleIssueJob.ToString(); request.BeginPosition = beginPosition; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs index 6c343d030..849cd0ad4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs @@ -1211,7 +1211,7 @@ public class CoatingIssueJobAppService var first = job.Details.FirstOrDefault(); var request = new AgvRequest(); request.MatCode = first.ItemCode; - request.MatQty = first.HandledToQty; + request.MatQty = first.HandledFromQty; request.OrderNum = job.Number; request.OrderType = ((int)EnumJobType.CoatingIssueJob).ToString(); request.BeginPosition = beginPosition; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs index 8091350c4..11ea3da06 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs @@ -1168,7 +1168,7 @@ public class KittingIssueJobAppService var first = job.Details.FirstOrDefault(); var request = new AgvRequest(); request.MatCode = first.ItemCode; - request.MatQty = first.HandledToQty; + request.MatQty = first.HandledFromQty; request.OrderNum = job.Number; request.State = "0"; request.PakingCode = !string.IsNullOrEmpty(first.HandledFromPackingCode)?first.HandledFromPackingCode:string.Empty; From 93f657b783a7fc558290e696befb3f0bbffdf2d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Fri, 3 Jan 2025 09:05:50 +0800 Subject: [PATCH 3/4] =?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 --- .../IntegrationPackingNoteAppService.cs | 17 +++++++++-------- .../TransferNotes/TransferNoteAppService.cs | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/OperationPacking/IntegrationPackingNotes/IntegrationPackingNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/OperationPacking/IntegrationPackingNotes/IntegrationPackingNoteAppService.cs index 128825d74..2fa8df011 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/OperationPacking/IntegrationPackingNotes/IntegrationPackingNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/OperationPacking/IntegrationPackingNotes/IntegrationPackingNoteAppService.cs @@ -67,7 +67,7 @@ public class IntegrationPackingNoteAppService : public override async Task CreateAsync(IntegrationPackingNoteEditInput input) { var transferLogEditInputs = new List(); - var outDtos=await _expectOutAppService.GetListByPackingCodeAsync(input.PackingCode).ConfigureAwait(false); + var outDtos = await _expectOutAppService.GetListByPackingCodeAsync(input.PackingCode).ConfigureAwait(false); if (outDtos.Any()) { throw new UserFriendlyException($"此物料已经被【任务编号:{outDtos.First().JobNumber}】占用"); @@ -80,7 +80,8 @@ public class IntegrationPackingNoteAppService : var splitPackingRecDto = splitPackingRecDtos.First(); var inventoryLabelWithoutCodeCreateInput = new InventoryLabelWithoutCodeCreateInput { - Qty = detailInput.Qty, ItemCode = detailInput.ItemCode, + Qty = detailInput.Qty, + ItemCode = detailInput.ItemCode, SupplierCode = detailInput.SupplierCode, Lot = detailInput.Lot, Uom = detailInput.Uom, @@ -114,7 +115,7 @@ public class IntegrationPackingNoteAppService : SupplierSimpleName = detailInput.SupplierSimpleName, Team = string.Empty, }; - var inventoryLabelDto=await _inventoryLabelAppService.GenerateAndCreateAsync(inventoryLabelWithoutCodeCreateInput).ConfigureAwait(false); + var inventoryLabelDto = await _inventoryLabelAppService.GenerateAndCreateAsync(inventoryLabelWithoutCodeCreateInput).ConfigureAwait(false); var splitPackingRecEditInputs = new List() { new SplitPackingRecEditInput() @@ -162,14 +163,14 @@ public class IntegrationPackingNoteAppService : await _splitPackingRecAppService.BatchInsertAsync(splitPackingRecEditInputs).ConfigureAwait(false); //创建标签 - var dto= await base.CreateAsync(input).ConfigureAwait(false); + var dto = await base.CreateAsync(input).ConfigureAwait(false); //库存移动 - var transferLogEditInput=await BuildTransferLogsAsync(dto, detailInput, splitPackingRecEditInputs.First()).ConfigureAwait(false); + var transferLogEditInput = await BuildTransferLogsAsync(dto, detailInput, splitPackingRecEditInputs.First()).ConfigureAwait(false); transferLogEditInputs.Add(transferLogEditInput); } - - await _transferLogAppService.AddManyAsync(transferLogEditInputs).ConfigureAwait(false); + throw new UserFriendlyException("123123"); + // await _transferLogAppService.AddManyAsync(transferLogEditInputs).ConfigureAwait(false); } /// @@ -231,6 +232,6 @@ public class IntegrationPackingNoteAppService : private async Task CreateLabelAsync() { - var batchInsert=await _splitPackingRecAppService.BatchInsertAsync().ConfigureAwait(false); + //var batchInsert=await _splitPackingRecAppService.BatchInsertAsync().ConfigureAwait(false); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs index b37115ca0..4b69e0b91 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs @@ -715,7 +715,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase { errors.Add($"结束点{detail.EndPosition}库位没查到"); } - var productionline=await _productionLineAppService.GetByCodeAsync(tolocation.Code).ConfigureAwait(false); + var productionline=await _productionLineAppService.GetByLocationCodeAsync(tolocation.Code).ConfigureAwait(false); if (productionline == null) { errors.Add($"结束点{detail.EndPosition}库位不在生产线中!"); From 7c78757f65d3e961e009b128f869f5e4bc0248f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Fri, 3 Jan 2025 10:36:03 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BC=96=E7=A0=81?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=BC=96=E7=A0=81=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomerProductionReturnNoteAppService.cs | 30 ++++++++----------- 1 file changed, 12 insertions(+), 18 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 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