修改MSK SPOT

master
jianghaiqing 5 months ago
parent 1c0a9cab5d
commit 033689ec4b

@ -1324,11 +1324,11 @@ namespace Myshipping.Application.Service.BookingOrder
model.placeOfReceiptCountryName = selectedShipSchedule.originCountryName; model.placeOfReceiptCountryName = selectedShipSchedule.originCountryName;
model.placeOfReceiptRegionName = selectedShipSchedule.originRegionName; model.placeOfReceiptRegionName = selectedShipSchedule.originRegionName;
model.placeOfReceiptGeoId = selectedShipSchedule.originGeoId; model.carrierCollectionOriginGeoID = selectedShipSchedule.originGeoId;
model.placeOfDeliveryRegionName = selectedShipSchedule.destinationCountryName;
model.placeOfDeliveryCountryName = selectedShipSchedule.destinationCountryName; model.placeOfDeliveryCountryName = selectedShipSchedule.destinationCountryName;
model.placeOfReceiptRegionName = selectedShipSchedule.destinationGeoId; model.placeOfDeliveryRegionName = selectedShipSchedule.destinationRegionName;
model.carrierDeliveryDestinationGeoID = selectedShipSchedule.destinationGeoId;
} }
if (model.ctns != null && model.ctns.Count > 0) if (model.ctns != null && model.ctns.Count > 0)

@ -94,8 +94,8 @@ namespace Myshipping.Application
.Map(dest => dest.SHIP_RATE_TOTAL_CURRENCY, src => src.ShipRateTotalCurrency) .Map(dest => dest.SHIP_RATE_TOTAL_CURRENCY, src => src.ShipRateTotalCurrency)
.Map(dest => dest.SHIP_RATE_PID, src => src.PId) .Map(dest => dest.SHIP_RATE_PID, src => src.PId)
.Map(dest => dest.SHIP_RATE_MD5, src => src.MD5) .Map(dest => dest.SHIP_RATE_MD5, src => src.MD5)
.Map(dest => dest.PLACERECEIPT_GEO_ID, src => src.placeOfReceiptGeoId) .Map(dest => dest.PLACERECEIPT_GEO_ID, src => src.carrierCollectionOriginGeoID)
.Map(dest => dest.PLACEDELIVERY_GEO_ID, src => src.placeOfDeliveryGeoId); .Map(dest => dest.PLACEDELIVERY_GEO_ID, src => src.carrierDeliveryDestinationGeoID);
config.ForType<BookingDeliveryRecord, MSKSPOTBookingDto>() config.ForType<BookingDeliveryRecord, MSKSPOTBookingDto>()
.Map(dest => dest.id, src => src.Id) .Map(dest => dest.id, src => src.Id)
@ -169,8 +169,8 @@ namespace Myshipping.Application
.Map(dest => dest.MD5, src => src.SHIP_RATE_MD5) .Map(dest => dest.MD5, src => src.SHIP_RATE_MD5)
.Map(dest => dest.bookingChannelTypeName, src => src.BOOKING_CHANNEL_TYPE_NAME) .Map(dest => dest.bookingChannelTypeName, src => src.BOOKING_CHANNEL_TYPE_NAME)
.Map(dest => dest.bookingChannelType, src => src.BOOKING_CHANNEL_TYPE) .Map(dest => dest.bookingChannelType, src => src.BOOKING_CHANNEL_TYPE)
.Map(dest => dest.placeOfReceiptGeoId, src => src.PLACERECEIPT_GEO_ID) .Map(dest => dest.carrierCollectionOriginGeoID, src => src.PLACERECEIPT_GEO_ID)
.Map(dest => dest.placeOfDeliveryGeoId, src => src.PLACEDELIVERY_GEO_ID); .Map(dest => dest.carrierDeliveryDestinationGeoID, src => src.PLACEDELIVERY_GEO_ID);
config.ForType<MSKBookingCtnInfo, BookingDeliveryRecordCtn>() config.ForType<MSKBookingCtnInfo, BookingDeliveryRecordCtn>()

