|
|
|
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<IncomingToWms, ArchivedIncomingToWms>();
|
|
|
|
CreateMap<IncomingFromExternal, ArchivedIncomingFromExternal>();
|
|
|
|
CreateMap<OutgoingFromWms, ArchivedOutgoingFromWms>();
|
|
|
|
CreateMap<OutgoingToExternal, ArchivedOutgoingToExternal>();
|
|
|
|
|
|
|
|
CreateMap<PutawayNoteDTO, PutawayNoteExchangeDto>();
|
|
|
|
CreateMap<PutawayNoteDetailDTO, PutawayNoteDetailExchangeDto>();
|
|
|
|
|
|
|
|
CreateMap<PurchaseReceiptNoteDTO, PurchaseReceiptNoteExchangeDto>()
|
|
|
|
.Ignore(x => x.Detail);
|
|
|
|
CreateMap<PurchaseReceiptNoteDetailDTO, PurchaseReceiptNoteDetailExchangeDto>();
|
|
|
|
|
|
|
|
CreateMap<PurchaseReturnNoteDTO, PurchaseReturnNoteExchangeDto>()
|
|
|
|
.Ignore(x => x.Detail);
|
|
|
|
CreateMap<PurchaseReturnNoteDetailDTO, PurchaseReturnNoteDetailExchangeDto>();
|
|
|
|
|
|
|
|
CreateMap<PurchaseOrderExchangeDto, PurchaseOrderEditInput>()
|
|
|
|
.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<PurchaseOrderDetailExchangeDto, PurchaseOrderDetailInput>()
|
|
|
|
.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<SupplierAsnExchangeDto, SupplierAsnEditInput>()
|
|
|
|
.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<SupplierAsnDetailExchangeDto, SupplierAsnDetailInput>()
|
|
|
|
.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<SupplierAsnDetailExchangeDto, InventoryLabelEditInput>()
|
|
|
|
.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<ItemPackExchangeDto, ItemPackEditInput>();
|
|
|
|
CreateMap<ItemPackExchangeDto, SupplierItemEditInput>()
|
|
|
|
.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.Qty))
|
|
|
|
.ForMember(x => x.SupplierPackUom, y => y.MapFrom(d => d.PackUom));
|
|
|
|
|
|
|
|
|
|
|
|
CreateMap<SupplierItemEditInput, SupplierItem>()
|
|
|
|
.IgnoreAuditedObjectProperties()
|
|
|
|
//.ForMember(x => x.SupplierPackQty, y => y.MapFrom(d => new UomQty(d.SupplierPackUom, d.SupplierPackQty)))
|
|
|
|
.Ignore(x => x.ConcurrencyStamp)
|
|
|
|
.Ignore(x => x.Id);
|
|
|
|
}
|
|
|
|
}
|