From b7a9185f87b9a1fce734a71a56087f91511d9758 Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Tue, 16 Jul 2024 14:59:29 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=BA=93=E5=AD=98=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E5=AF=BC=E5=85=A5=E5=A2=9E=E5=8A=A0ERP=E7=89=A9?= =?UTF-8?q?=E6=96=99=E5=8F=B7=E5=92=8C=E5=BA=93=E4=BD=8D=E5=85=B3=E7=B3=BB?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InventoryInitialNoteAppService.cs | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/InventoryInitialNotes/InventoryInitialNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/InventoryInitialNotes/InventoryInitialNoteAppService.cs index 6aaab4364..5eecd553e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/InventoryInitialNotes/InventoryInitialNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/InventoryInitialNotes/InventoryInitialNoteAppService.cs @@ -19,6 +19,7 @@ using Volo.Abp; using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Wms.Inventory.Domain.Acl.ErpLocationItem; /// /// 库存初始化记录 @@ -32,17 +33,20 @@ public class InventoryInitialNoteAppService : private readonly IInventoryInitialNoteManager _inventoryInitialNoteManager; private readonly IInventoryLabelAppService _inventoryLabelService; private readonly IItemBasicAppService _itemBasicAppService; + private readonly IErpLocationItemAclService _erpLocationItemAclService; public InventoryInitialNoteAppService( IInventoryInitialNoteRepository repository , IInventoryInitialNoteManager inventoryInitialNoteManager , IInventoryLabelAppService inventoryLabelService, + IErpLocationItemAclService erpLocationItemAclService, IItemBasicAppService itemBasicAppService ) : base(repository) { _inventoryInitialNoteManager = inventoryInitialNoteManager; _inventoryLabelService = inventoryLabelService; _itemBasicAppService = itemBasicAppService; + _erpLocationItemAclService= erpLocationItemAclService; } /// /// 数据加工 @@ -88,8 +92,8 @@ public class InventoryInitialNoteAppService : await CheckItemBasicAsync(importInput, validationRresult).ConfigureAwait(false); await CheckLocationAsync(importInput, validationRresult).ConfigureAwait(false); await CheckStatusAsync(importInput, validationRresult).ConfigureAwait(false); - await CheckPackingAsync(importInput, validationRresult).ConfigureAwait(false); - + await CheckPackingAsync(importInput, validationRresult).ConfigureAwait(false); + await CheckErpLocationItemAsync(importInput, validationRresult).ConfigureAwait(false); } private static void CheckItemBasic(ItemBasicDTO itemcBasicDto, string itemCode) @@ -130,6 +134,7 @@ public class InventoryInitialNoteAppService : await CheckLocationAsync(importInput, validationRresult).ConfigureAwait(false); await CheckStatusAsync(importInput, validationRresult).ConfigureAwait(false); await CheckPackingAsync(importInput, validationRresult).ConfigureAwait(false); + } private async Task CheckPackingAsync(InventoryInitialNoteImportInput importInput, List validationRresult) @@ -175,6 +180,23 @@ public class InventoryInitialNoteAppService : } } + /// + /// 校验开账信息 + /// + /// + /// + /// + /// + private async Task CheckErpLocationItemAsync(InventoryInitialNoteImportInput importInput, List validationRresult) + { + var erpLocationItem = await _erpLocationItemAclService.GetFirstAsync(importInput.ItemCode, importInput.LocationErpCode).ConfigureAwait(false); + + if (erpLocationItem == null) + { + validationRresult.Add("ERP料号", $"未找到物品【{importInput.ItemCode}】与ERP储位【{importInput.LocationErpCode}】的开账信息"); + } + } + protected async Task CheckLocationAsync(InventoryInitialNoteImportInput importInput, List validationRresult) { var location = await LocationAclService.GetByCodeAsync(importInput.LocationCode).ConfigureAwait(false); From 7d167e6b66c8471ad795a9468869f3234916d6ad Mon Sep 17 00:00:00 2001 From: zhaoxinyu <89237069@qq.com> Date: Tue, 16 Jul 2024 16:19:46 +0800 Subject: [PATCH 2/3] =?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 --- .../AssembleIssueJobAppService.cs | 35 ++++++++++++------- .../AssembleIssueNoteAppService.cs | 2 ++ .../Options/RestoOptions.cs | 8 ++++- 3 files changed, 31 insertions(+), 14 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 af3d7252e..fdb6528bf 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 @@ -83,8 +83,6 @@ public class AssembleIssueJobAppService [HttpPost("add-many")] public override async Task> CreateManyAsync(List inputs) { - - foreach (var input in inputs) { await CheckMinRowAndSetStatusAsync(input).ConfigureAwait(false); @@ -93,8 +91,11 @@ public class AssembleIssueJobAppService if (dimensionalStorehouseflag) { input.IsClaims = true; - input.ClaimsUserId = "LITK"; //todo - input.ClaimsUserName = "LITK"; //todo + input.ClaimsUserId = string.IsNullOrEmpty(_options.Value.StereosUser) ? "LYF" : _options.Value.StereosUser; + input.ClaimsUserName = string.IsNullOrEmpty(_options.Value.StereosPassword) ? "LYF" : _options.Value.StereosPassword; + + + } } var assembleIssueJobDtos = await base.CreateManyAsync(inputs).ConfigureAwait(false); @@ -102,9 +103,7 @@ public class AssembleIssueJobAppService { await CheckDimensionalStorehouseAsync(assembleIssueJobDto).ConfigureAwait(false); } - return assembleIssueJobDtos; - } @@ -304,9 +303,9 @@ public class AssembleIssueJobAppService var assembleIssueJob = await _repository.GetAsync(masterId).ConfigureAwait(false); assembleIssueJob.JobStatus = EnumJobStatus.Doing; - assembleIssueJob.ClaimsUserId = "LITK"; - assembleIssueJob.ClaimsUserName = "LITK"; - + assembleIssueJob.ClaimsUserId = string.IsNullOrEmpty( _options.Value.StereosUser)? "LYF" : _options.Value.StereosUser; + assembleIssueJob.ClaimsUserName = string.IsNullOrEmpty(_options.Value.StereosPassword) ? "LYF" : _options.Value.StereosPassword; + //if (assembleIssueJob.IsClaims) //{ @@ -330,6 +329,8 @@ public class AssembleIssueJobAppService issueJobDetail.HandledFromQty = entityDetail.HandledFromQty; issueJobDetail.HandledToQty = entityDetail.HandledToQty; + + issueJobDetail.HandledToQty += issueJobDetailDto.HandledToQty; issueJobDetail.HandledFromQty += issueJobDetailDto.HandledFromQty; assembleIssueJob.Details = new EditableList { issueJobDetail }; @@ -614,16 +615,24 @@ public class AssembleIssueJobAppService dto.HandledToLocationGroup = toloc.LocationGroupCode; dto.HandledToLocationArea = toloc.AreaCode; dto.HandledToLocationErpCode = toloc.ErpLocationCode; + dto.HandledToLot = string.Empty; + dto.HandledToWarehouseCode = toloc.WarehouseCode; + dto.HandledToQty = detail.Qty; + dto.HandledToLot = string.Empty; + dto.HandledToPackingCode = string.Empty; + dto.HandledFromWarehouseCode=fromloc.WarehouseCode; dto.HandledFromLocationCode = fromloc.Code; dto.HandledFromLocationGroup = fromloc.LocationGroupCode; dto.HandledFromLocationArea = fromloc.AreaCode; dto.HandledFromLocationErpCode = fromloc.ErpLocationCode; - - - - //dto.HandledFromPackingCode = ""; + dto.HandledFromQty = detail.Qty; + dto.HandledFromLot = string.Empty; + dto.HandledFromPackingCode = string.Empty; + + + details.Add(dto); await ExecuteDetailExtAsync(itm.Id, entity.Id, dto).ConfigureAwait(false); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteAppService.cs index ec42d0293..d0d0360ef 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteAppService.cs @@ -38,6 +38,8 @@ public class AssembleIssueNoteAppService : //[Authorize(AssembleIssueNotePermissions.Create)] public override async Task CreateAsync(AssembleIssueNoteEditInput input) { + + var entity = ObjectMapper.Map(input); await _assembleIssueNoteManager.CreateAsync(entity).ConfigureAwait(false); var dto = ObjectMapper.Map(entity); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Options/RestoOptions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Options/RestoOptions.cs index 95ecb71d4..e4fbb583f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Options/RestoOptions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Options/RestoOptions.cs @@ -15,9 +15,15 @@ public class RestoOptions public string Password { set; get; } // 令牌 public string Token { set; get; } - + // 路径 public string Path { set; get; } + //立体库用户名 + public string StereosUser { set; get; } + + //立体库密码 + public string StereosPassword { set; get; } + } From c66abc5d8a4108491e94409aa6cec2afe8cda74f Mon Sep 17 00:00:00 2001 From: zhaoxinyu <89237069@qq.com> Date: Tue, 16 Jul 2024 16:54:04 +0800 Subject: [PATCH 3/3] =?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 --- .../AssembleIssueJobs/AssembleIssueJobAppService.cs | 8 +++++++- .../AssembleIssueNotes/AssembleIssueNoteAppService.cs | 2 -- 2 files changed, 7 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 fdb6528bf..40879dd96 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 @@ -551,12 +551,18 @@ public class AssembleIssueJobAppService var ret = new ReusltObject { Code = int.Parse(GaoTongResultStatus.Success), OperateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), Message = "操作成功" }; try { + + if (input.Jobs.Count > 0) { var jobs = input.Jobs; var numbers = jobs.Select(p => p.JobNumber); var query = _repository.WithDetails() - .Where(p => numbers.Contains(p.Number)); + .Where(p => numbers.Contains(p.Number) && p.JobStatus != EnumJobStatus.Done); + + + + var entities = query.ToList(); if (entities.Count == 0) { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteAppService.cs index d0d0360ef..ec42d0293 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteAppService.cs @@ -38,8 +38,6 @@ public class AssembleIssueNoteAppService : //[Authorize(AssembleIssueNotePermissions.Create)] public override async Task CreateAsync(AssembleIssueNoteEditInput input) { - - var entity = ObjectMapper.Map(input); await _assembleIssueNoteManager.CreateAsync(entity).ConfigureAwait(false); var dto = ObjectMapper.Map(entity);