From 97707171e60c5408200f7d50d1b9f61ca755c775 Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Sat, 11 May 2024 14:16:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=89=E6=96=B9=E5=BA=93TYRP=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DTOs/ThirdLocationNoteDTO.cs | 1 + .../Inputs/ThirdLocationNoteEditInput.cs | 1 + .../Inputs/ThirdLocationNoteImportInput.cs | 1 + .../Notes/ThirdLocationNotes/ThirdLocationNote.cs | 1 + ...LocationNoteDbContextModelCreatingExtensions.cs | 2 +- .../Jobs/ThirdLocationJobAutoMapperProfile.cs | 6 +++--- .../Notes/ThirdLocationNoteAutoMapperProfile.cs | 14 ++++++++++++++ .../DataExchanges/ThirdLocationNoteEventHandler.cs | 2 +- 8 files changed, 23 insertions(+), 5 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/DTOs/ThirdLocationNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/DTOs/ThirdLocationNoteDTO.cs index ea67e0660..2c4ace218 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/DTOs/ThirdLocationNoteDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/DTOs/ThirdLocationNoteDTO.cs @@ -12,6 +12,7 @@ public class ThirdLocationNoteDTO : SfsStoreDTOBase, /// [Display(Name = "任务ID")] public string JobNumber { get; set; } + /// /// 车间 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteEditInput.cs index 371588dab..43d89b5f9 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteEditInput.cs @@ -27,6 +27,7 @@ public class ThirdLocationNoteEditInput : SfsStoreCreateOrUpdateInputBase [Display(Name = "任务ID")] [Required(ErrorMessage = "{0}是必填项")] public string JobNumber { get; set; } + /// /// 车间 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteImportInput.cs index f267c18ea..20c3fc68a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteImportInput.cs @@ -9,6 +9,7 @@ public class ThirdLocationNoteImportInput : SfsStoreImportInputBase, IHasJobNumb /// [Display(Name = "任务ID")] public string JobNumber { get; set; } + /// /// 车间 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNote.cs index 6f7d0dedf..877bdfd72 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNote.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNote.cs @@ -16,6 +16,7 @@ public class ThirdLocationNote : SfsStoreAggregateRootBase [IgnoreUpdate] public string JobNumber { get; set; } + /// /// 车间 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/ThirdLocationNotes/ThirdLocationNoteDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/ThirdLocationNotes/ThirdLocationNoteDbContextModelCreatingExtensions.cs index 5cfee77f2..c0fd3d39f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/ThirdLocationNotes/ThirdLocationNoteDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/ThirdLocationNotes/ThirdLocationNoteDbContextModelCreatingExtensions.cs @@ -21,7 +21,7 @@ public static class ThirdLocationNoteDbContextModelCreatingExtensions //Properties b.Property(q => q.RequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength); - b.Property(q => q.Workshop).HasMaxLength(SfsPropertyConst.NameLength); + b.Property(q => q.Workshop).HasMaxLength(SfsPropertyConst.NameLength); b.Property(q => q.Remark).HasMaxLength(SfsPropertyConst.RemarkLength); //Relations diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs index d9c309ed5..1731bd5e6 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs @@ -16,10 +16,10 @@ public partial class StoreEventAutoMapperProfile : Profile CreateMap() .ForMember(x => x.JobNumber, y => y.MapFrom(d => d.Number)) .ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.RequestNumber)) - .ForMember(x => x.ActiveDate, y => y.MapFrom(d => DateTime.Now)) + .ForMember(x => x.ActiveDate, y => y.MapFrom(d => DateTime.Now)) .ForMember(x => x.Worker, y => y.MapFrom(d => d.CompleteUserName)) .Ignore(x => x.Confirmed) - .Ignore(x => x.Number) + .Ignore(x => x.Number) .Ignore(x => x.ConfirmTime); CreateMap() @@ -64,7 +64,7 @@ public partial class StoreEventAutoMapperProfile : Profile CreateMap() .ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.RequestNumber)) .Ignore(x => x.Confirmed) - .Ignore(x => x.JobNumber) + .Ignore(x => x.JobNumber) .Ignore(x => x.ActiveDate) ; CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/ThirdLocationNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/ThirdLocationNoteAutoMapperProfile.cs index b9f8cdb54..86d5ece03 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/ThirdLocationNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/ThirdLocationNoteAutoMapperProfile.cs @@ -1,6 +1,7 @@ using AutoMapper; using Volo.Abp.AutoMapper; using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; namespace Win_in.Sfs.Wms.Store.Event; @@ -17,6 +18,19 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.ExtraProperties) .Ignore(x => x.TransSubType) ; + + CreateMap() + .ForMember(dest => dest.Type, opts => opts.MapFrom(src => src.RequestType)) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.CallServerName) + .Ignore(x => x.CallBusinessType) + .Ignore(x => x.CallRequestNumber) + .Ignore(x => x.CallJobNumber) + ; + + CreateMap() + .Ignore(x => x.Reason) + ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/ThirdLocationNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/ThirdLocationNoteEventHandler.cs index dd745a257..04bcf9e6e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/ThirdLocationNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/ThirdLocationNoteEventHandler.cs @@ -40,7 +40,7 @@ namespace Win_in.Sfs.Wms.Store.Event.DataExchanges protected override async Task AddExchangeDataAsync(List entities) { - var dtos = ObjectMapper.Map, List>(entities); + var dtos = ObjectMapper.Map, List>(entities); foreach (var detail in dtos.SelectMany(dto => dto.Details)) { await detail.TrySetLocationAsync(LocationAclService).ConfigureAwait(false);