|
|
|
|
using Mapster;
|
|
|
|
|
using Myshipping.Application.Entity;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
public class BookingEDIVOLTAMapper : IRegister
|
|
|
|
|
{
|
|
|
|
|
public void Register(TypeAdapterConfig config)
|
|
|
|
|
{
|
|
|
|
|
config.ForType<BookingOrder, VOLTAEDIBaseModel>()
|
|
|
|
|
.Map(dest => dest.id, src => src.Id)
|
|
|
|
|
.Map(dest => dest.BookingId, src => src.MBLNO)
|
|
|
|
|
.Map(dest => dest.ShpperName, src => src.SHIPPER)
|
|
|
|
|
.Map(dest => dest.ConsigneeName, src => src.CONSIGNEE)
|
|
|
|
|
.Map(dest => dest.NotifyName, src => src.NOTIFYPARTY)
|
|
|
|
|
.Map(dest => dest.PlaceOfOrigin, src => src.PLACERECEIPT)
|
|
|
|
|
.Map(dest => dest.LoadPort, src => src.PORTLOAD)
|
|
|
|
|
.Map(dest => dest.DischargePort, src => src.PORTDISCHARGE)
|
|
|
|
|
.Map(dest => dest.FinalDestination, src => src.DESTINATION)
|
|
|
|
|
.Map(dest => dest.PlaceOfDelivery, src => src.PLACEDELIVERY)
|
|
|
|
|
.Map(dest => dest.CargoDescription, src => src.DESCRIPTION)
|
|
|
|
|
.Map(dest => dest.Marks, src => src.MARKS)
|
|
|
|
|
.Map(dest => dest.Vessel, src => src.VESSEL)
|
|
|
|
|
.Map(dest => dest.VoyNo, src => src.VOYNO)
|
|
|
|
|
.Map(dest => dest.TotalGWt, src => src.KGS.HasValue ? src.KGS.Value : 0)
|
|
|
|
|
.Map(dest => dest.TotalCBM, src => src.CBM.HasValue ? src.CBM.Value : 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
config.ForType<BookingCtn, VOLTAEDIContaModel>()
|
|
|
|
|
.Map(dest => dest.ContaNo, src => src.CNTRNO)
|
|
|
|
|
.Map(dest => dest.SealNo, src => src.SEALNO)
|
|
|
|
|
.Map(dest => dest.Qty, src => src.PKGS.HasValue ? src.PKGS.Value : 0)
|
|
|
|
|
.Map(dest => dest.GWt, src => src.KGS.HasValue ? src.KGS.Value : 0)
|
|
|
|
|
.Map(dest => dest.CBM, src => src.CBM.HasValue ? src.CBM.Value : 0)
|
|
|
|
|
.Map(dest => dest.Pkgs, src => src.KINDPKGS);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|