diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobType.cs index e074a20cc..d526b507c 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobType.cs @@ -91,5 +91,11 @@ public enum EnumJobType /// 转移 /// [Display(Name = "转移")] - Transfer = 14, + Transfer = 15, + + /// + /// 器具转移 + /// + [Display(Name = "转移")] + ContainerTransferJob = 16, } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ContainerJobs/DTOs/ContainerJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ContainerJobs/DTOs/ContainerJobDTO.cs index 7da42cbbc..286f686ae 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ContainerJobs/DTOs/ContainerJobDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ContainerJobs/DTOs/ContainerJobDTO.cs @@ -31,13 +31,13 @@ public class ContainerJobDTO : SfsJobDTOBase /// [Display(Name = "器具类型")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] - public EnumContainerType ContainerType { get; set; } + public string ContainerType { get; set; } /// /// 器具规格 /// [Display(Name = "器具规格")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] - public EnumContainerSpecificationsType SpecificationsType { get; set; } + public string SpecificationsType { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ContainerJobs/Inputs/ContainerJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ContainerJobs/Inputs/ContainerJobEditInput.cs index a212a9112..f688c14c4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ContainerJobs/Inputs/ContainerJobEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ContainerJobs/Inputs/ContainerJobEditInput.cs @@ -30,14 +30,14 @@ public class ContainerJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCreateI /// [Display(Name = "器具类型")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] - public EnumContainerType ContainerType { get; set; } + public string ContainerType { get; set; } /// /// 器具规格 /// [Display(Name = "器具规格")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] - public EnumContainerSpecificationsType SpecificationsType { get; set; } + public string SpecificationsType { get; set; } /// /// 上游任务编号 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ContainerNotes/DTOs/ContainerNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ContainerNotes/DTOs/ContainerNoteDTO.cs index fe123a8aa..262c27d0e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ContainerNotes/DTOs/ContainerNoteDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ContainerNotes/DTOs/ContainerNoteDTO.cs @@ -26,14 +26,14 @@ public class ContainerNoteDTO : SfsStoreDTOBase, IHasJob /// [Display(Name = "器具类型")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] - public EnumContainerType ContainerType { get; set; } + public string ContainerType { get; set; } /// /// 器具规格 /// [Display(Name = "器具规格")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] - public EnumContainerSpecificationsType SpecificationsType { get; set; } + public string SpecificationsType { get; set; } /// /// 已确认 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ContainerNotes/Inputs/ContainerNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ContainerNotes/Inputs/ContainerNoteEditInput.cs index 2b13c47f2..498d54b42 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ContainerNotes/Inputs/ContainerNoteEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ContainerNotes/Inputs/ContainerNoteEditInput.cs @@ -36,14 +36,14 @@ public class ContainerNoteEditInput : SfsStoreCreateOrUpdateInputBase /// [Display(Name = "器具类型")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] - public EnumContainerType ContainerType { get; set; } + public string ContainerType { get; set; } /// /// 器具规格 /// [Display(Name = "器具规格")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] - public EnumContainerSpecificationsType SpecificationsType { get; set; } + public string SpecificationsType { get; set; } /// /// 明细列表 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ContainerNotes/Inputs/ContainerNoteImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ContainerNotes/Inputs/ContainerNoteImportInput.cs index 0ac078c04..1544bc32d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ContainerNotes/Inputs/ContainerNoteImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ContainerNotes/Inputs/ContainerNoteImportInput.cs @@ -24,12 +24,12 @@ public class ContainerNoteImportInput : SfsStoreImportInputBase, IHasJobNumber /// [Display(Name = "器具类型")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] - public EnumContainerType ContainerType { get; set; } + public string ContainerType { get; set; } /// /// 器具规格 /// [Display(Name = "器具规格")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] - public EnumContainerSpecificationsType SpecificationsType { get; set; } + public string SpecificationsType { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ContainerRequests/DTOs/ContainerRequestDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ContainerRequests/DTOs/ContainerRequestDTO.cs index 4cc0007cb..36668d33e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ContainerRequests/DTOs/ContainerRequestDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ContainerRequests/DTOs/ContainerRequestDTO.cs @@ -20,11 +20,11 @@ public class ContainerRequestDTO : SfsStoreRequestDTOBase [Display(Name = "器具类型")] - public EnumContainerType ContainerType { get; set; } + public string ContainerType { get; set; } /// /// 器具规格 /// [Display(Name = "器具规格")] - public EnumContainerSpecificationsType SpecificationsType { get; set; } + public string SpecificationsType { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ContainerRequests/Inputs/ContainerRequestEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ContainerRequests/Inputs/ContainerRequestEditInput.cs index 23391aadd..25d984db2 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ContainerRequests/Inputs/ContainerRequestEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ContainerRequests/Inputs/ContainerRequestEditInput.cs @@ -24,11 +24,11 @@ public class ContainerRequestEditInput : SfsStoreRequestCreateOrUpdateInputBase [Display(Name = "器具类型")] [Required(ErrorMessage = "{0}是必填项")] - public EnumContainerType ContainerType { get; set; } + public string ContainerType { get; set; } [Display(Name = "器具规格")] [Required(ErrorMessage = "{0}是必填项")] - public EnumContainerSpecificationsType SpecificationsType { get; set; } + public string SpecificationsType { get; set; } [Display(Name = "明细列表")] public List Details { get; set; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ContainerRequests/Inputs/ContainerRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ContainerRequests/Inputs/ContainerRequestImportInput.cs index c3404c177..bdd2b6665 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ContainerRequests/Inputs/ContainerRequestImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ContainerRequests/Inputs/ContainerRequestImportInput.cs @@ -24,7 +24,7 @@ public class ContainerRequestImportInput : SfsStoreImportInputBase [Required(ErrorMessage = "{0}是必填项")] [ImporterHeader(Name = "器具类型")] [ExporterHeader(DisplayName = "器具类型")] - public EnumContainerType ContainerType { get; set; } + public string ContainerType { get; set; } /// /// 器具规格 @@ -33,7 +33,7 @@ public class ContainerRequestImportInput : SfsStoreImportInputBase [Required(ErrorMessage = "{0}是必填项")] [ImporterHeader(Name = "器具规格")] [ExporterHeader(DisplayName = "器具规格")] - public EnumContainerSpecificationsType SpecificationsType { get; set; } + public string SpecificationsType { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ContainerJobs/ContainerJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ContainerJobs/ContainerJobAutoMapperProfile.cs index 1c2b4e8e1..a4ccbb640 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ContainerJobs/ContainerJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ContainerJobs/ContainerJobAutoMapperProfile.cs @@ -8,7 +8,7 @@ namespace Win_in.Sfs.Wms.Store.Application; public partial class StoreApplicationAutoMapperProfile : Profile { private void ContainerJobAutoMapperProfile() - { + { CreateMap(); CreateMap(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ContainerRequests/ContainerRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ContainerRequests/ContainerRequestAppService.cs index 21a0c2e86..8bcb88c9f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ContainerRequests/ContainerRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ContainerRequests/ContainerRequestAppService.cs @@ -56,6 +56,12 @@ public class ContainerRequestAppService : [HttpPost("")] public override async Task CreateAsync(ContainerRequestEditInput input) { + input.AutoCompleteJob = false; + input.AutoAgree = true; + input.AutoHandle = true; + input.AutoSubmit = true; + input.DirectCreateNote = false; + var entity = ObjectMapper.Map(input); await _containerRequestManager.CreateAsync(entity).ConfigureAwait(false); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ContainerJobs/ContainerJob.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ContainerJobs/ContainerJob.cs index a416b0fce..99e95973c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ContainerJobs/ContainerJob.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ContainerJobs/ContainerJob.cs @@ -29,13 +29,13 @@ public class ContainerJob : SfsJobAggregateRootBase /// 器具类型 /// [IgnoreUpdate] - public EnumContainerType ContainerType { get; set; } + public string ContainerType { get; set; } /// /// 器具规格 /// [IgnoreUpdate] - public EnumContainerSpecificationsType SpecificationsType { get; set; } + public string SpecificationsType { get; set; } /// /// 任务明细 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ContainerJobs/ContainerJobDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ContainerJobs/ContainerJobDetail.cs index 78823d40f..725085817 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ContainerJobs/ContainerJobDetail.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ContainerJobs/ContainerJobDetail.cs @@ -10,13 +10,13 @@ public class ContainerJobDetail : SfsJobRecommendFromDetailEntityBase /// /// 呼叫库位代码 /// - [IgnoreUpdate] + public string ToLocationCode { get; set; } /// /// 来源库位代码 /// - [IgnoreUpdate] + public string FromLocationCode { get; set; } public void SetId(Guid id) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ContainerNotes/ContainerNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ContainerNotes/ContainerNote.cs index 690038660..5ad47ed4f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ContainerNotes/ContainerNote.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ContainerNotes/ContainerNote.cs @@ -29,13 +29,13 @@ public class ContainerNote : SfsStoreAggregateRootBase, IHa /// 器具类型 /// [IgnoreUpdate] - public EnumContainerType ContainerType { get; set; } + public string ContainerType { get; set; } /// /// 器具规格 /// [IgnoreUpdate] - public EnumContainerSpecificationsType SpecificationsType { get; set; } + public string SpecificationsType { get; set; } /// /// 已确认 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ContainerRequests/ContainerRequest.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ContainerRequests/ContainerRequest.cs index 081c0ce4a..d2f13e5cb 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ContainerRequests/ContainerRequest.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ContainerRequests/ContainerRequest.cs @@ -21,13 +21,13 @@ public class ContainerRequest : SfsStoreRequestAggregateRootBase [IgnoreUpdate] - public EnumContainerType ContainerType { get; set; } + public string ContainerType { get; set; } /// /// 器具规格 /// [IgnoreUpdate] - public EnumContainerSpecificationsType SpecificationsType { get; set; } + public string SpecificationsType { get; set; } /// /// 任务明细 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/ContainerJobs/ContainerJobDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/ContainerJobs/ContainerJobDbContextModelCreatingExtensions.cs index 5d6ce01c0..69a60359e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/ContainerJobs/ContainerJobDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/ContainerJobs/ContainerJobDbContextModelCreatingExtensions.cs @@ -22,9 +22,10 @@ public static class ContainerJobDbContextModelCreatingExtensions b.ConfigureJob(); //Properties b.Property(q => q.ContainerRequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); - b.Property(q => q.ContainerType).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ContainerType).HasMaxLength(SfsPropertyConst.NameLength); b.Property(q => q.RequestLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); - b.Property(q => q.SpecificationsType).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.SpecificationsType).HasMaxLength(SfsPropertyConst.NameLength); + //Relations b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); //Indexes diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/ContainerRequests/ContainerRequestDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/ContainerRequests/ContainerRequestDbContextModelCreatingExtensions.cs index e31881a8f..1146c9219 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/ContainerRequests/ContainerRequestDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/ContainerRequests/ContainerRequestDbContextModelCreatingExtensions.cs @@ -20,8 +20,8 @@ public static class ContainerRequestDbContextModelCreatingExtensions //Properties b.Property(q => q.RequestLocationCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); - b.Property(q => q.ContainerType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); - b.Property(q => q.SpecificationsType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.ContainerType).HasMaxLength(SfsPropertyConst.NameLength); + b.Property(q => q.SpecificationsType).HasMaxLength(SfsPropertyConst.NameLength); b.Property(q => q.RequestStatus).IsRequired().HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); //Relations @@ -31,7 +31,7 @@ public static class ContainerRequestDbContextModelCreatingExtensions b.HasIndex(q => new { q.Number }).IsUnique(); }); - builder.Entity(b => + builder.Entity(b => { //Configure table & schema name b.ToTable(options.TablePrefix + nameof(ContainerRequestDetail), options.Schema); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ContainerRequestMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ContainerRequestMapperProfile.cs new file mode 100644 index 000000000..32b4c026e --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ContainerRequestMapperProfile.cs @@ -0,0 +1,39 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Event; + +using Win_in.Sfs.Shared.Application; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +public partial class StoreEventAutoMapperProfile : Profile +{ + private void ContainerRequestMapperProfile() + { + CreateMap() + .ForMember(x => x.ContainerRequestNumber, y => y.MapFrom(d => d.Number)) + .ForMember(x => x.ContainerType, y => y.MapFrom(d => d.ContainerType)) + .ForMember(x => x.SpecificationsType, y => y.MapFrom(d => d.SpecificationsType)) + .ForMember(x => x.IsAutoComplete, y => y.MapFrom(d => d.AutoCompleteJob)) + .ForMember(x => x.JobType, y => y.MapFrom(d => EnumJobType.ContainerTransferJob)) + .ForMember(x => x.JobStatus, y => y.MapFrom(d => EnumJobStatus.Open)) + .Ignore(x => x.WarehouseCode) + .Ignore(x => x.UpStreamJobNumber) + .Ignore(x => x.JobDescription) + .Ignore(x => x.WorkGroupCode) + .Ignore(x => x.Priority) + .Ignore(x => x.PriorityIncrement) + .Ignore(x => x.AcceptUserId) + .Ignore(x => x.AcceptUserName) + .Ignore(x => x.AcceptTime) + .Ignore(x => x.CompleteUserId) + .Ignore(x => x.CompleteUserName) + .Ignore(x => x.CompleteTime) + .Ignore(x => x.Details) + ; + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ContainerRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ContainerRequestEventHandler.cs index e39f2cf7f..0e2aad82c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ContainerRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ContainerRequestEventHandler.cs @@ -26,16 +26,16 @@ public class ContainerRequestEventHandler { - private readonly IContainerJobAppService _ContainerJobApp; + private readonly IContainerJobAppService _containerJobApp; private readonly IContainerRequestManager _containerRequestManager; public ContainerRequestEventHandler( - IContainerJobAppService ContainerJobApp + IContainerJobAppService containerJobApp , IContainerRequestManager containerRequestManager) { - - _ContainerJobApp = ContainerJobApp; + + _containerJobApp = containerJobApp; _containerRequestManager = containerRequestManager; } @@ -48,10 +48,11 @@ public class ContainerRequestEventHandler public async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { var entity = eventData.Entity; - if (entity.AutoSubmit) - { - await _containerRequestManager.SubmitAsync(entity).ConfigureAwait(false); - } + + //if (entity.AutoSubmit) + //{ + // await _containerRequestManager.SubmitAsync(entity).ConfigureAwait(false); + //} } /// @@ -105,8 +106,8 @@ public class ContainerRequestEventHandler } else { - var ContainerJobCreateInputs = await BuildContainerJobsAsync(entity).ConfigureAwait(false); - await _ContainerJobApp.CreateManyAsync(ContainerJobCreateInputs).ConfigureAwait(false); + var containerJobCreateInputs = await BuildContainerJobsAsync(entity).ConfigureAwait(false); + await _containerJobApp.CreateAsync(containerJobCreateInputs).ConfigureAwait(false); } } @@ -114,17 +115,33 @@ public class ContainerRequestEventHandler #region 私有 - private async Task> BuildContainerJobsAsync(ContainerRequest request) + private async Task BuildContainerJobsAsync(ContainerRequest request) { var createInput = ObjectMapper.Map(request); - - createInput.Details = new List(); + createInput.WarehouseCode = "T8"; + ContainerJobDetailInput detail=new ContainerJobDetailInput(); + + detail.FromLocationCode = "123"; + detail.ToLocationCode = "123"; + + detail.ItemCode = "123"; + detail.ItemName = "123"; + detail.RecommendPackingCode = "123"; + detail.RecommendLot = "123"; + detail.RecommendFromLocationCode = "123"; + detail.RecommendFromLocationErpCode = "123"; + detail.Uom = "123"; + + + createInput.Details.Add(detail); + + - return new List { createInput }; + return createInput ; } #endregion diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/StoreEventAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/StoreEventAutoMapperProfile.cs index 9dfa74f8d..284067c72 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/StoreEventAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/StoreEventAutoMapperProfile.cs @@ -60,6 +60,7 @@ public partial class StoreEventAutoMapperProfile : Profile CustomerReturnNoteAutoMapperProfile(); DeliverNoteAutoMapperProfile(); DeliverRequestMapperProfile(); + ContainerRequestMapperProfile(); InspectNoteAutoMapperProfile(); InventoryTransferNoteAutoMapperProfile(); IsolationNoteAutoMapperProfile();