From 52c07d12d88909197a3d5f894e0370a18a3eefcb Mon Sep 17 00:00:00 2001 From: Zheng Date: Fri, 27 Dec 2024 18:49:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B0=83=E8=AF=95=20?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E6=97=B6agv=E8=BF=94=E5=9B=9E=E6=88=90?= =?UTF-8?q?=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AssembleIssueJobAppService.cs | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 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 e10234455..d15e5a63a 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 @@ -456,6 +456,8 @@ public class AssembleIssueJobAppService var transferLibNoteDetail = dto.Details.First(); + _logger.LogInformation("---------------开始回调"); + var jobDetail = job.Details.First(); job.JobStatus = EnumJobStatus.Open; @@ -492,9 +494,14 @@ public class AssembleIssueJobAppService var isDoingAgv=await DoingAgvAsync(jobDto, transferLibNoteDetail.HandledToLocationCode, jobDetail.RecommendToLocationCode).ConfigureAwait(false); + _logger.LogInformation("是否agv:" + isDoingAgv); + if (isDoingAgv) { job.JobStatus = EnumJobStatus.WaitAgv; + + _logger.LogInformation("job.JobStatus:" + job.JobStatus); + job.IsClaims = true; job.ClaimsUserId = string.IsNullOrEmpty(_options.Value.StereosUser) ? "AGV" @@ -504,7 +511,12 @@ public class AssembleIssueJobAppService : _options.Value.StereosPassword; } - job = await _repository.UpdateAsync(job).ConfigureAwait(false); + _logger.LogInformation("任务状态:"+job.JobStatus.ToString()); + + job = await _repository.UpdateAsync(job,true).ConfigureAwait(false); + + + _logger.LogInformation("---------------结束回调"); } #endregion @@ -829,19 +841,19 @@ public class AssembleIssueJobAppService //来源永远是库位 目标永远是工位 var ret = await CallAgvAsync(assembleIssueJobDto, fromLocationCode, jobDetailInputdetail.Remark).ConfigureAwait(false); -#if DEBUG - - return true; - -#endif - if (ret.Code != 0) { throw new UserFriendlyException($"调用AGV不成功!原因:{ret.Message}"); } + else + { + return true; + } + } + else + { + return false; } - - return false; } ///