using AutoMapper; using Volo.Abp.AutoMapper; using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Basedata.Domain; using Win_in.Sfs.Label.Application.Contracts; using Win_in.Sfs.Label.Domain.Shared; using Win_in.Sfs.Wms.DataExchange.Domain; using Win_in.Sfs.Wms.DataExchange.WMS.ItemPack; using Win_in.Sfs.Wms.DataExchange.WMS.PurchaseOrder; using Win_in.Sfs.Wms.DataExchange.WMS.PurchaseReceipt; using Win_in.Sfs.Wms.DataExchange.WMS.PurchaseReturn; using Win_in.Sfs.Wms.DataExchange.WMS.PutawayNote; using Win_in.Sfs.Wms.DataExchange.WMS.SuppplierAsn; using Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.DataExchange.Agent; public class FawtygAutoMapperProfile : Profile { public FawtygAutoMapperProfile() { CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap() .Ignore(x => x.Detail); CreateMap(); CreateMap() .Ignore(x => x.Detail); CreateMap(); CreateMap() .Ignore(x => x.Details) .Ignore(x => x.ExtraProperties) .Ignore(x => x.PoType) .Ignore(x => x.IsConsignment) .Ignore(x => x.Version) .Ignore(x => x.TaxRate) .Ignore(x => x.Remark) .Ignore(x => x.ContactPhone) .Ignore(x => x.ContactEmail) ; CreateMap() .Ignore(x => x.ItemName) .Ignore(x => x.ItemDesc1) .Ignore(x => x.ItemDesc2) .Ignore(x => x.PoLine) .Ignore(x => x.SupplierPackUom) .Ignore(x => x.SupplierPackQty) .Ignore(x => x.ConvertRate) .Ignore(x => x.IsConsignment) .Ignore(x => x.StdPackQty) ; CreateMap() .Ignore(x => x.Details) .Ignore(x => x.ExtraProperties) .Ignore(x => x.Status) .Ignore(x => x.RpNumber) .Ignore(x => x.DockCode) .Ignore(x => x.Remark) .Ignore(x => x.ContactPhone) .Ignore(x => x.ContactEmail) ; CreateMap() .ForMember(x => x.RecommendErpCode, y => y.MapFrom(d => d.LocationErpCode)) .Ignore(x => x.ItemName) .Ignore(x => x.ItemDesc1) .Ignore(x => x.ItemDesc2) .Ignore(x => x.PoLine) .Ignore(x => x.SupplierPackUom) .Ignore(x => x.SupplierPackQty) .Ignore(x => x.StdPackQty) .Ignore(x => x.ConvertRate) .Ignore(x => x.ExpireDate) ; CreateMap() .ForMember(x => x.Code, y => y.MapFrom(d => d.PackingCode)) .ForMember(x => x.LabelType, y => y.MapFrom(d => EnumLabelType.PurchaseLabel)) .ForMember(x => x.LabelStatus, y => y.MapFrom(d => LabelStatus.Enable)) .Ignore(x => x.FullBarcodeString) .Ignore(x => x.RecommendLocationCode) .Ignore(x => x.RpNumber) .Ignore(x => x.AsnNumber) .Ignore(x => x.QLevel) .Ignore(x => x.QualityFile) .Ignore(x => x.ItemName) .Ignore(x => x.ItemDesc1) .Ignore(x => x.ItemDesc2) .Ignore(x => x.ExtraProperties) ; CreateMap(); CreateMap() .ForMember(x => x.SupplierItemCode, y => y.MapFrom(d => d.PackCode)) .ForMember(x => x.ItemName, y => y.MapFrom(d => d.PackName)) .ForMember(x => x.Version, y => y.MapFrom(d => d.Remark)) .ForMember(x => x.SupplierPackQty, y => y.MapFrom(d => d.PackQty)) .ForMember(x => x.SupplierPackUom, y => y.MapFrom(d => d.PackUom)); CreateMap() .IgnoreAuditedObjectProperties() //.ForMember(x => x.SupplierPackQty, y => y.MapFrom(d => new UomQty(d.SupplierPackUom, d.SupplierPackQty))) .Ignore(x => x.ConcurrencyStamp) .Ignore(x => x.Id); } }