diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs index ca7c0baab..966ee52d1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs @@ -158,4 +158,11 @@ public class InjectionJobAppService { throw new NotImplementedException(); } + + [HttpPost("test")] + public virtual async Task Test() + { + Console.WriteLine("FuAZCZXVZXVXZVZ"); + await Task.CompletedTask; + } } 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 0767c0097..16fc0eacd 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 @@ -3,6 +3,7 @@ using System.Reflection; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.DependencyInjection; using Volo.Abp; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; @@ -18,10 +19,12 @@ public class TransferLibJobAppService : SfsJobAppServiceBase, ITransferLibJobAppService { + private readonly IServiceProvider _serviceProvider; + public TransferLibJobAppService( - ITransferLibJobRepository repository, ITransferLibJobManager TransferLibJobManager - ) : base(repository, TransferLibJobManager) + ITransferLibJobRepository repository, ITransferLibJobManager TransferLibJobManager, IServiceProvider serviceProvider) : base(repository, TransferLibJobManager) { + _serviceProvider = serviceProvider; } /// @@ -32,6 +35,11 @@ public class TransferLibJobAppService /// public override async Task CompleteAsync(Guid id, TransferLibJobDTO dto) { + var str = "Win_in.Sfs.Wms.Store.Application.InjectionJobAppService"; + var implementation=_serviceProvider.GetService(Type.GetType("Win_in.Sfs.Wms.Store.Application.InjectionJobAppService")); + MethodInfo methodInfo=implementation.GetType().GetMethod("Test"); + methodInfo.Invoke(implementation, null); + string methodPrefix = "TransferLibJobAppService.CompleteAsync - "; if (dto.CallServerName.IsNullOrEmpty()) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionJobEventHandler.cs index 4ea37c26b..71bd14211 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionJobEventHandler.cs @@ -167,11 +167,6 @@ public class InjectionJobEventHandler : detailInput.FromLocationErpCode= detail.RecommendFromLocationErpCode; detailInput.FromWarehouseCode= detail.RecommendFromWarehouseCode; - detailInput.ToLocationCode = "YL1"; - detailInput.ToLocationErpCode = "YL1"; - detailInput.ToLocationGroup = "YL1"; - detailInput.ToLocationArea = "YL1"; - detailInput.FromLot = detail.RecommendLot; detailInput.ToLot=detail.RecommendLot; detailInput.Qty=detail.RecommendQty; @@ -179,7 +174,7 @@ public class InjectionJobEventHandler : detailInput.Uom=detail.Uom; detailInput.SupplierBatch = detail.RecommendSupplierBatch; - await _transferLibRequestAppService.CreateAsync(input); + await _transferLibRequestAppService.CreateAsync(input).ConfigureAwait(false); } }