@ -404,12 +404,12 @@ namespace Myshipping.Application
/// <summary> /// <summary>
/// 收货地定位ID /// 收货地定位ID
/// </summary> /// </summary>
public string placeOfReceiptGeoId { get; set; } public string carrierCollectionOriginGeoID { get; set; }
/// <summary> /// <summary>
/// 交货地定位ID /// 交货地定位ID
/// </summary> /// </summary>
public string placeOfDeliveryGeoId { get; set; } public string carrierDeliveryDestinationGeoID { get; set; }
/// <summary> /// <summary>
/// 选择的船期详情 /// 选择的船期详情

@ -1914,6 +1914,14 @@ namespace Myshipping.Application
} }
#endregion #endregion
#region 黑名单
#endregion
#region 截单补料异常提醒
#endregion
#region 启运港箱使费通知
#endregion
if (info.Main.SerialMsgInfo != null) if (info.Main.SerialMsgInfo != null)
{ {

@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using MimeKit;
using ServiceProjectSyncWin; using ServiceProjectSyncWin;
using ServiceProjectSyncWin.Entities; using ServiceProjectSyncWin.Entities;
using SqlSugar; using SqlSugar;
@ -34,8 +35,8 @@ Console.WriteLine("开始准备同步历史服务状态数据");
var service1 = App.GetService<ISyncHisRecord>(); var service1 = App.GetService<ISyncHisRecord>();
//service1.SyncServiceProjectRecord(); //service1.SyncServiceProjectRecord();
service1.SyncServiceProjectRecord5(); //service1.SyncServiceProjectRecord5();
service1.SyncServiceProjectRecord6();
Console.ReadKey(); Console.ReadKey();
public interface ISyncHisRecord public interface ISyncHisRecord
@ -43,6 +44,8 @@ public interface ISyncHisRecord
void SyncServiceProjectRecord4(); void SyncServiceProjectRecord4();
void SyncServiceProjectRecord5(); void SyncServiceProjectRecord5();
void SyncServiceProjectRecord6();
//void SyncServiceProjectRecord2(); //void SyncServiceProjectRecord2();
//void SyncServiceProjectRecord3(); //void SyncServiceProjectRecord3();
@ -1270,6 +1273,32 @@ public class SyncHisRecord: ISyncHisRecord,ITransient
} }
} }
public void SyncServiceProjectRecord6()
{
string mailFilePath = "C:\\Users\\Administrator\\Desktop\\日志\\For Information - Shipment # 234581255.eml";
//读取邮件,解析邮件正文
MimeMessage mimeMsg = MimeMessage.Load(mailFilePath);
var strBody = mimeMsg.HtmlBody;
HtmlDocument html = new HtmlDocument();
html.LoadHtml(strBody);
//获取第一个font节点的内容
var baseNode = html.DocumentNode.SelectSingleNode("//font");
var s = baseNode.InnerText;
string billNo = string.Empty;
//提取单号
if(Regex.IsMatch(s,"(?<=订舱号)[a-zA-Z0-9]+"))
{
billNo = Regex.Match(s, "(?<=订舱号)[a-zA-Z0-9]+").Value;
}
}
private List<TransPlanHasChangeDto> GetChildList(HtmlNode node) private List<TransPlanHasChangeDto> GetChildList(HtmlNode node)
{ {
List<TransPlanHasChangeDto> list = new List<TransPlanHasChangeDto>(); List<TransPlanHasChangeDto> list = new List<TransPlanHasChangeDto>();

@ -10,6 +10,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Furion" Version="4.8.8.40" /> <PackageReference Include="Furion" Version="4.8.8.40" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.54" /> <PackageReference Include="HtmlAgilityPack" Version="1.11.54" />
<PackageReference Include="MailKit" Version="4.1.0" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.102" /> <PackageReference Include="SqlSugarCore" Version="5.1.4.102" />
</ItemGroup> </ItemGroup>

Loading…
Cancel
Save