|
|
@ -59,6 +59,7 @@ public class AssembleIssueJobAppService |
|
|
|
private readonly ILogger<AssembleIssueJobAppService> _logger; |
|
|
|
|
|
|
|
private readonly IPostionLocationAppService _postionLocationAppService; |
|
|
|
private readonly ILocationDeliveryAppService _locationDeliveryAppService; |
|
|
|
|
|
|
|
public AssembleIssueJobAppService( |
|
|
|
ILogger<AssembleIssueJobAppService> logger, |
|
|
@ -70,15 +71,14 @@ public class AssembleIssueJobAppService |
|
|
|
, IOptions<RestoOptions> options, ITransferLibRequestAppService transferLibRequestAppService, |
|
|
|
ICurrentUser currentUser, UnitOfWorkManager unitOfWorkManager |
|
|
|
, IOptions<AgvOptions> agvOptions |
|
|
|
, IPostionLocationAppService postionLocationAppService |
|
|
|
|
|
|
|
) : base( |
|
|
|
, IPostionLocationAppService postionLocationAppService, ILocationDeliveryAppService locationDeliveryAppService) : base( |
|
|
|
repository, assembleIssueJobManager |
|
|
|
|
|
|
|
|
|
|
|
) |
|
|
|
{ |
|
|
|
_postionLocationAppService = postionLocationAppService; |
|
|
|
_locationDeliveryAppService = locationDeliveryAppService; |
|
|
|
_assembleIssueJobManager = assembleIssueJobManager; |
|
|
|
_locationAppService = locationAppService; |
|
|
|
_assembleIssueNoteAppService = assembleIssueNoteAppService; |
|
|
@ -120,17 +120,20 @@ public class AssembleIssueJobAppService |
|
|
|
: _options.Value.StereosPassword; |
|
|
|
} |
|
|
|
|
|
|
|
//如果是Agv
|
|
|
|
var agvFlag = await UpdateJobStatusWaitByAgvAsync(input).ConfigureAwait(false); |
|
|
|
if (agvFlag) |
|
|
|
if (dimensionalStorehouseflag == false) |
|
|
|
{ |
|
|
|
input.IsClaims = true; |
|
|
|
input.ClaimsUserId = string.IsNullOrEmpty(_options.Value.StereosUser) |
|
|
|
? "AGV" |
|
|
|
: _options.Value.StereosUser; |
|
|
|
input.ClaimsUserName = string.IsNullOrEmpty(_options.Value.StereosPassword) |
|
|
|
? "AGV" |
|
|
|
: _options.Value.StereosPassword; |
|
|
|
//如果是Agv
|
|
|
|
var agvFlag = await UpdateJobStatusWaitByAgvAsync(input).ConfigureAwait(false); |
|
|
|
if (agvFlag) |
|
|
|
{ |
|
|
|
input.IsClaims = true; |
|
|
|
input.ClaimsUserId = string.IsNullOrEmpty(_options.Value.StereosUser) |
|
|
|
? "AGV" |
|
|
|
: _options.Value.StereosUser; |
|
|
|
input.ClaimsUserName = string.IsNullOrEmpty(_options.Value.StereosPassword) |
|
|
|
? "AGV" |
|
|
|
: _options.Value.StereosPassword; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -795,10 +798,10 @@ public class AssembleIssueJobAppService |
|
|
|
private async Task DoingAgvAsync(AssembleIssueJobDTO assembleIssueJobDto) |
|
|
|
{ |
|
|
|
var jobDetailInputdetail = assembleIssueJobDto.Details.FirstOrDefault(); |
|
|
|
var loctionDto = await _locationAppService.GetByCodeAsync(jobDetailInputdetail.RecommendFromLocationCode) |
|
|
|
.ConfigureAwait(false); |
|
|
|
var locationDeliveryDto = await _locationDeliveryAppService.GetByFromLocationCodeAndToLocationCodeAsync( |
|
|
|
jobDetailInputdetail.RecommendFromLocationCode, jobDetailInputdetail.RecommendToLocationCode).ConfigureAwait(false); |
|
|
|
|
|
|
|
if (loctionDto.EnableAgv) |
|
|
|
if (locationDeliveryDto != null && locationDeliveryDto.EnumLocationDeliveryType == EnumLocationDeliveryType.Agv) |
|
|
|
{ |
|
|
|
//TODO AGV
|
|
|
|
var ret = await CallAgvAsync(assembleIssueJobDto).ConfigureAwait(false); |
|
|
@ -825,15 +828,15 @@ public class AssembleIssueJobAppService |
|
|
|
{ |
|
|
|
var jobDetailInputdetail = input.Details.FirstOrDefault(); |
|
|
|
|
|
|
|
var loctionDto = await _locationAppService.GetByCodeAsync(jobDetailInputdetail.RecommendFromLocationCode) |
|
|
|
.ConfigureAwait(false); |
|
|
|
|
|
|
|
if (loctionDto.EnableAgv) |
|
|
|
var locationDeliveryDto=await _locationDeliveryAppService.GetByFromLocationCodeAndToLocationCodeAsync( |
|
|
|
jobDetailInputdetail.RecommendFromLocationCode, jobDetailInputdetail.RecommendToLocationCode).ConfigureAwait(false); |
|
|
|
|
|
|
|
if (locationDeliveryDto!=null&& locationDeliveryDto.EnumLocationDeliveryType==EnumLocationDeliveryType.Agv) |
|
|
|
{ |
|
|
|
input.JobStatus = EnumJobStatus.WaitAgv; |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|