You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

303 lines
12 KiB

2 years ago
using AutoMapper;
using Volo.Abp.AutoMapper;
using Win_in.Sfs.Shared.Application;
using Win_in.Sfs.Wms.DataExchange.Domain;
2 years ago
using Win_in.Sfs.Wms.DataExchange.WMS.BackFlushNote;
10 months ago
using Win_in.Sfs.Wms.DataExchange.WMS.Chassis;
using Win_in.Sfs.Wms.DataExchange.WMS.DeliverNote;
using Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest;
using Win_in.Sfs.Wms.DataExchange.WMS.InjectionIssueRequest;
2 years ago
using Win_in.Sfs.Wms.DataExchange.WMS.MaterialRequest;
using Win_in.Sfs.Wms.DataExchange.WMS.MesNote;
2 years ago
using Win_in.Sfs.Wms.DataExchange.WMS.PCK;
using Win_in.Sfs.Wms.DataExchange.WMS.ProductReceiptNote;
using Win_in.Sfs.Wms.DataExchange.WMS.ScrapNote;
using Win_in.Sfs.Wms.DataExchange.WMS.TransferNote;
2 years ago
using Win_in.Sfs.Wms.Store.Application.Contracts;
namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent;
public class FawtygAutoMapperProfile : Profile
{
public FawtygAutoMapperProfile()
{
CreateMap<IncomingToWms, ArchivedIncomingToWms>();
CreateMap<IncomingFromExternal, ArchivedIncomingFromExternal>();
CreateMap<OutgoingFromWms, ArchivedOutgoingFromWms>();
CreateMap<OutgoingToExternal, ArchivedOutgoingToExternal>();
2 years ago
CreateMap<BackFlushNoteExchangeDto, BackFlushNoteEditInput>();
CreateMap<BackFlushNoteDetailExchangeDto, BackFlushNoteDetailInput>();
2 years ago
CreateMap<ProductReceiptNoteExchangeDto, ProductReceiptNoteEditInput>()
.Ignore(x => x.Number)
.Ignore(x => x.ProductionPlanNumber)
.Ignore(x => x.JobNumber)
.Ignore(x => x.WorkShop) //必填
.Ignore(x => x.ReceiptType)
.Ignore(x => x.SourceNumber)
.Ignore(x => x.Worker)
.Ignore(x => x.Remark)
.Ignore(x => x.Details)
.Ignore(x => x.ExtraProperties);
CreateMap<ProductReceiptNoteDetailExchangeDto, ProductReceiptNoteDetailInput>()
.Ignore(x => x.Shift)
.Ignore(x => x.ProdLine)
.Ignore(x => x.BomVersion)
.Ignore(x => x.Status)
.Ignore(x => x.PackingCode)
.Ignore(x => x.ContainerCode)
.Ignore(x => x.StdPackQty)
.Ignore(x => x.Lot) //必填
.Ignore(x => x.SupplierBatch)
.Ignore(x => x.ArriveDate)
.Ignore(x => x.ProduceDate)
.Ignore(x => x.ExpireDate)
.Ignore(x => x.ItemName)
.Ignore(x => x.ItemDesc1)
.Ignore(x => x.ItemDesc2)
.Ignore(x => x.RecommendContainerCode)
.Ignore(x => x.RecommendPackingCode)
.Ignore(x => x.RecommendSupplierBatch)
.Ignore(x => x.RecommendArriveDate)
.Ignore(x => x.RecommendProduceDate)
.Ignore(x => x.RecommendExpireDate)
.Ignore(x => x.RecommendLot)
.Ignore(x => x.RecommendToLocationCode)
.Ignore(x => x.RecommendToLocationArea)
.Ignore(x => x.RecommendToLocationGroup)
.Ignore(x => x.RecommendToLocationErpCode)
.Ignore(x => x.RecommendToWarehouseCode)
.Ignore(x => x.RecommendQty)
.Ignore(t => t.HandledContainerCode)
.Ignore(x => x.HandledPackingCode)
.Ignore(x => x.HandledSupplierBatch)
.Ignore(x => x.HandledArriveDate)
.Ignore(x => x.HandledProduceDate)
.Ignore(x => x.HandledExpireDate)
.Ignore(x => x.HandledLot)
.Ignore(x => x.HandledToLocationCode)
.Ignore(x => x.HandledToLocationArea)
.Ignore(x => x.HandledToLocationGroup)
.Ignore(x => x.HandledToLocationErpCode)
.Ignore(x => x.HandledToWarehouseCode)
.Ignore(x => x.HandledQty);
CreateMap<MaterialRequestExchangeDto, MaterialRequestEditInput>()
//必填
.Ignore(x => x.Workshop)
.Ignore(x => x.ProdLine)
.Ignore(x => x.PreparationPlanNumber)
.Ignore(x => x.AutoSubmit)
.Ignore(x => x.AutoAgree)
.Ignore(x => x.AutoHandle)
.Ignore(x => x.AutoCompleteJob)
.Ignore(x => x.DirectCreateNote)
.Ignore(x => x.Worker)
.Ignore(x => x.ActiveDate)
.Ignore(x => x.Remark)
.Ignore(x => x.Details)
.Ignore(x => x.ExtraProperties);
CreateMap<MaterialRequestDetailExchangeDto, MaterialRequestDetailInput>()
.Ignore(x => x.ProdLine)
.Ignore(x => x.WorkStation)
.Ignore(x => x.ExpiredTime)
.Ignore(x => x.RequestStatus)
.Ignore(x => x.ToLocationErpCode)
.Ignore(x => x.Uom)
.Ignore(x => x.StdPackQty)
.Ignore(x => x.Remark)
.Ignore(x => x.ItemName)
.Ignore(x => x.ItemDesc1)
.Ignore(x => x.ItemDesc2);
CreateMap<IssueNoteExchangeDto, IssueNoteEditInput>()
.Ignore(x => x.Details)
.Ignore(x => x.ExtraProperties)
.Ignore(x => x.JobNumber)
.Ignore(x => x.Workshop)
.Ignore(x => x.RequestNumber)
.Ignore(x => x.Worker)
.Ignore(x => x.ActiveDate)
;
CreateMap<IssueNoteDetailExchangeDto, IssueNoteDetailInput>()
.Ignore(x => x.ItemName)
.Ignore(x => x.ItemDesc1)
.Ignore(x => x.ItemDesc2)
.Ignore(x => x.IssueTime)
.Ignore(x => x.ExpiredTime)
.Ignore(x => x.ProdLine)
.Ignore(x => x.WorkStation)
.Ignore(x => x.FromContainerCode)
.Ignore(x => x.ToContainerCode)
.Ignore(x => x.FromLot)
.Ignore(x => x.ToLot)
.Ignore(x => x.SupplierBatch)
.Ignore(x => x.ArriveDate)
.Ignore(x => x.ProduceDate)
.Ignore(x => x.ExpireDate)
.Ignore(x => x.FromLocationCode)
.Ignore(x => x.FromLocationErpCode)
.Ignore(x => x.FromWarehouseCode)
.Ignore(x => x.StdPackQty)
.Ignore(x => x.Remark)
.Ignore(x => x.ToPackingCode)
.Ignore(x => x.ToWarehouseCode)
.Ignore(x => x.FromStatus)
.Ignore(x => x.ToStatus)
.Ignore(x => x.Uom)
.IgnoreIHasRecommendAndHandledFrom();
CreateMap<IssueNoteDTO, IssueNoteExchangeDto>()
.Ignore(x => x.Detail);
2 years ago
CreateMap<IssueNoteDetailDTO, IssueNoteDetailExchangeDto>();
CreateMap<ScrapNoteExchangeDto, ScrapNoteEditInput>()
.Ignore(x => x.Details)
.Ignore(x => x.ExtraProperties)
.Ignore(x => x.Number)
.Ignore(x => x.JobNumber);
2 years ago
CreateMap<ScrapNoteDetailExchangeDto, ScrapNoteDetailInput>()
.Ignore(x => x.ItemName)
.Ignore(x => x.ItemDesc1)
.Ignore(x => x.ItemDesc2)
.Ignore(x => x.FromPackingCode)
.Ignore(x => x.ToPackingCode)
.Ignore(x => x.FromContainerCode)
.Ignore(x => x.ToContainerCode)
.Ignore(x => x.FromLot)
.Ignore(x => x.ToLot)
.Ignore(x => x.SupplierBatch)
.Ignore(x => x.ArriveDate)
.Ignore(x => x.ProduceDate)
.Ignore(x => x.ExpireDate)
.Ignore(x => x.ToWarehouseCode)
.Ignore(x => x.ToWarehouseCode)
.Ignore(x => x.Uom)
.Ignore(x => x.StdPackQty);
CreateMap<TransferNoteExchangeDto, TransferNoteEditInput>()
.Ignore(x => x.Details)
.Ignore(x => x.ExtraProperties)
.Ignore(x => x.RequestNumber)
.Ignore(x => x.JobNumber)
.Ignore(x => x.CallRequestNumber)
.Ignore(x => x.CallJobNumber)
.Ignore(x => x.CallBusinessType)
.Ignore(x => x.CallServerName)
.Ignore(x => x.UseOnTheWayLocation)
.Ignore(x => x.Confirmed)
.Ignore(x => x.ConfirmTime)
.Ignore(x => x.Details)
.Ignore(x => x.ExtraProperties);
CreateMap<TransferNoteDetailExchangeDto, TransferNoteDetailInput>()
.Ignore(x => x.ItemName)
.Ignore(x => x.ItemDesc1)
.Ignore(x => x.ItemDesc2)
.Ignore(x => x.FromLocationCode)
.Ignore(x => x.FromLocationArea)
.Ignore(x => x.FromLocationGroup)
.Ignore(x => x.FromContainerCode)
.Ignore(x => x.FromWarehouseCode)
.Ignore(x => x.FromLot)
.Ignore(x => x.FromPackingCode)
.Ignore(x => x.ToPackingCode)
.Ignore(x => x.ToContainerCode)
.Ignore(x => x.ToLocationCode)
.Ignore(x => x.ToLocationArea)
.Ignore(x => x.ToLocationGroup)
.Ignore(x => x.ToWarehouseCode)
.Ignore(x => x.ToLot)
.Ignore(x => x.SupplierBatch)
.Ignore(x => x.ArriveDate)
.Ignore(x => x.ProduceDate)
.Ignore(x => x.ExpireDate)
.Ignore(x => x.Uom)
.Ignore(x => x.StdPackQty);
CreateMap<MesNoteExchangeDto, MesNoteEditInput>()
.Ignore(x => x.ExtraProperties)
.Ignore(x => x.JobNumber)
.Ignore(x => x.Details)
.Ignore(x => x.ExtraProperties);
CreateMap<MesNoteDetailExchangeDto, MesNoteDetailInput>()
.ForMember(x => x.FromLocationCode, y => y.MapFrom(t => t.FromLocationErpCode))
.ForMember(x => x.ToLocationCode, y => y.MapFrom(t => t.ToLocationErpCode))
.Ignore(x => x.ItemName)
.Ignore(x => x.ItemDesc1)
.Ignore(x => x.ItemDesc2)
.Ignore(x => x.FromLocationArea)
.Ignore(x => x.FromLocationGroup)
.Ignore(x => x.FromContainerCode)
.Ignore(x => x.FromWarehouseCode)
.Ignore(x => x.FromLot)
.Ignore(x => x.FromPackingCode)
.Ignore(x => x.ToPackingCode)
.Ignore(x => x.ToContainerCode)
.Ignore(x => x.ToLocationArea)
.Ignore(x => x.ToLocationGroup)
.Ignore(x => x.ToWarehouseCode)
.Ignore(x => x.ToLot)
.Ignore(x => x.SupplierBatch)
.Ignore(x => x.ArriveDate)
.Ignore(x => x.ProduceDate)
.Ignore(x => x.ExpireDate)
.Ignore(x => x.Uom)
.Ignore(x => x.StdPackQty);
CreateMap<DeliverRequestExchangeDto, DeliverRequestEditInput>()
.Ignore(x => x.ExtraProperties)
.Ignore(x => x.Details)
.Ignore(x => x.CustomerAddressCode)
.Ignore(x => x.ExtraProperties)
.Ignore(x => x.AutoSubmit)
.Ignore(x => x.AutoAgree)
.Ignore(x => x.AutoHandle)
.Ignore(x => x.AutoCompleteJob)
.Ignore(x => x.DirectCreateNote);
CreateMap<DeliverRequestDetailExchangeDto, DeliverRequestDetailInput>()
.Ignore(x => x.Uom)
.Ignore(x => x.StdPackQty)
.Ignore(x => x.Remark)
.Ignore(x => x.ItemName)
.Ignore(x => x.ItemDesc1)
.Ignore(x => x.ItemDesc2);
CreateMap<InjectionIssueRequestExchangeDto, InjectionIssueRequestEditInput>()
.Ignore(x => x.ExtraProperties)
.Ignore(x => x.Details)
.Ignore(x => x.AutoSubmit)
.Ignore(x => x.AutoAgree)
.Ignore(x => x.AutoHandle)
.Ignore(x => x.AutoCompleteJob)
.Ignore(x => x.DirectCreateNote)
.Ignore(x => x.UseOnTheWayLocation);
CreateMap<InjectionIssueRequestDetailExchangeDto, InjectionIssueRequestDetailInput>()
.Ignore(x => x.Uom)
.Ignore(x => x.StdPackQty)
.Ignore(x => x.Remark)
.Ignore(x => x.ItemName)
.Ignore(x => x.ItemDesc1)
.Ignore(x => x.ItemDesc2)
.Ignore(x => x.ProdLine)
.Ignore(x => x.ToLocationErpCode)
.Ignore(x => x.ToLocationArea)
.Ignore(x => x.ToLocationGroup)
.Ignore(x => x.ToWarehouseCode)
.Ignore(x => x.RequestStatus)
.Ignore(x => x.IssuedQty)
.Ignore(x => x.ReceivedQty)
.Ignore(x => x.Status)
.Ignore(x => x.PositionCode);
10 months ago
CreateMap<ChassisExchangeDto, ChassisEditInput>()
.Ignore(x => x.ItemName)
.Ignore(x => x.ItemDesc1)
.Ignore(x => x.ItemDesc2);
2 years ago
}
}