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; } ///