From b92672a267d1f3fe92ee0f184a56f9cd64df77ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Fri, 29 Nov 2024 15:30:26 +0800 Subject: [PATCH] =?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 --- .../TransferLibJobs/TransferLibJobAppService.cs | 2 ++ .../TransferLibRequestAppService.cs | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs index b0cfd8036..d165f5fbd 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs @@ -343,7 +343,9 @@ public class TransferLibJobAppService if (job.JobStatus == EnumJobStatus.Open || job.JobStatus == EnumJobStatus.Partial || job.JobStatus == EnumJobStatus.Doing || job.JobStatus == EnumJobStatus.Wait) { + await _repository.UpdateAsync(job).ConfigureAwait(false); + await _expectOutAppService.RemoveByNumberAsync(job.Number).ConfigureAwait(false); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs index d20e60820..9178e507b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs @@ -386,6 +386,12 @@ public class TransferLibRequestAppService : SfsStoreRequestAppServiceBase return ObjectMapper.Map(request); } + + + + + + [HttpPost("Complete-By-Job")] public async Task CompleteByJobAsync(string requestNumber) { @@ -414,6 +420,14 @@ public class TransferLibRequestAppService : SfsStoreRequestAppServiceBase foreach (var request in list) { await CompleteAsync(request.Id).ConfigureAwait(false); + var jobs = await _transferLibJobAppService.GetByRequestNumberAsync(request.Number).ConfigureAwait(false); + foreach (var itm in jobs) + { + if (itm.JobStatus != EnumJobStatus.Done) + { + await _transferLibJobAppService.CompleteAsync(itm.Id, itm).ConfigureAwait(false); + } + } } }