修改马士基API订舱

master
jianghaiqing 9 months ago
parent c81b5392f3
commit 96bfec130b

@ -960,9 +960,9 @@ namespace Myshipping.Application.Service.BookingOrder
/// <param name="id">马士基API订舱ID</param>
/// <returns>返回详情</returns>
[HttpGet("/BookingMSKAPI/GetInfo")]
public async Task<BookingDeliveryRecordDto> GetInfo(long id)
public async Task<MSKBookingDto> GetInfo(long id)
{
BookingDeliveryRecordDto model = null;
MSKBookingDto model = null;
var entity = await _bookingDeliveryRecordRep.AsQueryable()
.FirstAsync(a => a.Id == id);
@ -970,14 +970,15 @@ namespace Myshipping.Application.Service.BookingOrder
if(entity == null)
throw Oops.Oh($"获取马士基API订舱详情失败不存在或已作废");
model = entity.Adapt<BookingDeliveryRecordDto>();
model = entity.Adapt<MSKBookingDto>();
var ctnList = _bookingDeliveryRecordCtnRep.AsQueryable()
.Where(a => a.RECORD_ID == id && a.IsDeleted == false).ToList();
if (ctnList.Count > 0)
{
model.ctns = ctnList.Select(a => new BookingDeliveryRecordCtnDto {
model.ctns = ctnList.Select(a => new MSKBookingCtnInfo
{
id = a.Id,
ctnCode = a.CTN_CODE,
carrierCtnCode = a.CARRIER_CTN_CODE,

@ -139,6 +139,54 @@ namespace Myshipping.Application
.Map(dest => dest.PRICE_OWNER_REFERENCE_NAME, src => src.priceOwnerReferenceName)
.Map(dest => dest.IS_REEFER, src => src.isReefer);
config.ForType<BookingDeliveryRecord, MSKBookingDto>()
.Map(dest => dest.id, src => src.Id)
.Map(dest => dest.carrierId, src => src.CARRIERID)
.Map(dest => dest.priceReference, src => src.PRICE_REFERENCE)
.Map(dest => dest.productCode, src => src.PRODUCT_CODE)
.Map(dest => dest.sender, src => src.SENDER)
.Map(dest => dest.bookedByCompanyName, src => src.BOOKEDBY_COMPANY_NAME)
.Map(dest => dest.bookedByMaerskPartyCode, src => src.BOOKEDBY_COMPANY_PARTYCODE)
.Map(dest => dest.bookedByCompanyContactName, src => src.BOOKEDBY_COMPANY_CONTACT)
.Map(dest => dest.bookedByCompanyContactEmail, src => src.BOOKEDBY_COMPANY_CONTACT_EMAIL)
.Map(dest => dest.isBookingPartOwnPrice, src => src.IS_BOOKING_PART_OWN_PRICE)
.Map(dest => dest.priceOwnerCompanyName, src => src.PRICE_OWNER_COMPANY_NAME)
.Map(dest => dest.priceOwnerMaerskPartyCode, src => src.PRICE_OWNER_COMPANY_PARTYCODE)
.Map(dest => dest.priceOwnerContactName, src => src.PRICE_OWNER_COMPANY_CONTACT)
.Map(dest => dest.priceOwnerContactEmail, src => src.PRICE_OWNER_COMPANY_CONTACT_EMAIL)
.Map(dest => dest.carrierCode, src => src.CARRIER_CODE)
.Map(dest => dest.earliestDepartureDate, src => src.EARLIEST_DEPARTURE_DATE)
.Map(dest => dest.exportServiceMode, src => src.EXPORT_SERVICE_MODE)
.Map(dest => dest.importServiceMode, src => src.IMPORT_SERVICE_MODE)
.Map(dest => dest.placeOfReceiptCityName, src => src.PLACERECEIPT_CITY)
.Map(dest => dest.placeOfReceiptUnLocCode, src => src.PLACERECEIPT_UNLOC_CODE)
.Map(dest => dest.placeOfDeliveryCityName, src => src.PLACEDELIVERY_CITY)
.Map(dest => dest.placeOfDeliveryUnLocCode, src => src.PLACEDELIVERY_UNLOC_CODE)
.Map(dest => dest.originDepartureDateTimeLocal, src => src.ETD)
.Map(dest => dest.destinationArrivalDateTimeLocal, src => src.ETA)
.Map(dest => dest.vesselName, src => src.VESSEL)
.Map(dest => dest.carrierVesselCode, src => src.VESSEL_CODE)
.Map(dest => dest.exportVoyageNumber, src => src.VOYNO)
.Map(dest => dest.transportMode, src => src.TRANSPORT_MODE)
.Map(dest => dest.totalCargoWeight, src => src.TOTAL_CARGO_WEIGHT)
.Map(dest => dest.noOfProbes, src => src.NO_OF_PROBES)
.Map(dest => dest.temperature, src => src.TEMPSET)
.Map(dest => dest.ventilation, src => src.VENT)
.Map(dest => dest.humidity, src => src.HUMIDITY)
.Map(dest => dest.commodityCodeType, src => src.COMMODITY_CODE_TYPE)
.Map(dest => dest.commodityCode, src => src.GOODSCODE)
.Map(dest => dest.commodityName, src => src.GOODSNAME)
.Map(dest => dest.isReefer, src => src.IS_REEFER)
.Map(dest => dest.cargoType, src => src.CARGO_TYPE)
.Map(dest => dest.placeOfReceiptCountryCode, src => src.PLACERECEIPT_COUNTRY_CODE)
.Map(dest => dest.placeOfDeliveryCountryCode, src => src.PLACEDELIVERY_COUNTRY_CODE)
.Map(dest => dest.EstSailingDays, src => src.EST_SAILING_DAYS)
.Map(dest => dest.priceReferenceId, src => src.PRICE_REFERENCE_ID)
.Map(dest => dest.priceReferenceName, src => src.PRICE_REFERENCE_NAME)
.Map(dest => dest.priceOwnerReferenceId, src => src.PRICE_OWNER_REFERENCE_ID)
.Map(dest => dest.priceOwnerReference, src => src.PRICE_OWNER_REFERENCE)
.Map(dest => dest.priceOwnerReferenceName, src => src.PRICE_OWNER_REFERENCE_NAME);
config.ForType<MSKBookingCtnInfo, BookingDeliveryRecordCtn>()
.Map(dest => dest.CTN_CODE, src => src.ctnCode)
.Map(dest => dest.CTN_NUM, src => src.ctnNum)

@ -293,5 +293,20 @@ namespace Myshipping.Application
/// 集装箱主键
/// </summary>
public Nullable<long> id { get; set; }
/// <summary>
/// 对应船公司箱型
/// </summary>
public string carrierCtnCode { get; set; }
/// <summary>
/// 箱计量单位
/// </summary>
public string stuffingMeasurementType { get; set; }
/// <summary>
/// 重量或者体积的计量单位
/// </summary>
public string stuffingMeasurementUnit { get; set; }
}
}

@ -50,7 +50,7 @@ namespace Myshipping.Application
/// </summary>
/// <param name="id">马士基API订舱ID</param>
/// <returns>返回详情</returns>
Task<BookingDeliveryRecordDto> GetInfo(long id);
Task<MSKBookingDto> GetInfo(long id);
/// <summary>
/// 保存

Loading…
Cancel
Save