From 96bfec130bd756f0e154449985a9360af30dfd1f Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Fri, 15 Mar 2024 11:20:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A9=AC=E5=A3=AB=E5=9F=BAAP?= =?UTF-8?q?I=E8=AE=A2=E8=88=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingOrder/BookingMSKAPIService.cs | 9 ++-- .../BookingOrder/Dto/BookingEDIMapper.cs | 48 +++++++++++++++++++ .../Service/BookingOrder/Dto/MSKBookingDto.cs | 15 ++++++ .../BookingOrder/IBookingMSKAPIService.cs | 2 +- 4 files changed, 69 insertions(+), 5 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingMSKAPIService.cs b/Myshipping.Application/Service/BookingOrder/BookingMSKAPIService.cs index 5fd74e57..0fcbe0e7 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingMSKAPIService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingMSKAPIService.cs @@ -960,9 +960,9 @@ namespace Myshipping.Application.Service.BookingOrder /// 马士基API订舱ID /// 返回详情 [HttpGet("/BookingMSKAPI/GetInfo")] - public async Task GetInfo(long id) + public async Task 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(); + model = entity.Adapt(); 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, diff --git a/Myshipping.Application/Service/BookingOrder/Dto/BookingEDIMapper.cs b/Myshipping.Application/Service/BookingOrder/Dto/BookingEDIMapper.cs index b44218cb..f45d7ab1 100644 --- a/Myshipping.Application/Service/BookingOrder/Dto/BookingEDIMapper.cs +++ b/Myshipping.Application/Service/BookingOrder/Dto/BookingEDIMapper.cs @@ -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() + .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() .Map(dest => dest.CTN_CODE, src => src.ctnCode) .Map(dest => dest.CTN_NUM, src => src.ctnNum) diff --git a/Myshipping.Application/Service/BookingOrder/Dto/MSKBookingDto.cs b/Myshipping.Application/Service/BookingOrder/Dto/MSKBookingDto.cs index f9e57d18..3ae26bb0 100644 --- a/Myshipping.Application/Service/BookingOrder/Dto/MSKBookingDto.cs +++ b/Myshipping.Application/Service/BookingOrder/Dto/MSKBookingDto.cs @@ -293,5 +293,20 @@ namespace Myshipping.Application /// 集装箱主键 /// public Nullable id { get; set; } + + /// + /// 对应船公司箱型 + /// + public string carrierCtnCode { get; set; } + + /// + /// 箱计量单位 + /// + public string stuffingMeasurementType { get; set; } + + /// + /// 重量或者体积的计量单位 + /// + public string stuffingMeasurementUnit { get; set; } } } diff --git a/Myshipping.Application/Service/BookingOrder/IBookingMSKAPIService.cs b/Myshipping.Application/Service/BookingOrder/IBookingMSKAPIService.cs index 7aa9d591..36e2bd49 100644 --- a/Myshipping.Application/Service/BookingOrder/IBookingMSKAPIService.cs +++ b/Myshipping.Application/Service/BookingOrder/IBookingMSKAPIService.cs @@ -50,7 +50,7 @@ namespace Myshipping.Application /// /// 马士基API订舱ID /// 返回详情 - Task GetInfo(long id); + Task GetInfo(long id); /// /// 保存