You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
232 lines
14 KiB
C#
232 lines
14 KiB
C#
using DS.WMS.Core.TaskPlat.Entity;
|
|
using Mapster;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace DS.WMS.Core.TaskPlat.Dtos.Mapper
|
|
{
|
|
/// <summary>
|
|
/// 任务台用的Mapster自定义映射规则
|
|
/// </summary>
|
|
public static class TaskPlatMapsterSetup
|
|
{
|
|
/// <summary>
|
|
/// 添加映射规则
|
|
/// </summary>
|
|
public static void AddTaskPlatMapsterSetup(this IServiceCollection services)
|
|
{
|
|
// 邮件接收BC创建BC子任务 TaskManageOrderBCInfo, TaskBCInfo
|
|
{
|
|
TypeAdapterConfig<TaskManageOrderBCInfo, TaskBCInfo>.NewConfig()
|
|
.TwoWays()
|
|
.Map(dest => dest.BUSI_TYPE, src => src.BusiType)
|
|
.Map(dest => dest.BOOKING_PARTY, src => src.BookingParty)
|
|
.Map(dest => dest.SHIPPER, src => src.Shipper)
|
|
.Map(dest => dest.CONSIGNEE, src => src.Consignee)
|
|
.Map(dest => dest.NOTIFYPARTY, src => src.NotifyParty)
|
|
.Map(dest => dest.BC_MODIFY_TIMES, src => src.BCModifyTimes)
|
|
.Map(dest => dest.BC_MODIFY_DATE, src => src.BCModifyDate)
|
|
.Map(dest => dest.MBL_NO, src => src.MBLNo)
|
|
.Map(dest => dest.VESSEL, src => src.Vessel)
|
|
.Map(dest => dest.VOYNO, src => src.VoyNo)
|
|
.Map(dest => dest.CARRIER, src => src.Carrier)
|
|
.Map(dest => dest.PLACERECEIPT, src => src.PlaceReceipt)
|
|
.Map(dest => dest.PORTLOAD, src => src.Portload)
|
|
.Map(dest => dest.CLOSING_DATE, src => src.ClosingDate)
|
|
.Map(dest => dest.VGM_CUTOFF_TIME, src => src.VGMCutoffTime)
|
|
.Map(dest => dest.ETA, src => src.ETA)
|
|
.Map(dest => dest.ETD, src => src.ETD)
|
|
.Map(dest => dest.POD_ETA, src => src.PODETA)
|
|
.Map(dest => dest.CUT_SINGLE_TIME, src => src.CutSingleTime)
|
|
.Map(dest => dest.PORTDISCHARGE, src => src.PortDischarge)
|
|
.Map(dest => dest.PLACEDELIVERY, src => src.PlaceDelivery)
|
|
.Map(dest => dest.SHIPPING_METHOD, src => src.ShippingMethod)
|
|
.Map(dest => dest.SERVICE, src => src.Service)
|
|
.Map(dest => dest.PRETRANS_MODE, src => src.PreTransMode)
|
|
.Map(dest => dest.DESCRIPTION, src => src.Description)
|
|
.Map(dest => dest.ISSUEPLACE, src => src.IssuePlace)
|
|
.Map(dest => dest.COLLECTION_TERMINAL, src => src.CollectionTerminal)
|
|
.Map(dest => dest.CONTRACTNO, src => src.ContractNo)
|
|
.Map(dest => dest.PREPARDAT, src => src.PrepardAT)
|
|
.Map(dest => dest.SHIP_AGENT, src => src.ShipAgent)
|
|
.Map(dest => dest.YARD, src => src.Yard)
|
|
.Map(dest => dest.YARD_CONTACT_USR, src => src.YardContactUserName)
|
|
.Map(dest => dest.YARD_CONTACT_TEL, src => src.YardContactTel)
|
|
.Map(dest => dest.FST_CUSTOMER_SER_USRNAME, src => src.FstCustomerSerUserName)
|
|
.Map(dest => dest.FST_CUSTOMER_SER_TEL, src => src.FstCustomerSerUserTel)
|
|
.Map(dest => dest.FST_CUSTOMER_SER_EMAIL, src => src.FstCustomerSerUserEmail)
|
|
.Map(dest => dest.REMARK1, src => src.Remark1)
|
|
.Map(dest => dest.CY_CUTOFF_TIME, src => src.CYCutoffTime)
|
|
.Map(dest => dest.FROM_EMAIL, src => src.FromEmail)
|
|
.Map(dest => dest.RECV_EMAIL, src => src.RecvEmail)
|
|
.Map(dest => dest.CARRIERID, src => src.CarrierId)
|
|
.Map(dest => dest.LANECODE, src => src.LaneCode)
|
|
.Map(dest => dest.LANENAME, src => src.LaneName)
|
|
.Map(dest => dest.CARRIAGE_TYPE, src => src.CarriageType)
|
|
.Map(dest => dest.CARRIAGE_TYPE_NAME, src => src.CarriageTypeName)
|
|
.Map(dest => dest.BOOKING_SLOT_TYPE, src => src.BookingSlotType)
|
|
.Map(dest => dest.BOOKING_SLOT_TYPE_NAME, src => src.BookingSlotTypeName)
|
|
.Map(dest => dest.CTN_STAT, src => src.CtnStat)
|
|
.Map(dest => dest.WEEK_AT, src => src.WeekAt)
|
|
.Map(dest => dest.DETENSION_FREE_DAYS, src => src.DetensionFreeDays)
|
|
.Map(dest => dest.SI_CUT_DATE, src => src.SICutDate)
|
|
.Map(dest => dest.MANIFEST_CUT_DATE, src => src.ManifestCutDate)
|
|
.Map(dest => dest.MDGF_CUT_DATE, src => src.MDGFCutDate)
|
|
.Map(dest => dest.TRANSFER_PORT_1, src => src.TransferPort1)
|
|
.Map(dest => dest.TRANSFER_PORT_2, src => src.TransferPort2)
|
|
.Map(dest => dest.SECOND_VESSEL, src => src.SecondVessel)
|
|
.Map(dest => dest.SECOND_VOYNO, src => src.SecondVoyno)
|
|
.Map(dest => dest.SECOND_ETD, src => src.SecondETD)
|
|
.Map(dest => dest.SECOND_ETA, src => src.SecondETA)
|
|
.Map(dest => dest.BOOKING_COMFIRM_DATE, src => src.BookingConfirmDate)
|
|
.Map(dest => dest.BATCH_NO, src => src.BatchNo)
|
|
.Map(dest => dest.PRICE_CALCULATION_DATE, src => src.PriceCalculationDate);
|
|
}
|
|
|
|
// BC子任务转前端Dto TaskManageOrderBCInfo, TaskBCInfo
|
|
{
|
|
TypeAdapterConfig<TaskBCInfo, TaskBCShowBaseDto>.NewConfig().TwoWays()
|
|
.Map(dest => dest.Id, src => src.Id)
|
|
.Map(dest => dest.TaskId, src => src.TASK_ID)
|
|
.Map(dest => dest.BusiType, src => src.BUSI_TYPE)
|
|
.Map(dest => dest.BookingParty, src => src.BOOKING_PARTY)
|
|
.Map(dest => dest.Shipper, src => src.SHIPPER)
|
|
.Map(dest => dest.Consignee, src => src.CONSIGNEE)
|
|
.Map(dest => dest.NotifyParty, src => src.NOTIFYPARTY)
|
|
.Map(dest => dest.BCModifyTimes, src => src.BC_MODIFY_TIMES)
|
|
.Map(dest => dest.BCModifyDate, src => src.BC_MODIFY_DATE)
|
|
.Map(dest => dest.MBLNo, src => src.MBL_NO)
|
|
.Map(dest => dest.TaskId, src => src.TASK_ID)
|
|
.Map(dest => dest.Vessel, src => src.VESSEL)
|
|
.Map(dest => dest.VoyNo, src => src.VOYNO)
|
|
.Map(dest => dest.Carrier, src => src.CARRIER)
|
|
.Map(dest => dest.PlaceReceipt, src => src.PLACERECEIPT)
|
|
.Map(dest => dest.Portload, src => src.PORTLOAD)
|
|
.Map(dest => dest.ClosingDate, src => src.CLOSING_DATE)
|
|
.Map(dest => dest.VGMCutoffTime, src => src.VGM_CUTOFF_TIME)
|
|
.Map(dest => dest.ETA, src => src.ETA)
|
|
.Map(dest => dest.ETD, src => src.ETD)
|
|
.Map(dest => dest.PODETA, src => src.POD_ETA)
|
|
.Map(dest => dest.CutSingleTime, src => src.CUT_SINGLE_TIME)
|
|
.Map(dest => dest.PortDischarge, src => src.PORTDISCHARGE)
|
|
.Map(dest => dest.PlaceDelivery, src => src.PLACEDELIVERY)
|
|
.Map(dest => dest.ShippingMethod, src => src.SHIPPING_METHOD)
|
|
.Map(dest => dest.Service, src => src.SERVICE)
|
|
.Map(dest => dest.PreTransMode, src => src.PRETRANS_MODE)
|
|
.Map(dest => dest.Description, src => src.DESCRIPTION)
|
|
.Map(dest => dest.IssuePlace, src => src.ISSUEPLACE)
|
|
.Map(dest => dest.CollectionTerminal, src => src.COLLECTION_TERMINAL)
|
|
.Map(dest => dest.ContractNo, src => src.CONTRACTNO)
|
|
.Map(dest => dest.PrepardAT, src => src.PREPARDAT)
|
|
.Map(dest => dest.ShipAgent, src => src.SHIP_AGENT)
|
|
.Map(dest => dest.Yard, src => src.YARD)
|
|
.Map(dest => dest.YardContactUserName, src => src.YARD_CONTACT_USR)
|
|
.Map(dest => dest.YardContactTel, src => src.YARD_CONTACT_TEL)
|
|
.Map(dest => dest.FstCustomerSerUserName, src => src.FST_CUSTOMER_SER_USRNAME)
|
|
.Map(dest => dest.FstCustomerSerUserTel, src => src.FST_CUSTOMER_SER_TEL)
|
|
.Map(dest => dest.FstCustomerSerUserEmail, src => src.FST_CUSTOMER_SER_EMAIL)
|
|
.Map(dest => dest.Remark1, src => src.REMARK1)
|
|
.Map(dest => dest.CYCutoffTime, src => src.CY_CUTOFF_TIME)
|
|
.Map(dest => dest.Status, src => src.STATUS)
|
|
.Map(dest => dest.FileMD5, src => src.FILE_MD5)
|
|
.Map(dest => dest.LastToBookingDate, src => src.LAST_TOBOOKING_DATE)
|
|
.Map(dest => dest.FromEmail, src => src.FROM_EMAIL)
|
|
.Map(dest => dest.RecvEmail, src => src.RECV_EMAIL)
|
|
.Map(dest => dest.BookingOrderId, src => src.BOOKING_ORDER_ID)
|
|
.Map(dest => dest.CarrierId, src => src.CARRIERID)
|
|
.Map(dest => dest.LaneCode, src => src.LANECODE)
|
|
.Map(dest => dest.LaneName, src => src.LANENAME)
|
|
.Map(dest => dest.CarriageType, src => src.CARRIAGE_TYPE)
|
|
.Map(dest => dest.CarriageTypeName, src => src.CARRIAGE_TYPE_NAME)
|
|
.Map(dest => dest.BookingSlotType, src => src.BOOKING_SLOT_TYPE)
|
|
.Map(dest => dest.BookingSlotTypeName, src => src.BOOKING_SLOT_TYPE_NAME)
|
|
.Map(dest => dest.CtnStat, src => src.CTN_STAT)
|
|
.Map(dest => dest.WeekAt, src => src.WEEK_AT)
|
|
.Map(dest => dest.DetensionFreeDays, src => src.DETENSION_FREE_DAYS)
|
|
.Map(dest => dest.SICutDate, src => src.SI_CUT_DATE)
|
|
.Map(dest => dest.ManifestCutDate, src => src.MANIFEST_CUT_DATE)
|
|
.Map(dest => dest.MDGFCutDate, src => src.MDGF_CUT_DATE)
|
|
.Map(dest => dest.TransferPort1, src => src.TRANSFER_PORT_1)
|
|
.Map(dest => dest.TransferPort2, src => src.TRANSFER_PORT_2)
|
|
.Map(dest => dest.SecondVessel, src => src.SECOND_VESSEL)
|
|
.Map(dest => dest.SecondVoyno, src => src.SECOND_VOYNO)
|
|
.Map(dest => dest.SecondETD, src => src.SECOND_ETD)
|
|
.Map(dest => dest.SecondETA, src => src.SECOND_ETA)
|
|
.Map(dest => dest.BookingSlotId, src => src.BOOKING_SLOT_ID)
|
|
.Map(dest => dest.BookingConfirmDate, src => src.BOOKING_COMFIRM_DATE)
|
|
.Map(dest => dest.BatchNo, src => src.BATCH_NO);
|
|
}
|
|
|
|
// BC子任务箱信息转前端Dto TaskBCCTNInfo, TaskBCCTNInfoDto
|
|
{
|
|
TypeAdapterConfig<TaskBCCTNInfo, TaskBCCTNInfoDto>.NewConfig().TwoWays()
|
|
.Map(dest => dest.CtnCode, src => src.CTNCODE)
|
|
.Map(dest => dest.CtnALL, src => src.CTNALL)
|
|
.Map(dest => dest.CTNNUM, src => src.CTNNUM)
|
|
.Map(dest => dest.PKGS, src => src.PKGS)
|
|
.Map(dest => dest.CBM, src => src.CBM)
|
|
.Map(dest => dest.KGS, src => src.KGS)
|
|
.Map(dest => dest.TareWeight, src => src.TAREWEIGHT)
|
|
.Map(dest => dest.IODGT, src => src.IODGT)
|
|
.Map(dest => dest.SpecialLoadingRequire, src => src.SPECIAL_LOADING_REQUIRE)
|
|
.Map(dest => dest.TakeCTNYard, src => src.TAKE_CTN_YARD)
|
|
.Map(dest => dest.TakeCTNTime, src => src.TAKE_CTN_TIME)
|
|
.Map(dest => dest.ReturnCTNYard, src => src.RETURN_CTN_YARD);
|
|
}
|
|
|
|
// 任务台文件信息转前端Dto TaskFileInfo, TaskFileDto
|
|
{
|
|
TypeAdapterConfig<TaskFileInfo, TaskFileDto>.NewConfig().TwoWays()
|
|
.Map(dest => dest.FilePath, src => src.FILE_PATH)
|
|
.Map(dest => dest.FileType, src => src.FILE_TYPE)
|
|
.Map(dest => dest.FileName, src => src.FILE_NAME)
|
|
.Map(dest => dest.FileCategory, src => src.FILE_CATEGORY)
|
|
.Map(dest => dest.FileCategoryName, src => src.FILE_CATEGORY_NAME);
|
|
}
|
|
|
|
// BC子任务箱信息转Entity TaskManageOrderBCCTNInfo, TaskBCCTNInfo
|
|
{
|
|
TypeAdapterConfig<TaskManageOrderBCCTNInfo, TaskBCCTNInfo>.NewConfig().TwoWays()
|
|
.Map(dest => dest.CTNCODE, src => src.CtnCode)
|
|
.Map(dest => dest.CTNALL, src => src.CtnALL)
|
|
.Map(dest => dest.CTNNUM, src => src.CTNNUM)
|
|
.Map(dest => dest.PKGS, src => src.PKGS)
|
|
.Map(dest => dest.CBM, src => src.CBM)
|
|
.Map(dest => dest.KGS, src => src.KGS)
|
|
.Map(dest => dest.TAREWEIGHT, src => src.TareWeight)
|
|
.Map(dest => dest.IODGT, src => src.IODGT)
|
|
.Map(dest => dest.SPECIAL_LOADING_REQUIRE, src => src.SpecialLoadingRequire)
|
|
.Map(dest => dest.TAKE_CTN_YARD, src => src.TakeCTNYard)
|
|
.Map(dest => dest.TAKE_CTN_TIME, src => src.TakeCTNTime)
|
|
.Map(dest => dest.RETURN_CTN_YARD, src => src.ReturnCTNYard);
|
|
}
|
|
|
|
{
|
|
TypeAdapterConfig<TaskCutDateChangeDetailInfo, TaskCutDateChangeShowDto>.NewConfig().TwoWays()
|
|
.Map(dest => dest.MBLNo, src => src.MBL_NO)
|
|
.Map(dest => dest.Vessel, src => src.VESSEL)
|
|
.Map(dest => dest.VoyNo, src => src.VOYNO)
|
|
.Map(dest => dest.SICutDate, src => src.SI_CUTOFF)
|
|
.Map(dest => dest.SICutDateTxt, src => src.SI_CUTOFF_TXT)
|
|
.Map(dest => dest.CYOpenDate, src => src.CY_OPEN)
|
|
.Map(dest => dest.CYOpenDateTxt, src => src.CY_OPEN_TXT)
|
|
.Map(dest => dest.CYCutoffTime, src => src.CY_CUTOFF)
|
|
.Map(dest => dest.CYCutoffTimeTxt, src => src.CY_CUTOFF_TXT)
|
|
.Map(dest => dest.ManifestCutDate, src => src.MANIFEST_CUT)
|
|
.Map(dest => dest.ManifestCutDateTxt, src => src.MANIFEST_CUT_TXT)
|
|
.Map(dest => dest.MDGFCutDate, src => src.MDGF_CUT)
|
|
.Map(dest => dest.MDGFCutDateTxt, src => src.MDGF_CUT_TXT)
|
|
.Map(dest => dest.VGMCutoffTime, src => src.VGM_CUT)
|
|
.Map(dest => dest.VGMCutoffTimeTxt, src => src.VGM_CUT_TXT)
|
|
.Map(dest => dest.ClosingDate, src => src.CLOSING_DATE)
|
|
.Map(dest => dest.ClosingDateTxt, src => src.CLOSING_DATE_TXT)
|
|
.Map(dest => dest.ContaNo, src => src.CONTA_NO)
|
|
.Map(dest => dest.LoadPort, src => src.LOAD_PORT)
|
|
.Map(dest => dest.ETB, src => src.ETB)
|
|
.Map(dest => dest.ETD, src => src.ETD)
|
|
.Map(dest => dest.VoucherCutoffTime, src => src.VOUCHER_CUT_DATE);
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|