|
|
@ -15,6 +15,9 @@ using MyNamespace; |
|
|
|
using Omu.ValueInjecter; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.ObjectMapping; |
|
|
|
using Volo.Abp.Timing; |
|
|
|
using Volo.Abp.Uow; |
|
|
|
using Volo.Abp.Users; |
|
|
|
using Win_in.Sfs.Basedata.Application.Contracts; |
|
|
|
using Win_in.Sfs.Shared.Domain.Shared; |
|
|
|
using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; |
|
|
@ -25,6 +28,7 @@ using Win_in.Sfs.Wms.Store.Domain.Shared; |
|
|
|
using Win_in.Sfs.Wms.Store.Jobs.IssueJobs.proxy; |
|
|
|
using Win_in.Sfs.Wms.Store.Notes; |
|
|
|
using Win_in.Sfs.Wms.Store.Options; |
|
|
|
using static Volo.Abp.Identity.Settings.IdentitySettingNames; |
|
|
|
|
|
|
|
namespace Win_in.Sfs.Wms.Store.Application; |
|
|
|
|
|
|
@ -46,6 +50,7 @@ public class AssembleIssueJobAppService |
|
|
|
private readonly ITransferLibRequestAppService _transferLibRequestAppService; |
|
|
|
private readonly IOptions<RestoOptions> _options; |
|
|
|
private readonly ILogger<AssembleIssueJobAppService> _logger; |
|
|
|
private readonly ICurrentUser _currentUser; |
|
|
|
|
|
|
|
public AssembleIssueJobAppService( |
|
|
|
ILogger<AssembleIssueJobAppService> logger, |
|
|
@ -53,7 +58,7 @@ public class AssembleIssueJobAppService |
|
|
|
ILocationAppService locationAppService, |
|
|
|
IAssembleIssueNoteAppService assembleIssueNoteAppService, IExpectOutAppService expectOutAppService |
|
|
|
, IHttpClientFactory httpClientFactory |
|
|
|
, IOptions<RestoOptions> options, ITransferLibRequestAppService transferLibRequestAppService) : base( |
|
|
|
, IOptions<RestoOptions> options, ITransferLibRequestAppService transferLibRequestAppService, ICurrentUser currentUser) : base( |
|
|
|
repository, assembleIssueJobManager) |
|
|
|
{ |
|
|
|
_assembleIssueJobManager = assembleIssueJobManager; |
|
|
@ -63,6 +68,7 @@ public class AssembleIssueJobAppService |
|
|
|
_httpClientFactory = httpClientFactory; |
|
|
|
_options = options; |
|
|
|
_transferLibRequestAppService = transferLibRequestAppService; |
|
|
|
_currentUser = currentUser; |
|
|
|
_logger = logger; |
|
|
|
} |
|
|
|
|
|
|
@ -292,6 +298,35 @@ public class AssembleIssueJobAppService |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
[HttpPost("accept/{id}")] |
|
|
|
[UnitOfWork] |
|
|
|
public override async Task AcceptAsync(Guid id) |
|
|
|
{ |
|
|
|
var entity = await _repository.FindAsync(id).ConfigureAwait(false); |
|
|
|
entity.IsClaims=true; |
|
|
|
entity.ClaimsUserName = _currentUser.UserName; |
|
|
|
entity.ClaimsUserId = _currentUser.Id.ToString(); |
|
|
|
entity.AcceptTime = Clock.Now; |
|
|
|
await _repository.UpdateAsync(entity).ConfigureAwait(false); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 取消承接任务
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost("cancel-accept/{id}")] |
|
|
|
[UnitOfWork] |
|
|
|
public override async Task CancelAcceptAsync(Guid id) |
|
|
|
{ |
|
|
|
var entity = await _repository.FindAsync(id).ConfigureAwait(false); |
|
|
|
entity.IsClaims = false; |
|
|
|
entity.ClaimsUserName = string.Empty; |
|
|
|
entity.ClaimsUserId = string.Empty; |
|
|
|
entity.AcceptTime = DateTime.Now; |
|
|
|
await _repository.UpdateAsync(entity).ConfigureAwait(false); |
|
|
|
} |
|
|
|
|
|
|
|
#region 立库
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|