From 153e8bda1916d44c394b96fa14c4a6af2b34bb93 Mon Sep 17 00:00:00 2001 From: zhaoxinyu <89237069@qq.com> Date: Sat, 11 May 2024 10:20:32 +0800 Subject: [PATCH 1/8] =?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 --- .../KittingIssueJobAppService.cs | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) 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 c8b277e16..7fa38ce32 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 @@ -285,6 +285,12 @@ public class KittingIssueJobAppService { input.JobStatus = EnumJobStatus.Wait; + + + + + + //todo 调用立库接口 } } @@ -327,8 +333,8 @@ public class KittingIssueJobAppService - [HttpPost("sync-issue-job-stereo")] - public virtual async Task SyncCoatingJobStereoAsync(List input) + //[HttpPost("sync-issue-job-stereo")] + private async Task SyncCoatingJobStereoAsync(List input,string p_loc) { ReusltObject ret = new ReusltObject(); @@ -337,7 +343,6 @@ public class KittingIssueJobAppService ret.OperateTime = DateTime.Now.ToString("yyyy-MM-dd"); try { - List IssueJobToRestoDetailDTOs = new List(); IssueJobToRestoDTO main = new IssueJobToRestoDTO(); main.OperatorName = CurrentUser.UserName; @@ -357,17 +362,20 @@ public class KittingIssueJobAppService } main.Details = IssueJobToRestoDetailDTOs; + +#if DEBUG + string json= System.Text.Json.JsonSerializer.Serialize(main); +#endif + #region IssueJobToRestoClient client = new IssueJobToRestoClient(_options.Value.Address, _httpClientFactory.CreateClient()); ret = await client.SyncCoatingJobStereoAsync(main).ConfigureAwait(false); } catch(Exception ex) { - ret = new ReusltObject(); - ret.Code = "1"; + ret.Code = "2"; ret.Message=ex.Message; ret.OperateTime = DateTime.Now.ToString("yyyy-MM-dd"); - } #endregion return ret; @@ -380,6 +388,10 @@ public class KittingIssueJobAppService [HttpPost("receive-issue-job-stereo")] public virtual async Task SyncReciveCoatingJobStereoAsync(IssueRequestFromRestoDTO input) { + +#if DEBUG + var json= System.Text.Json.JsonSerializer.Serialize(input); +#endif List errors = new List(); var ret = new ReusltObject() { @@ -449,11 +461,5 @@ public class KittingIssueJobAppService } return ret; } - - - - - - #endregion } From a411ca886bd2c95ff661929cdea49715a5a219bd Mon Sep 17 00:00:00 2001 From: zhaoxinyu <89237069@qq.com> Date: Sat, 11 May 2024 10:23:12 +0800 Subject: [PATCH 2/8] =?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 --- .../IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 920a737e1..8dd067c13 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 @@ -373,7 +373,7 @@ public class KittingIssueJobAppService { Count = jobitem.HandledToQty, ProductNo = jobitem.ItemCode, - NeedSite = jobitem.HandledToLocationCode, + NeedSite = p_loc, WorkNo = job.Number, TaskNo = job.Number }); From 9f700b8e709d50215e8b5eb29337b58487132821 Mon Sep 17 00:00:00 2001 From: zhaoxinyu <89237069@qq.com> Date: Sat, 11 May 2024 10:28:14 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 8dd067c13..52973310b 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 @@ -311,6 +311,8 @@ public class KittingIssueJobAppService if (loctionDto.Type == EnumLocationType.DimensionalStorehouse) { //TODO 立体库 + await SyncCoatingJobStereoAsync(new List { kittingIssueJobDto }, loctionDto.Code).ConfigureAwait(false); + } } @@ -430,7 +432,7 @@ public class KittingIssueJobAppService if (input.Jobs.Count == entities.Count) { - errors.Add("出库任务和WMS出库任务不符,请核对! \n"); + errors.Add("提交出库任务和WMS出库任务不符,请核对! \n"); } var dtos = ObjectMapper.Map, List>(entities); foreach (var itm in dtos) @@ -467,7 +469,6 @@ public class KittingIssueJobAppService }; return ret; } - if (errors.Count > 0) { From ac36de8c42dc03e50eb66fd841e6aded056faebb Mon Sep 17 00:00:00 2001 From: zhaoxinyu <89237069@qq.com> Date: Sat, 11 May 2024 10:48:30 +0800 Subject: [PATCH 4/8] =?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 --- .../KittingIssueJobs/KittingIssueJobAppService.cs | 12 +++++++++--- .../Jobs/IssueJobs/proxy/IssueJobToRestoClient.cs | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) 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 52973310b..b8c79e41e 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 @@ -311,9 +311,14 @@ public class KittingIssueJobAppService if (loctionDto.Type == EnumLocationType.DimensionalStorehouse) { //TODO 立体库 - await SyncCoatingJobStereoAsync(new List { kittingIssueJobDto }, loctionDto.Code).ConfigureAwait(false); - + var ret = await SyncCoatingJobStereoAsync(new List { kittingIssueJobDto }, loctionDto.Code).ConfigureAwait(false); + if (ret.Code != "1") + { + throw new UserFriendlyException($"调用立体库不成功!原因:{ret.Message}"); + } } + + } /// @@ -354,7 +359,7 @@ public class KittingIssueJobAppService - //[HttpPost("sync-issue-job-stereo")] + private async Task SyncCoatingJobStereoAsync(List input,string p_loc) { @@ -386,6 +391,7 @@ public class KittingIssueJobAppService #if DEBUG string json= System.Text.Json.JsonSerializer.Serialize(main); + _options.Value.Address = "http://localhost:59094/CargoState/SyncCoatingJobStereo";//测试地址 #endif #region diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/proxy/IssueJobToRestoClient.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/proxy/IssueJobToRestoClient.cs index 83c608632..0cbd5776c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/proxy/IssueJobToRestoClient.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/proxy/IssueJobToRestoClient.cs @@ -94,7 +94,7 @@ namespace MyNamespace var urlBuilder_ = new System.Text.StringBuilder(); if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); // Operation Path: "CargoState/SyncCoatingJobStereo" - urlBuilder_.Append("CargoState/SyncCoatingJobStereo"); + urlBuilder_.Append("CargoState/SyncCoatingJobStereo");//修改路由 PrepareRequest(client_, request_, urlBuilder_); From b26b4a08bf3da66402438e583bc24d159f14c47b Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Sat, 11 May 2024 11:01:58 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E6=88=90=E5=93=81=E5=8F=91=E8=BF=90?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Incoming/MesIncomingBackgroundWorker.cs | 90 +++++++++---------- .../DeliverRequestFisAppService.cs | 11 ++- .../DeliverRequests/DeliverRequestManager.cs | 2 + 3 files changed, 56 insertions(+), 47 deletions(-) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesIncomingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesIncomingBackgroundWorker.cs index 950c015b9..667047a14 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesIncomingBackgroundWorker.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesIncomingBackgroundWorker.cs @@ -45,20 +45,20 @@ public class MesIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase return; } - Logger.LogInformation($"Read MesOut");//缴库 - var mesOutReader = workerContext.ServiceProvider.GetRequiredService(); - var mesOutConverter = workerContext.ServiceProvider.GetRequiredService(); - var TransferNoteConverter = workerContext.ServiceProvider.GetRequiredService(); - //读取mes缴库 - var mesOutsFromExternalList = await mesOutReader.ReadAsync().ConfigureAwait(false); - var mesOutsFromExternalList_ProductReceipt = mesOutsFromExternalList.Where(r => r.DataType == EnumIncomingDataType.ProductReceipt.ToString()).ToList(); - var mesOutsFromExternalList_TransferNote = mesOutsFromExternalList.Where(r => r.DataType == EnumIncomingDataType.TransferNote.ToString()).ToList(); - //转换缴库数据(如果有质量补得数据直接生产移库数据移到客户库位) - await mesOutConverter.ConvertAsync(mesOutsFromExternalList_ProductReceipt).ConfigureAwait(false); - if (mesOutsFromExternalList_TransferNote.Count > 0)//如果有质量补则生产储位调拨任务 - { - await TransferNoteConverter.ConvertAsync(mesOutsFromExternalList_TransferNote).ConfigureAwait(false); - } + //Logger.LogInformation($"Read MesOut");//缴库 + //var mesOutReader = workerContext.ServiceProvider.GetRequiredService(); + //var mesOutConverter = workerContext.ServiceProvider.GetRequiredService(); + //var TransferNoteConverter = workerContext.ServiceProvider.GetRequiredService(); + ////读取mes缴库 + //var mesOutsFromExternalList = await mesOutReader.ReadAsync().ConfigureAwait(false); + //var mesOutsFromExternalList_ProductReceipt = mesOutsFromExternalList.Where(r => r.DataType == EnumIncomingDataType.ProductReceipt.ToString()).ToList(); + //var mesOutsFromExternalList_TransferNote = mesOutsFromExternalList.Where(r => r.DataType == EnumIncomingDataType.TransferNote.ToString()).ToList(); + ////转换缴库数据(如果有质量补得数据直接生产移库数据移到客户库位) + //await mesOutConverter.ConvertAsync(mesOutsFromExternalList_ProductReceipt).ConfigureAwait(false); + //if (mesOutsFromExternalList_TransferNote.Count > 0)//如果有质量补则生产储位调拨任务 + //{ + // await TransferNoteConverter.ConvertAsync(mesOutsFromExternalList_TransferNote).ConfigureAwait(false); + //} //上海和安徽无此接口 @@ -69,14 +69,14 @@ public class MesIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase //var pullTaskFromExternalList = await pullTaskReader.ReadAsync().ConfigureAwait(false); ////转换PullTask //await pullTaskConverter.ConvertAsync(pullTaskFromExternalList).ConfigureAwait(false); - Logger.LogInformation($"Read Scrap");//报废 + //Logger.LogInformation($"Read Scrap");//报废 - var scrapReader = workerContext.ServiceProvider.GetRequiredService(); - var scrapConverter = workerContext.ServiceProvider.GetRequiredService(); - //读取并保存Scrap - var scrapsFromExternalList = await scrapReader.ReadAsync().ConfigureAwait(false); - //转换Scrap - await scrapConverter.ConvertAsync(scrapsFromExternalList).ConfigureAwait(false); + //var scrapReader = workerContext.ServiceProvider.GetRequiredService(); + //var scrapConverter = workerContext.ServiceProvider.GetRequiredService(); + ////读取并保存Scrap + //var scrapsFromExternalList = await scrapReader.ReadAsync().ConfigureAwait(false); + ////转换Scrap + //await scrapConverter.ConvertAsync(scrapsFromExternalList).ConfigureAwait(false); //上海和安徽无此接口 //Logger.LogInformation($"Read Issue"); @@ -87,30 +87,30 @@ public class MesIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase ////转换Pck //await pckConverter.ConvertAsync(pcksFromExternalList).ConfigureAwait(false); - Logger.LogInformation($"Read BackFlush");//耗用单 - var BackFlushReader = workerContext.ServiceProvider.GetRequiredService(); - var BackFlushConverter = workerContext.ServiceProvider.GetRequiredService(); - //读取并保存BackFlush - var backFlushsFromExternalList = await BackFlushReader.ReadAsync().ConfigureAwait(false); - //转换BackFlush - await BackFlushConverter.ConvertAsync(backFlushsFromExternalList).ConfigureAwait(false); - - - Logger.LogInformation($"Read TransferNote");//储位调拨 - var TransferNoteReader = workerContext.ServiceProvider.GetRequiredService(); - // var TransferNoteConverter = workerContext.ServiceProvider.GetRequiredService(); - //读取并保存TransferNote - var transferNoteFromExternalList = await TransferNoteReader.ReadAsync().ConfigureAwait(false); - //转换TransferNote - await TransferNoteConverter.ConvertAsync(transferNoteFromExternalList).ConfigureAwait(false); - - Logger.LogInformation($"Read Frozen");//冻结解冻 - var FrozenReader = workerContext.ServiceProvider.GetRequiredService(); - var FrozenConverter = workerContext.ServiceProvider.GetRequiredService(); - //读取并保存Frozen - var mesNoteFromExternalList = await FrozenReader.ReadAsync().ConfigureAwait(false); - //转换Frozen - await FrozenConverter.ConvertAsync(mesNoteFromExternalList).ConfigureAwait(false); + //Logger.LogInformation($"Read BackFlush");//耗用单 + //var BackFlushReader = workerContext.ServiceProvider.GetRequiredService(); + //var BackFlushConverter = workerContext.ServiceProvider.GetRequiredService(); + ////读取并保存BackFlush + //var backFlushsFromExternalList = await BackFlushReader.ReadAsync().ConfigureAwait(false); + ////转换BackFlush + //await BackFlushConverter.ConvertAsync(backFlushsFromExternalList).ConfigureAwait(false); + + + //Logger.LogInformation($"Read TransferNote");//储位调拨 + //var TransferNoteReader = workerContext.ServiceProvider.GetRequiredService(); + //// var TransferNoteConverter = workerContext.ServiceProvider.GetRequiredService(); + ////读取并保存TransferNote + //var transferNoteFromExternalList = await TransferNoteReader.ReadAsync().ConfigureAwait(false); + ////转换TransferNote + //await TransferNoteConverter.ConvertAsync(transferNoteFromExternalList).ConfigureAwait(false); + + //Logger.LogInformation($"Read Frozen");//冻结解冻 + //var FrozenReader = workerContext.ServiceProvider.GetRequiredService(); + //var FrozenConverter = workerContext.ServiceProvider.GetRequiredService(); + ////读取并保存Frozen + //var mesNoteFromExternalList = await FrozenReader.ReadAsync().ConfigureAwait(false); + ////转换Frozen + //await FrozenConverter.ConvertAsync(mesNoteFromExternalList).ConfigureAwait(false); Logger.LogInformation($"Read Delivery");//成品发运 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 2c872d3b5..015dd3cf7 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 @@ -163,7 +163,13 @@ public class DeliverRequestFisAppService : #endregion #endregion - + /// + /// 获取看板件待审核状态的数据 + /// + /// + /// + /// + /// [HttpPost("list")] public override Task> GetPagedListByFilterAsync( SfsStoreRequestInputBase sfsRequestInput, @@ -172,7 +178,8 @@ public class DeliverRequestFisAppService : { sfsRequestInput.Condition.Filters.Add( new Filter(nameof(DeliverRequest.DeliverRequestType), "Normal")); - + sfsRequestInput.Condition.Filters.Add( + new Filter(nameof(DeliverRequest.RequestStatus), "Reviewing")); return base.GetPagedListByFilterAsync(sfsRequestInput, includeDetails, cancellationToken); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequestManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequestManager.cs index 0457301bd..fbd2866f7 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequestManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequestManager.cs @@ -83,6 +83,8 @@ public class DeliverRequestManager : SfsStoreRequestManagerBase Date: Sat, 11 May 2024 11:15:03 +0800 Subject: [PATCH 6/8] =?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 --- .../test/TestAppService.cs | 10 +- .../DTOs/CoatingIssueJobDTO.cs | 95 ------------------- .../CoatingIssueJobAppService.cs | 3 +- .../KittingIssueJobAppService.cs | 43 +++++++-- .../IssueJobs/proxy/IssueJobToRestoClient.cs | 11 ++- 5 files changed, 49 insertions(+), 113 deletions(-) diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/test/TestAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/test/TestAppService.cs index d22d04418..817019c53 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/test/TestAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/test/TestAppService.cs @@ -66,9 +66,9 @@ public class TestService:ApplicationService // return result; //} - [HttpPost("SyncCoatingJobStereo")] + [HttpPost("SyncIssueJobStereo")] - public virtual async Task SyncCoatingJobStereoAsync(CoatingIssueJobToRestoDTO input) + public virtual async Task SyncIssueJobStereoAsync(IssueJobToRestoDTO input) { ReusltObject reuslt=new ReusltObject(); @@ -97,7 +97,7 @@ public class TestService:ApplicationService /// /// 发给立体库主表 /// -public class CoatingIssueJobToRestoDetailDTO +public class IssueJobToRestoDetailDTO { public string WorkNo { set; get; } public string TaskNo { set; get; } @@ -108,11 +108,11 @@ public class CoatingIssueJobToRestoDetailDTO /// /// 发给立体库子表 /// -public class CoatingIssueJobToRestoDTO +public class IssueJobToRestoDTO { public Guid UUID { set; get; } public string OperatorName { set; get; } - public List Details { set; get; } + public List Details { set; get; } } /// /// 返回结果 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/DTOs/CoatingIssueJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/DTOs/CoatingIssueJobDTO.cs index 897b00440..09951837e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/DTOs/CoatingIssueJobDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/DTOs/CoatingIssueJobDTO.cs @@ -39,101 +39,6 @@ public class CoatingIssueJobDTO : SfsJobDTOBase public bool UseOnTheWayLocation { get; set; } } -/// -/// 喷涂主表 -/// -public class IssueRequestFromRestoDTO -{ - public string RequestNumber { set; get; } - public List Jobs { set; get; } -} -/// -/// 立体库发给WMS明细 -/// -public class IssueJobFromRestoDetailDTO -{ - [Display(Name = "零件编号")] - public string ItemCode { set; get; } - [Display(Name = "目标库位")] - public string ToLocationCode { set; get; } - [Display(Name = "来源库位")] - public string FromLocationCode { set; get; } - [Display(Name = "数量")] - public decimal Qty { set; get; } -} -/// -/// 立体库发给立体库任务单号 -/// -public class IssueJobFromRestoDTO -{ - [Display(Name = "任务单号")] - public string JobNumber { set; get; } - [Display(Name = "明细")] - public List Details { set; get; } -} -/// -/// 发给立体库主表 -/// -/// -/// 发给立体库子表 -/// -[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] -public partial class IssueJobToRestoDTO -{ - - [System.Text.Json.Serialization.JsonPropertyName("uuid")] - public System.Guid Uuid { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("operatorName")] - public string OperatorName { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("details")] - public System.Collections.Generic.ICollection Details { get; set; } - -} - -/// -/// 发给立体库主表 -/// -[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] -public partial class IssueJobToRestoDetailDTO -{ - - [System.Text.Json.Serialization.JsonPropertyName("workNo")] - public string WorkNo { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("taskNo")] - public string TaskNo { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("needSite")] - public string NeedSite { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("productNo")] - public string ProductNo { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("count")] - public decimal Count { get; set; } - -} - -/// -/// 返回结果 -/// -[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] -public partial class ReusltObject -{ - - [System.Text.Json.Serialization.JsonPropertyName("code")] - public string Code { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("message")] - public string Message { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("operateTime")] - public string OperateTime { get; set; } - -} - 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 08dfd7179..dd4d17441 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 @@ -25,6 +25,7 @@ using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain.Shared; using Win_in.Sfs.Wms.Store.Jobs.IssueJobs; +using Win_in.Sfs.Wms.Store.Jobs.IssueJobs.proxy; using Win_in.Sfs.Wms.Store.Notes; using Win_in.Sfs.Wms.Store.Options; @@ -233,7 +234,7 @@ public class CoatingIssueJobAppService #region IssueJobToRestoClient client = new IssueJobToRestoClient(_options.Value.Address, _httpClientFactory.CreateClient()); - ret = await client.SyncCoatingJobStereoAsync(main).ConfigureAwait(false); + ret = await client.SyncIssueJobStereoAsync(main).ConfigureAwait(false); #endregion return ret; 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 b8c79e41e..c576fae0a 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 @@ -18,6 +18,7 @@ using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain.Shared; using Win_in.Sfs.Wms.Store.Jobs.IssueJobs; +using Win_in.Sfs.Wms.Store.Jobs.IssueJobs.proxy; using Win_in.Sfs.Wms.Store.Notes; using Win_in.Sfs.Wms.Store.Options; using static IdentityModel.ClaimComparer; @@ -360,7 +361,7 @@ public class KittingIssueJobAppService - private async Task SyncCoatingJobStereoAsync(List input,string p_loc) + private async Task SyncIssueJobStereoAsync(List input,string p_loc) { ReusltObject ret = new ReusltObject(); @@ -396,7 +397,7 @@ public class KittingIssueJobAppService #region IssueJobToRestoClient client = new IssueJobToRestoClient(_options.Value.Address, _httpClientFactory.CreateClient()); - ret = await client.SyncCoatingJobStereoAsync(main).ConfigureAwait(false); + ret = await client.SyncIssueJobStereoAsync(main).ConfigureAwait(false); } catch(Exception ex) { ret = new ReusltObject(); @@ -413,7 +414,7 @@ public class KittingIssueJobAppService [HttpPost("receive-issue-job-stereo")] - public virtual async Task SyncReciveCoatingJobStereoAsync(IssueRequestFromRestoDTO input) + public virtual async Task SyncReciveIssueJobStereoAsync(IssueRequestFromRestoDTO input) { #if DEBUG @@ -428,22 +429,50 @@ public class KittingIssueJobAppService }; try { + if (input.Jobs.Count > 0) { - var inputs = input.Jobs; - var numbers = inputs.Select(p => p.JobNumber); + var jobs = input.Jobs; + var numbers = jobs.Select(p => p.JobNumber); var query = _repository.WithDetails() .Where(p => numbers.Contains(p.Number)); var entities = query.ToList(); + var dtos = ObjectMapper.Map, List>(entities); + + if (input.Jobs.Count == entities.Count) { errors.Add("提交出库任务和WMS出库任务不符,请核对! \n"); } - var dtos = ObjectMapper.Map, List>(entities); + List inputDetails = new List(); + foreach (var itm in input.Jobs) + { + foreach (var inputjob in itm.Details) + { + + } + + } + + + List existDetails = new List(); foreach (var itm in dtos) { - var first = inputs.FirstOrDefault(p => p.JobNumber == itm.Number); + + foreach (var inputjob in itm.Details) + { + + } + + } + + + + foreach (var itm in dtos) + { + var first = jobs.FirstOrDefault(p => p.JobNumber == itm.Number); + var itmDetails= itm.Details.ToList(); List details = new List(); foreach (var detail in first.Details) { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/proxy/IssueJobToRestoClient.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/proxy/IssueJobToRestoClient.cs index 0cbd5776c..094f914e8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/proxy/IssueJobToRestoClient.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/proxy/IssueJobToRestoClient.cs @@ -20,6 +20,7 @@ namespace MyNamespace { using Win_in.Sfs.Wms.Store.Jobs.IssueJobs; + using Win_in.Sfs.Wms.Store.Jobs.IssueJobs.proxy; using System = global::System; [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] @@ -68,15 +69,15 @@ namespace MyNamespace /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task SyncCoatingJobStereoAsync(IssueJobToRestoDTO body) + public virtual System.Threading.Tasks.Task SyncIssueJobStereoAsync(IssueJobToRestoDTO body) { - return SyncCoatingJobStereoAsync(body, System.Threading.CancellationToken.None); + return SyncIssueJobStereoAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task SyncCoatingJobStereoAsync(IssueJobToRestoDTO body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SyncIssueJobStereoAsync(IssueJobToRestoDTO body, System.Threading.CancellationToken cancellationToken) { var client_ = _httpClient; var disposeClient_ = false; @@ -93,8 +94,8 @@ namespace MyNamespace var urlBuilder_ = new System.Text.StringBuilder(); if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "CargoState/SyncCoatingJobStereo" - urlBuilder_.Append("CargoState/SyncCoatingJobStereo");//修改路由 + // Operation Path: "CargoState/SyncIssueJobStereo" + urlBuilder_.Append("CargoState/SyncIssueJobStereo");//修改路由 PrepareRequest(client_, request_, urlBuilder_); From a5a2b974fafa3facc24893d0c5bfb15f9c562ebe Mon Sep 17 00:00:00 2001 From: zhaoxinyu <89237069@qq.com> Date: Sat, 11 May 2024 11:28:34 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../KittingIssueJobAppService.cs | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) 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 c576fae0a..95417e852 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 @@ -312,7 +312,7 @@ public class KittingIssueJobAppService if (loctionDto.Type == EnumLocationType.DimensionalStorehouse) { //TODO 立体库 - var ret = await SyncCoatingJobStereoAsync(new List { kittingIssueJobDto }, loctionDto.Code).ConfigureAwait(false); + var ret = await SyncIssueJobStereoAsync(new List { kittingIssueJobDto }, loctionDto.Code).ConfigureAwait(false); if (ret.Code != "1") { throw new UserFriendlyException($"调用立体库不成功!原因:{ret.Message}"); @@ -445,31 +445,11 @@ public class KittingIssueJobAppService { errors.Add("提交出库任务和WMS出库任务不符,请核对! \n"); } - List inputDetails = new List(); - foreach (var itm in input.Jobs) - { - foreach (var inputjob in itm.Details) - { - - } + - } - List existDetails = new List(); foreach (var itm in dtos) - { - - foreach (var inputjob in itm.Details) - { - - } - - } - - - - foreach (var itm in dtos) { var first = jobs.FirstOrDefault(p => p.JobNumber == itm.Number); var itmDetails= itm.Details.ToList(); From f0985d7ab33fd013e220cf5db6b74dd667512805 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Sat, 11 May 2024 11:35:59 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E9=9D=9E=E7=94=9F=E4=BA=A7=E9=A2=86?= =?UTF-8?q?=E6=96=99=E9=80=80=E6=96=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Requests/UnplannedIssueRequestEventHandler.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/UnplannedIssueRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/UnplannedIssueRequestEventHandler.cs index 545e6961f..6f9c964f1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/UnplannedIssueRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/UnplannedIssueRequestEventHandler.cs @@ -82,10 +82,10 @@ public class UnplannedIssueRequestEventHandler public virtual async Task HandleEventAsync(SfsHandledEntityEventData eventData) { var entity = eventData.Entity; - if (entity.UnplannedIssueType == Shared.Domain.Shared.Enums.Store.EnumUnplannedIssueType.Wip&&!string.IsNullOrEmpty(entity.OANumber)) - { - entity.RequestStatus = EnumRequestStatus.Completed; - } + //if (entity.UnplannedIssueType == Shared.Domain.Shared.Enums.Store.EnumUnplannedIssueType.Wip&&!string.IsNullOrEmpty(entity.OANumber)) + //{ + // entity.RequestStatus = EnumRequestStatus.Completed; + //} if (entity.DirectCreateNote) { var note = await BuildUnplannedIssueNoteCreateInputAsync(entity).ConfigureAwait(false);