using AutoMapper; using Volo.Abp.AutoMapper; using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Basedata.Domain; namespace Win_in.Sfs.Basedata.Application; public partial class BasedataApplicationAutoMapperProfile : Profile { private void BomAutoMapperProfile() { CreateMap() .Ignore(t => t.ComponentDTOs) .ForMember(x => x.ComponentQty, y => y.MapFrom(d => d.ComponentQty)) .ForMember(x => x.ComponentUom, y => y.MapFrom(d => d.ComponentUom)) //.Ignore(x => x.PerQty) 为何么要忽略啊,回冲需要 刘恩亮 20220503 .ReverseMap(); CreateMap() .ForMember(x => x.ComponentQty, y => y.MapFrom(d => d.ComponentQty)) .ForMember(x => x.ComponentUom, y => y.MapFrom(d => d.ComponentUom)) .ForMember(x => x.Layer, y => y.MapFrom(d => 1)) .Ignore(x => x.TenantId) .IgnoreAuditedObjectProperties() .Ignore(x => x.ConcurrencyStamp) .Ignore(x => x.ExtraProperties) // .Ignore(x => x.Remark) ; CreateMap() .IgnoreAuditedObjectProperties() .Ignore(x => x.ConcurrencyStamp).Ignore(x => x.Id); } }