From d937a26cbdba38701a1037fa4b8936f1c214683a Mon Sep 17 00:00:00 2001 From: zhaoxinyu <89237069@qq.com> Date: Sat, 11 May 2024 11:53:51 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CoatingIssueJobAppService.cs | 223 +++++++++--------- .../KittingIssueJobAppService.cs | 14 +- 2 files changed, 119 insertions(+), 118 deletions(-) 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 dd4d17441..f3bef2def 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 @@ -204,116 +204,121 @@ public class CoatingIssueJobAppService } - [HttpPost("sync-issue-job-stereo")] - public virtual async Task SyncCoatingJobStereoAsync(List input) - { - - ReusltObject ret=new ReusltObject(); - ret.Code = "1"; - ret.Message = "操作成功"; - ret.OperateTime = DateTime.Now.ToString("yyyy-MM-dd"); - - List IssueJobToRestoDetailDTOs = new List(); - IssueJobToRestoDTO main=new IssueJobToRestoDTO(); - main.OperatorName=CurrentUser.UserName; - foreach (var job in input) - { - foreach (var jobitem in job.Details) - { - IssueJobToRestoDetailDTOs.Add(new IssueJobToRestoDetailDTO() - { - Count=jobitem.HandledToQty, - ProductNo=jobitem.ItemCode, - NeedSite=jobitem.HandledToLocationCode, - WorkNo=job.Number, - TaskNo=job.Number - }); - } - } - main.Details=IssueJobToRestoDetailDTOs; - - #region - IssueJobToRestoClient client = new IssueJobToRestoClient(_options.Value.Address, _httpClientFactory.CreateClient()); - ret = await client.SyncIssueJobStereoAsync(main).ConfigureAwait(false); - #endregion - return ret; - - } - - - - - [HttpPost("receive-issue-job-stereo")] - public virtual async Task SyncReciveCoatingJobStereoAsync(IssueRequestFromRestoDTO input) - { - List errors = new List(); - var ret=new ReusltObject() - { - Code = "1", - OperateTime = DateTime.Now.ToString("yyyy-MM-dd"), - Message = "操作成功" - }; - try - { - if (input.Jobs.Count > 0) - { - var inputs = input.Jobs; - var numbers = inputs.Select(p => p.JobNumber); - var query = _repository.WithDetails() - .Where(p => numbers.Contains(p.Number)); - var entities = query.ToList(); - - if (input.Jobs.Count == entities.Count) { - errors.Add("出库任务和WMS出库任务不符,请核对! \n"); - } - var dtos = ObjectMapper.Map, List>(entities); - foreach (var itm in dtos) - { - var first = inputs.FirstOrDefault(p => p.JobNumber == itm.Number); - List details = new List(); - foreach (var detail in first.Details) - { - CoatingIssueJobDetailDTO dto = new CoatingIssueJobDetailDTO(); - dto.HandledFromLocationCode = detail.FromLocationCode; - dto.HandledToLocationCode = detail.ToLocationCode; - dto.ItemCode = detail.ItemCode; - dto.RecommendFromQty = detail.Qty; - dto.RecommendToQty = detail.Qty; - dto.HandledFromQty = detail.Qty; - dto.HandledToQty = detail.Qty; - details.Add(dto); - } - itm.Details = details; - } - } - else - { - errors.Add("立体库确认单据里无数据! \n"); - } - } - catch (Exception ex) - { - ret=new ReusltObject() - { - Code = "2", - OperateTime = DateTime.Now.ToString("yyyy-MM-dd"), - Message = ex.Message - }; - return ret; - } - - if (errors.Count > 0) - { + //[HttpPost("sync-issue-job-stereo")] + //public virtual async Task SyncCoatingJobStereoAsync(List input) + //{ + + // ReusltObject ret=new ReusltObject(); + // ret.Code = "1"; + // ret.Message = "操作成功"; + // ret.OperateTime = DateTime.Now.ToString("yyyy-MM-dd"); + + // List IssueJobToRestoDetailDTOs = new List(); + // IssueJobToRestoDTO main=new IssueJobToRestoDTO(); + // main.OperatorName=CurrentUser.UserName; + // foreach (var job in input) + // { + // foreach (var jobitem in job.Details) + // { + // IssueJobToRestoDetailDTOs.Add(new IssueJobToRestoDetailDTO() + // { + // Count=jobitem.HandledToQty, + // ProductNo=jobitem.ItemCode, + // NeedSite=jobitem.HandledToLocationCode, + // WorkNo=job.Number, + // TaskNo=job.Number + // }); + // } + // } + // main.Details=IssueJobToRestoDetailDTOs; + + // #region + // IssueJobToRestoClient client = new IssueJobToRestoClient(_options.Value.Address, _httpClientFactory.CreateClient()); + // ret = await client.SyncIssueJobStereoAsync(main).ConfigureAwait(false); + // #endregion + // return ret; + + //} + + + + + //[HttpPost("receive-issue-job-stereo")] + //public virtual async Task SyncReciveCoatingJobStereoAsync(IssueRequestFromRestoDTO input) + //{ + // List errors = new List(); + // var ret=new ReusltObject() + // { + // Code = "1", + // OperateTime = DateTime.Now.ToString("yyyy-MM-dd"), + // Message = "操作成功" + // }; + // try + // { + // if (input.Jobs.Count > 0) + // { + // var inputs = input.Jobs; + // var numbers = inputs.Select(p => p.JobNumber); + // var query = _repository.WithDetails() + // .Where(p => numbers.Contains(p.Number)); + // var entities = query.ToList(); + + // if (input.Jobs.Count == entities.Count) { + // errors.Add("出库任务和WMS出库任务不符,请核对! \n"); + // } + // var dtos = ObjectMapper.Map, List>(entities); + // foreach (var itm in dtos) + // { + // var first = inputs.FirstOrDefault(p => p.JobNumber == itm.Number); + + // var itmDetails = itm.Details; + // List details = new List(); + // foreach (var detail in first.Details) + // { + // var entity=itmDetails.FirstOrDefault(p => p.ItemCode == detail.ItemCode); + // CoatingIssueJobDetailDTO dto = new CoatingIssueJobDetailDTO(); + // dto.HandledFromLocationCode = entity.HandledFromContainerCode; + // dto.HandledToLocationCode = entity.HandledToLocationCode; + // dto.ItemCode = detail.ItemCode; + // dto.RecommendFromQty = detail.Qty; + // dto.RecommendToQty = detail.Qty; + // dto.HandledFromQty = detail.Qty; + // dto.HandledToQty = detail.Qty; + // details.Add(dto); + // } + // itm.Details = details; + // await CompleteAsync(itm.Id, itm).ConfigureAwait(false); + // } + + // } + // else + // { + // errors.Add("立体库确认单据里无数据! \n"); + // } + // } + // catch (Exception ex) + // { + // ret=new ReusltObject() + // { + // Code = "2", + // OperateTime = DateTime.Now.ToString("yyyy-MM-dd"), + // Message = ex.Message + // }; + // return ret; + // } + + // if (errors.Count > 0) + // { - ret= new ReusltObject() - { - Code = "2", - OperateTime = DateTime.Now.ToString("yyyy-MM-dd"), - Message = string.Join(",",errors.ToArray()) - }; - } - return ret; - } + // ret= new ReusltObject() + // { + // Code = "2", + // OperateTime = DateTime.Now.ToString("yyyy-MM-dd"), + // Message = string.Join(",",errors.ToArray()) + // }; + // } + // 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 95417e852..0c8a5f2fe 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 @@ -437,18 +437,11 @@ public class KittingIssueJobAppService 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"); } - - - - foreach (var itm in dtos) { var first = jobs.FirstOrDefault(p => p.JobNumber == itm.Number); @@ -456,17 +449,20 @@ public class KittingIssueJobAppService List details = new List(); foreach (var detail in first.Details) { + var entity = itmDetails.FirstOrDefault(p => p.ItemCode == detail.ItemCode); KittingIssueJobDetailDTO dto = new KittingIssueJobDetailDTO(); - dto.HandledFromLocationCode = detail.FromLocationCode; - dto.HandledToLocationCode = detail.ToLocationCode; + dto.HandledFromLocationCode = entity.HandledFromLocationCode; + dto.HandledToLocationCode = entity.HandledToLocationCode; dto.ItemCode = detail.ItemCode; dto.RecommendFromQty = detail.Qty; dto.RecommendToQty = detail.Qty; dto.HandledFromQty = detail.Qty; dto.HandledToQty = detail.Qty; + dto.Status =entity.Status; details.Add(dto); } itm.Details = details; + await CompleteAsync(itm.Id, itm).ConfigureAwait(false); } } else From 0e530f0301c301b579c4da5d155ccc9fe510593d Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Sat, 11 May 2024 13:51:59 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E9=9D=9E=E7=94=9F=E4=BA=A7=E9=A2=86?= =?UTF-8?q?=E6=96=99=E7=94=B3=E8=AF=B7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UnplannedIssueRequestForDongyangAppService.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedIssueRequests/UnplannedIssueRequestForDongyangAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedIssueRequests/UnplannedIssueRequestForDongyangAppService.cs index e31231106..5c3aeae2c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedIssueRequests/UnplannedIssueRequestForDongyangAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedIssueRequests/UnplannedIssueRequestForDongyangAppService.cs @@ -174,15 +174,6 @@ public class UnplannedIssueRequestForDongyangAppService : UnplannedIssueRequestA return newDetail; } - protected override UnplannedIssueRequest ModifyEntityBeforeAgree(UnplannedIssueRequest obj) - { - if (obj.UnplannedIssueType == EnumUnplannedIssueType.Wip) - { - obj.DirectCreateNote = true; //线边 直接生成记录 - } - return obj; - } - #region 赋值 /// From 0fcec36bafaa6a4f90c64fc3a1b2a30d4619055f Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Sat, 11 May 2024 13:53:09 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E9=9D=9E=E7=94=9F=E4=BA=A7=E9=80=80?= =?UTF-8?q?=E6=96=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UnplannedReceiptRequestForDongyangAppService.cs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestForDongyangAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestForDongyangAppService.cs index 6f4d40782..481bef702 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestForDongyangAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestForDongyangAppService.cs @@ -142,14 +142,6 @@ public class UnplannedReceiptRequestForDongyangAppService : UnplannedReceiptRequ return dictionary; } - protected override UnplannedReceiptRequest ModifyEntityBeforeAgree(UnplannedReceiptRequest obj) - { - if (obj.UnplannedReceiptType == EnumUnplannedReceiptType.Wip) - { - obj.DirectCreateNote = true; - } - return obj; - } #region 赋值 From 72bc9d490ec3ae0cb1522afc95163ed247ce9fba Mon Sep 17 00:00:00 2001 From: zhaoxinyu <89237069@qq.com> Date: Sat, 11 May 2024 14:06:36 +0800 Subject: [PATCH 4/5] =?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 | 2 +- .../KittingIssueJobAppService.cs | 44 +++++++++++++------ .../IssueJobs/proxy/IssueJobToRestoClient.cs | 2 +- 3 files changed, 33 insertions(+), 15 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 817019c53..11f7020c5 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 @@ -72,7 +72,7 @@ public class TestService:ApplicationService { ReusltObject reuslt=new ReusltObject(); - reuslt.Code = "0"; + reuslt.Code = "1"; reuslt.Message = "操作成功"; reuslt.OperateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); 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 0c8a5f2fe..d030f8a55 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 @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; +using System.Net.Http.Headers; using System.Threading.Tasks; using Castle.Components.DictionaryAdapter; using Microsoft.AspNetCore.Authorization; @@ -22,6 +23,7 @@ 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; +using static Volo.Abp.Identity.Settings.IdentitySettingNames; namespace Win_in.Sfs.Wms.Store.Application; @@ -358,10 +360,15 @@ public class KittingIssueJobAppService + /// + /// 立体库同步 + /// + /// + /// + /// + [HttpPost("sync-issue-job-stereo")] - - - private async Task SyncIssueJobStereoAsync(List input,string p_loc) + public async Task SyncIssueJobStereoAsync(List input,string p_loc) { ReusltObject ret = new ReusltObject(); @@ -388,15 +395,29 @@ public class KittingIssueJobAppService } } main.Details = IssueJobToRestoDetailDTOs; - - + var httpclient = _httpClientFactory.CreateClient(); #if DEBUG + string json= System.Text.Json.JsonSerializer.Serialize(main); - _options.Value.Address = "http://localhost:59094/CargoState/SyncCoatingJobStereo";//测试地址 + _options.Value.Address = "http://localhost:59094/";//测试地址 + _options.Value.Token = "";//测试token + _options.Value.UserName = "";//测试用户名 + _options.Value.Password = "";//测试密码 + #endif + if (!string.IsNullOrEmpty(_options.Value.Token)) + { + var token = _options.Value.Token; + httpclient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer",token ); + } + if (!string.IsNullOrEmpty(_options.Value.UserName) && !string.IsNullOrEmpty(_options.Value.Password)) + { + var username = _options.Value.UserName; + var password = _options.Value.Password; + httpclient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes($"{username}:{password}"))); + } - #region - IssueJobToRestoClient client = new IssueJobToRestoClient(_options.Value.Address, _httpClientFactory.CreateClient()); + IssueJobToRestoClient client = new IssueJobToRestoClient(_options.Value.Address, httpclient); ret = await client.SyncIssueJobStereoAsync(main).ConfigureAwait(false); } catch(Exception ex) { @@ -405,14 +426,11 @@ public class KittingIssueJobAppService ret.Message=ex.Message; ret.OperateTime = DateTime.Now.ToString("yyyy-MM-dd"); } - #endregion + return ret; } - - - [HttpPost("receive-issue-job-stereo")] public virtual async Task SyncReciveIssueJobStereoAsync(IssueRequestFromRestoDTO input) { @@ -440,7 +458,7 @@ public class KittingIssueJobAppService var dtos = ObjectMapper.Map, List>(entities); if (input.Jobs.Count == entities.Count) { - errors.Add("提交出库任务和WMS出库任务不符,请核对! \n"); + errors.Add("立体库提交出库任务和WMS任务不符,请核对! \n"); } foreach (var itm in dtos) { 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 094f914e8..034c0a0ae 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 @@ -95,7 +95,7 @@ namespace MyNamespace var urlBuilder_ = new System.Text.StringBuilder(); if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); // Operation Path: "CargoState/SyncIssueJobStereo" - urlBuilder_.Append("CargoState/SyncIssueJobStereo");//修改路由 + urlBuilder_.Append("CargoState/SyncIssueJobStereo");//修改路由按需求 PrepareRequest(client_, request_, urlBuilder_); From 97707171e60c5408200f7d50d1b9f61ca755c775 Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Sat, 11 May 2024 14:16:22 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=B8=89=E6=96=B9=E5=BA=93TYRP=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DTOs/ThirdLocationNoteDTO.cs | 1 + .../Inputs/ThirdLocationNoteEditInput.cs | 1 + .../Inputs/ThirdLocationNoteImportInput.cs | 1 + .../Notes/ThirdLocationNotes/ThirdLocationNote.cs | 1 + ...LocationNoteDbContextModelCreatingExtensions.cs | 2 +- .../Jobs/ThirdLocationJobAutoMapperProfile.cs | 6 +++--- .../Notes/ThirdLocationNoteAutoMapperProfile.cs | 14 ++++++++++++++ .../DataExchanges/ThirdLocationNoteEventHandler.cs | 2 +- 8 files changed, 23 insertions(+), 5 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/DTOs/ThirdLocationNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/DTOs/ThirdLocationNoteDTO.cs index ea67e0660..2c4ace218 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/DTOs/ThirdLocationNoteDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/DTOs/ThirdLocationNoteDTO.cs @@ -12,6 +12,7 @@ public class ThirdLocationNoteDTO : SfsStoreDTOBase, /// [Display(Name = "任务ID")] public string JobNumber { get; set; } + /// /// 车间 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteEditInput.cs index 371588dab..43d89b5f9 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteEditInput.cs @@ -27,6 +27,7 @@ public class ThirdLocationNoteEditInput : SfsStoreCreateOrUpdateInputBase [Display(Name = "任务ID")] [Required(ErrorMessage = "{0}是必填项")] public string JobNumber { get; set; } + /// /// 车间 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteImportInput.cs index f267c18ea..20c3fc68a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteImportInput.cs @@ -9,6 +9,7 @@ public class ThirdLocationNoteImportInput : SfsStoreImportInputBase, IHasJobNumb /// [Display(Name = "任务ID")] public string JobNumber { get; set; } + /// /// 车间 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNote.cs index 6f7d0dedf..877bdfd72 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNote.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNote.cs @@ -16,6 +16,7 @@ public class ThirdLocationNote : SfsStoreAggregateRootBase [IgnoreUpdate] public string JobNumber { get; set; } + /// /// 车间 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/ThirdLocationNotes/ThirdLocationNoteDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/ThirdLocationNotes/ThirdLocationNoteDbContextModelCreatingExtensions.cs index 5cfee77f2..c0fd3d39f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/ThirdLocationNotes/ThirdLocationNoteDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/ThirdLocationNotes/ThirdLocationNoteDbContextModelCreatingExtensions.cs @@ -21,7 +21,7 @@ public static class ThirdLocationNoteDbContextModelCreatingExtensions //Properties b.Property(q => q.RequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength); - b.Property(q => q.Workshop).HasMaxLength(SfsPropertyConst.NameLength); + b.Property(q => q.Workshop).HasMaxLength(SfsPropertyConst.NameLength); b.Property(q => q.Remark).HasMaxLength(SfsPropertyConst.RemarkLength); //Relations diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs index d9c309ed5..1731bd5e6 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs @@ -16,10 +16,10 @@ public partial class StoreEventAutoMapperProfile : Profile CreateMap() .ForMember(x => x.JobNumber, y => y.MapFrom(d => d.Number)) .ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.RequestNumber)) - .ForMember(x => x.ActiveDate, y => y.MapFrom(d => DateTime.Now)) + .ForMember(x => x.ActiveDate, y => y.MapFrom(d => DateTime.Now)) .ForMember(x => x.Worker, y => y.MapFrom(d => d.CompleteUserName)) .Ignore(x => x.Confirmed) - .Ignore(x => x.Number) + .Ignore(x => x.Number) .Ignore(x => x.ConfirmTime); CreateMap() @@ -64,7 +64,7 @@ public partial class StoreEventAutoMapperProfile : Profile CreateMap() .ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.RequestNumber)) .Ignore(x => x.Confirmed) - .Ignore(x => x.JobNumber) + .Ignore(x => x.JobNumber) .Ignore(x => x.ActiveDate) ; CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/ThirdLocationNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/ThirdLocationNoteAutoMapperProfile.cs index b9f8cdb54..86d5ece03 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/ThirdLocationNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/ThirdLocationNoteAutoMapperProfile.cs @@ -1,6 +1,7 @@ using AutoMapper; using Volo.Abp.AutoMapper; using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; namespace Win_in.Sfs.Wms.Store.Event; @@ -17,6 +18,19 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.ExtraProperties) .Ignore(x => x.TransSubType) ; + + CreateMap() + .ForMember(dest => dest.Type, opts => opts.MapFrom(src => src.RequestType)) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.CallServerName) + .Ignore(x => x.CallBusinessType) + .Ignore(x => x.CallRequestNumber) + .Ignore(x => x.CallJobNumber) + ; + + CreateMap() + .Ignore(x => x.Reason) + ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/ThirdLocationNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/ThirdLocationNoteEventHandler.cs index dd745a257..04bcf9e6e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/ThirdLocationNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/ThirdLocationNoteEventHandler.cs @@ -40,7 +40,7 @@ namespace Win_in.Sfs.Wms.Store.Event.DataExchanges protected override async Task AddExchangeDataAsync(List entities) { - var dtos = ObjectMapper.Map, List>(entities); + var dtos = ObjectMapper.Map, List>(entities); foreach (var detail in dtos.SelectMany(dto => dto.Details)) { await detail.TrySetLocationAsync(LocationAclService).ConfigureAwait(false);