diff --git a/Myshipping.Application/Entity/TaskManagePlat/TaskTransPlanHasChangeDetailInfo.cs b/Myshipping.Application/Entity/TaskManagePlat/TaskTransPlanHasChangeDetailInfo.cs
index 1a0e4321..e8b7218c 100644
--- a/Myshipping.Application/Entity/TaskManagePlat/TaskTransPlanHasChangeDetailInfo.cs
+++ b/Myshipping.Application/Entity/TaskManagePlat/TaskTransPlanHasChangeDetailInfo.cs
@@ -15,6 +15,16 @@ namespace Myshipping.Application.Entity.TaskManagePlat
[Description("货物运输计划已变更明细")]
public class TaskTransPlanHasChangeDetailInfo : TaskManageDbEntity
{
+ ///
+ /// 父主键
+ ///
+ public string P_ID { get; set; }
+
+ ///
+ /// 顺序号
+ ///
+ public int SORT_NO { get; set; }
+
///
/// 计划方式 FROM-出运计划 TO-到达计划
///
@@ -69,5 +79,25 @@ namespace Myshipping.Application.Entity.TaskManagePlat
/// 船旗
///
public string SHIP_FLAG { get; set; }
+
+ ///
+ /// ETA(预计到港时间)
+ ///
+ public Nullable ETA { get; set; }
+
+ ///
+ /// ETD(预计离港时间)
+ ///
+ public Nullable ETD { get; set; }
+
+ ///
+ /// 集装箱号
+ ///
+ public string CONTA_NO { get; set; }
+
+ ///
+ /// 是否已弃用 true-已弃用 false-正使用
+ ///
+ public bool IS_REMOVED { get; set; }
}
}
diff --git a/Myshipping.Application/Enum/TaskBaseTypeEnum.cs b/Myshipping.Application/Enum/TaskBaseTypeEnum.cs
index 0a1167d7..04125005 100644
--- a/Myshipping.Application/Enum/TaskBaseTypeEnum.cs
+++ b/Myshipping.Application/Enum/TaskBaseTypeEnum.cs
@@ -181,5 +181,10 @@ namespace Myshipping.Application
///
[Description("装货港未提箱")]
POL_CTN_NOT_PICKUP,
+ ///
+ /// 运输计划已变更
+ ///
+ [Description("运输计划已变更")]
+ TRNAS_PLAN_HAS_CHANGE,
}
}
diff --git a/Myshipping.Application/Enum/TaskBusiTypeEnum.cs b/Myshipping.Application/Enum/TaskBusiTypeEnum.cs
index 7a10974f..09b424f7 100644
--- a/Myshipping.Application/Enum/TaskBusiTypeEnum.cs
+++ b/Myshipping.Application/Enum/TaskBusiTypeEnum.cs
@@ -200,5 +200,10 @@ namespace Myshipping.Application
///
[Description("航线截止时间调整")]
ROUTE_CUT_CHANGE,
+ ///
+ /// 运输计划已变更
+ ///
+ [Description("运输计划已变更")]
+ TRNAS_PLAN_HAS_CHANGE,
}
}
diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageMapper.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageMapper.cs
index 236fe9a3..5832915f 100644
--- a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageMapper.cs
+++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageMapper.cs
@@ -1224,6 +1224,27 @@ namespace Myshipping.Application
.Map(dest => dest.TruckName, src => src.TRUCK_NAME??"")
.Map(dest => dest.CustomerName, src => src.CUSTOMER_NAME??"")
.Map(dest => dest.NeedArriveTime, src => src.NeedArriveTime);
+
+
+ config.ForType()
+ .Map(dest => dest.BOOKING_NO, src => src.BookingNo)
+ .Map(dest => dest.MBL_NO, src => src.BillNo)
+ .Map(dest => dest.ORIG_MBL_NO, src => src.OrigBillNo)
+ .Map(dest => dest.CARRIER, src => src.Carrier)
+ .Map(dest => dest.CHANGE_REASON, src => src.ChangeReasonNotes)
+ .Map(dest => dest.PORTLOAD, src => src.PortLoad)
+ .Map(dest => dest.PORTLOAD_COUNTRY, src => src.PortLoadCountry)
+ .Map(dest => dest.PORTLOAD_TERMINAL, src => src.PortLoadTerminal)
+ .Map(dest => dest.PORTDISCHARGE, src => src.PortDischarge)
+ .Map(dest => dest.PORTDISCHARGE_COUNTRY, src => src.PortDischargeCountry)
+ .Map(dest => dest.PORTDISCHARGE_TERMINAL, src => src.PortDischargeTerminal)
+ .Map(dest => dest.VESSEL, src => src.Vessel)
+ .Map(dest => dest.VOYNO, src => src.Voyno)
+ .Map(dest => dest.SHIP_FLAG, src => src.ShipFlag)
+ .Map(dest => dest.ETD, src => src.ETD)
+ .Map(dest => dest.ETA, src => src.ETA);
+
+
}
}
}
diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderMessageMainInfo.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderMessageMainInfo.cs
index bc7078e0..b0b07037 100644
--- a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderMessageMainInfo.cs
+++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderMessageMainInfo.cs
@@ -254,5 +254,10 @@ namespace Myshipping.Application
/// 船舶相关截止时间的通知
///
public TaskManageOrderRouteChangeAdvisoryInfo RouteChangeAdvisoryInfo { get; set; }
+
+ ///
+ /// 货物运输计划已变更
+ ///
+ public TaskManageOrderTransportPlanHasChangeInfo TransportPlanHasChangeInfo { get; set; }
}
}
diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/TransPlanHasChange/TaskManageOrderTransportPlanHasChangeInfo.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/TransPlanHasChange/TaskManageOrderTransportPlanHasChangeInfo.cs
new file mode 100644
index 00000000..76a02c41
--- /dev/null
+++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/TransPlanHasChange/TaskManageOrderTransportPlanHasChangeInfo.cs
@@ -0,0 +1,218 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Myshipping.Application
+{
+ ///
+ /// 您的货物运输计划已变更
+ ///
+ public class TaskManageOrderTransportPlanHasChangeInfo
+ {
+ ///
+ /// 订舱编号
+ ///
+ public string BookingNo { get; set; }
+
+ ///
+ /// 提单号码
+ ///
+ public string BillNo { get; set; }
+
+ ///
+ /// 派生自原单号
+ ///
+ public string OrigBillNo { get; set; }
+
+ ///
+ /// 集装箱号列表
+ ///
+ public List ContaNoList { get; set; }
+
+ ///
+ /// 船公司代码
+ ///
+ public string Carrier { get; set; }
+
+ ///
+ /// 变更原因
+ ///
+ public string ChangeReasonNotes { get; set; }
+
+ ///
+ /// 装货港
+ ///
+ public string PortLoad { get; set; }
+
+ ///
+ /// 装货港国家
+ ///
+ public string PortLoadCountry { get; set; }
+
+ ///
+ /// 装货港码头
+ ///
+ public string PortLoadTerminal { get; set; }
+
+ ///
+ /// 卸货港
+ ///
+ public string PortDischarge { get; set; }
+
+ ///
+ /// 卸货港国家
+ ///
+ public string PortDischargeCountry { get; set; }
+
+ ///
+ /// 卸货港码头
+ ///
+ public string PortDischargeTerminal { get; set; }
+
+ ///
+ /// ETD
+ ///
+ public Nullable ETD { get; set; }
+
+ ///
+ /// ETA
+ ///
+ public Nullable ETA { get; set; }
+
+ ///
+ /// 船名
+ ///
+ public string Vessel { get; set; }
+
+ ///
+ /// 航次
+ ///
+ public string Voyno { get; set; }
+
+ ///
+ /// 船旗
+ ///
+ public string ShipFlag { get; set; }
+
+
+ ///
+ /// 出运计划
+ ///
+ public TaskManageOrderTransportPlanHasChangeDetailInfo From { get; set; }
+
+ ///
+ /// 到达计划
+ ///
+ public TaskManageOrderTransportPlanHasChangeDetailInfo To { get; set; }
+ }
+
+ ///
+ /// 您的货物运输计划已变更明细
+ ///
+ public class TaskManageOrderTransportPlanHasChangeDetailInfo
+ {
+ ///
+ /// 港口变更明细
+ ///
+ public List portList { get; set; }
+
+ ///
+ /// 日期变更明细(ETD或者ATD)
+ ///
+ public List dateList { get; set; }
+
+ ///
+ /// 船名航次变更
+ ///
+ public List vesselList { get; set; }
+ }
+
+ ///
+ /// 您的货物运输计划已变更-港口
+ ///
+ public class TaskManageOrderTransPlanHasChangePortInfo
+ {
+ ///
+ /// 顺序号
+ ///
+ public int Indx { get; set; }
+ ///
+ /// 港口名
+ ///
+ public string PortName { get; set; }
+
+ ///
+ /// 国家
+ ///
+ public string CountryCode { get; set; }
+
+ ///
+ /// 码头
+ ///
+ public string TerminalName { get; set; }
+
+ ///
+ /// 是否被作废掉了
+ ///
+ public bool IsRemoved { get; set; } = false;
+ }
+
+ ///
+ /// 您的货物运输计划已变更-日期
+ ///
+ public class TaskManageOrderTransPlanHasChangeDateInfo
+ {
+ ///
+ /// 顺序号
+ ///
+ public int Indx { get; set; }
+
+ ///
+ /// 提取日期文本
+ ///
+ public string OrigDateTxt { get; set; }
+
+ ///
+ /// 日期
+ ///
+ public DateTime DateVal { get; set; }
+
+ ///
+ /// 是否被作废掉了
+ ///
+ public bool IsRemoved { get; set; } = false;
+ }
+
+ ///
+ /// 您的货物运输计划已变更-船名航次
+ ///
+ public class TaskManageOrderTransPlanHasChangeVesselInfo
+ {
+ ///
+ /// 顺序号
+ ///
+ public int Indx { get; set; }
+
+ ///
+ /// 船名
+ ///
+ public string Vessel { get; set; }
+
+ ///
+ /// 航次
+ ///
+ public string Voyno { get; set; }
+
+ ///
+ /// 船旗
+ ///
+ public string Flag { get; set; }
+
+ ///
+ /// 是否被作废掉了
+ ///
+ public bool IsRemoved { get; set; } = false;
+ }
+}
diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs
index ea332cfd..b4930842 100644
--- a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs
+++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs
@@ -127,6 +127,8 @@ namespace Myshipping.Application
private readonly SqlSugarRepository _taskRouteChangeAdvisoryInfoRepository;
private readonly SqlSugarRepository _taskRouteChangeAdvisoryDetailInfoRepository;
+ private readonly SqlSugarRepository _taskTransPlanHasChangeInfoRepository;
+ private readonly SqlSugarRepository _taskTransPlanHasChangeDetailInfoRepository;
private readonly IDjyWebsiteAccountConfigService _webAccountConfig;
private readonly ISysCacheService _cache;
@@ -193,6 +195,8 @@ namespace Myshipping.Application
SqlSugarRepository taskCautionNoticeDetailInfoRepository,
SqlSugarRepository taskRouteChangeAdvisoryInfoRepository,
SqlSugarRepository taskRouteChangeAdvisoryDetailInfoRepository,
+ SqlSugarRepository taskTransPlanHasChangeInfoRepository,
+ SqlSugarRepository taskTransPlanHasChangeDetailInfoRepository,
INamedServiceProvider namedBookingOrderServiceProvider,
IDjyWebsiteAccountConfigService webAccountConfig,
ISysCacheService cache,
@@ -264,6 +268,9 @@ namespace Myshipping.Application
_taskRouteChangeAdvisoryInfoRepository = taskRouteChangeAdvisoryInfoRepository;
_taskRouteChangeAdvisoryDetailInfoRepository = taskRouteChangeAdvisoryDetailInfoRepository;
+
+ _taskTransPlanHasChangeInfoRepository = taskTransPlanHasChangeInfoRepository;
+ _taskTransPlanHasChangeDetailInfoRepository = taskTransPlanHasChangeDetailInfoRepository;
}
#region 创建任务
@@ -1552,6 +1559,248 @@ namespace Myshipping.Application
}
#endregion
+ #region 货物运输计划已变更
+ if (info.Main.TaskType == TaskBaseTypeEnum.TRNAS_PLAN_HAS_CHANGE)
+ {
+ TaskTransPlanHasChangeInfo taskTransPlanHasChangeInfo = info.Main.TransportPlanHasChangeInfo.Adapt();
+
+ taskTransPlanHasChangeInfo.PK_ID = IDGen.NextID().ToString();
+ taskTransPlanHasChangeInfo.TASK_ID = taskInfo.PK_ID;
+
+ taskTransPlanHasChangeInfo.CreatedTime = taskInfo.CreatedTime;
+ taskTransPlanHasChangeInfo.UpdatedTime = taskInfo.CreatedTime;
+
+ taskTransPlanHasChangeInfo.CreatedUserId = taskInfo.CreatedUserId;
+ taskTransPlanHasChangeInfo.CreatedUserName = taskInfo.CreatedUserName;
+ taskTransPlanHasChangeInfo.TenantId = taskInfo.TenantId;
+ taskTransPlanHasChangeInfo.TenantName = taskInfo.TenantName;
+
+ await _taskTransPlanHasChangeInfoRepository.InsertAsync(taskTransPlanHasChangeInfo);
+
+ if(info.Main.TransportPlanHasChangeInfo.From != null)
+ {
+ if(info.Main.TransportPlanHasChangeInfo.From.portList != null
+ && info.Main.TransportPlanHasChangeInfo.From.portList.Count > 0)
+ {
+ info.Main.TransportPlanHasChangeInfo.From.portList.ForEach(p => {
+ TaskTransPlanHasChangeDetailInfo detailInfo = new TaskTransPlanHasChangeDetailInfo {
+ PORTLOAD = p.PortName,
+ PORTLOAD_COUNTRY = p.CountryCode,
+ PORTLOAD_TERMINAL = p.TerminalName,
+ SORT_NO = p.Indx,
+ IS_REMOVED = p.IsRemoved
+ };
+
+ detailInfo.PK_ID = IDGen.NextID().ToString();
+ detailInfo.P_ID = taskTransPlanHasChangeInfo.PK_ID;
+
+ detailInfo.PLAN_TYPE = "FROM";
+ detailInfo.COLUMN_TYPE = "PORT";
+
+ detailInfo.CreatedTime = taskInfo.CreatedTime;
+ detailInfo.UpdatedTime = taskInfo.CreatedTime;
+
+ detailInfo.CreatedUserId = taskInfo.CreatedUserId;
+ detailInfo.CreatedUserName = taskInfo.CreatedUserName;
+ detailInfo.TenantId = taskInfo.TenantId;
+ detailInfo.TenantName = taskInfo.TenantName;
+
+ _taskTransPlanHasChangeDetailInfoRepository.Insert(detailInfo);
+
+ });
+ }
+
+ if (info.Main.TransportPlanHasChangeInfo.From.dateList != null
+ && info.Main.TransportPlanHasChangeInfo.From.dateList.Count > 0)
+ {
+ info.Main.TransportPlanHasChangeInfo.From.dateList.ForEach(p => {
+ TaskTransPlanHasChangeDetailInfo detailInfo = new TaskTransPlanHasChangeDetailInfo
+ {
+ ETD = p.DateVal,
+ SORT_NO = p.Indx,
+ IS_REMOVED = p.IsRemoved
+ };
+
+ detailInfo.PK_ID = IDGen.NextID().ToString();
+ detailInfo.P_ID = taskTransPlanHasChangeInfo.PK_ID;
+
+ detailInfo.PLAN_TYPE = "FROM";
+ detailInfo.COLUMN_TYPE = "EATD";
+
+ detailInfo.CreatedTime = taskInfo.CreatedTime;
+ detailInfo.UpdatedTime = taskInfo.CreatedTime;
+
+ detailInfo.CreatedUserId = taskInfo.CreatedUserId;
+ detailInfo.CreatedUserName = taskInfo.CreatedUserName;
+ detailInfo.TenantId = taskInfo.TenantId;
+ detailInfo.TenantName = taskInfo.TenantName;
+
+ _taskTransPlanHasChangeDetailInfoRepository.Insert(detailInfo);
+
+ });
+ }
+
+ if (info.Main.TransportPlanHasChangeInfo.From.vesselList != null
+ && info.Main.TransportPlanHasChangeInfo.From.vesselList.Count > 0)
+ {
+ info.Main.TransportPlanHasChangeInfo.From.vesselList.ForEach(p => {
+ TaskTransPlanHasChangeDetailInfo detailInfo = new TaskTransPlanHasChangeDetailInfo
+ {
+ VESSEL = p.Vessel,
+ VOYNO = p.Voyno,
+ SHIP_FLAG = p.Flag,
+ SORT_NO = p.Indx,
+ IS_REMOVED = p.IsRemoved
+ };
+
+ detailInfo.PK_ID = IDGen.NextID().ToString();
+ detailInfo.P_ID = taskTransPlanHasChangeInfo.PK_ID;
+
+ detailInfo.PLAN_TYPE = "FROM";
+ detailInfo.COLUMN_TYPE = "VESSEL";
+
+ detailInfo.CreatedTime = taskInfo.CreatedTime;
+ detailInfo.UpdatedTime = taskInfo.CreatedTime;
+
+ detailInfo.CreatedUserId = taskInfo.CreatedUserId;
+ detailInfo.CreatedUserName = taskInfo.CreatedUserName;
+ detailInfo.TenantId = taskInfo.TenantId;
+ detailInfo.TenantName = taskInfo.TenantName;
+
+ _taskTransPlanHasChangeDetailInfoRepository.Insert(detailInfo);
+
+ });
+ }
+ }
+
+ if (info.Main.TransportPlanHasChangeInfo.To != null)
+ {
+ if (info.Main.TransportPlanHasChangeInfo.To.portList != null
+ && info.Main.TransportPlanHasChangeInfo.To.portList.Count > 0)
+ {
+ info.Main.TransportPlanHasChangeInfo.To.portList.ForEach(p => {
+ TaskTransPlanHasChangeDetailInfo detailInfo = new TaskTransPlanHasChangeDetailInfo
+ {
+ PORTDISCHARGE = p.PortName,
+ PORTDISCHARGE_COUNTRY = p.CountryCode,
+ PORTDISCHARGE_TERMINAL = p.TerminalName,
+ SORT_NO = p.Indx,
+ IS_REMOVED = p.IsRemoved
+ };
+
+ detailInfo.PK_ID = IDGen.NextID().ToString();
+ detailInfo.P_ID = taskTransPlanHasChangeInfo.PK_ID;
+
+ detailInfo.PLAN_TYPE = "TO";
+ detailInfo.COLUMN_TYPE = "PORT";
+
+ detailInfo.CreatedTime = taskInfo.CreatedTime;
+ detailInfo.UpdatedTime = taskInfo.CreatedTime;
+
+ detailInfo.CreatedUserId = taskInfo.CreatedUserId;
+ detailInfo.CreatedUserName = taskInfo.CreatedUserName;
+ detailInfo.TenantId = taskInfo.TenantId;
+ detailInfo.TenantName = taskInfo.TenantName;
+
+ _taskTransPlanHasChangeDetailInfoRepository.Insert(detailInfo);
+
+ });
+ }
+
+ if (info.Main.TransportPlanHasChangeInfo.To.dateList != null
+ && info.Main.TransportPlanHasChangeInfo.To.dateList.Count > 0)
+ {
+ info.Main.TransportPlanHasChangeInfo.To.dateList.ForEach(p => {
+ TaskTransPlanHasChangeDetailInfo detailInfo = new TaskTransPlanHasChangeDetailInfo
+ {
+ ETA = p.DateVal,
+ SORT_NO = p.Indx,
+ IS_REMOVED = p.IsRemoved
+ };
+
+ detailInfo.PK_ID = IDGen.NextID().ToString();
+ detailInfo.P_ID = taskTransPlanHasChangeInfo.PK_ID;
+
+ detailInfo.PLAN_TYPE = "TO";
+ detailInfo.COLUMN_TYPE = "EATD";
+
+ detailInfo.CreatedTime = taskInfo.CreatedTime;
+ detailInfo.UpdatedTime = taskInfo.CreatedTime;
+
+ detailInfo.CreatedUserId = taskInfo.CreatedUserId;
+ detailInfo.CreatedUserName = taskInfo.CreatedUserName;
+ detailInfo.TenantId = taskInfo.TenantId;
+ detailInfo.TenantName = taskInfo.TenantName;
+
+ _taskTransPlanHasChangeDetailInfoRepository.Insert(detailInfo);
+
+ });
+ }
+
+ if (info.Main.TransportPlanHasChangeInfo.To.vesselList != null
+ && info.Main.TransportPlanHasChangeInfo.To.vesselList.Count > 0)
+ {
+ info.Main.TransportPlanHasChangeInfo.To.vesselList.ForEach(p => {
+ TaskTransPlanHasChangeDetailInfo detailInfo = new TaskTransPlanHasChangeDetailInfo
+ {
+ VESSEL = p.Vessel,
+ VOYNO = p.Voyno,
+ SHIP_FLAG = p.Flag,
+ SORT_NO = p.Indx,
+ IS_REMOVED = p.IsRemoved
+ };
+
+ detailInfo.PK_ID = IDGen.NextID().ToString();
+ detailInfo.P_ID = taskTransPlanHasChangeInfo.PK_ID;
+
+ detailInfo.PLAN_TYPE = "TO";
+ detailInfo.COLUMN_TYPE = "VESSEL";
+
+ detailInfo.CreatedTime = taskInfo.CreatedTime;
+ detailInfo.UpdatedTime = taskInfo.CreatedTime;
+
+ detailInfo.CreatedUserId = taskInfo.CreatedUserId;
+ detailInfo.CreatedUserName = taskInfo.CreatedUserName;
+ detailInfo.TenantId = taskInfo.TenantId;
+ detailInfo.TenantName = taskInfo.TenantName;
+
+ _taskTransPlanHasChangeDetailInfoRepository.Insert(detailInfo);
+
+ });
+ }
+ }
+
+
+ if (info.Main.TransportPlanHasChangeInfo.ContaNoList != null && info.Main.TransportPlanHasChangeInfo.ContaNoList.Count > 0)
+ {
+ info.Main.TransportPlanHasChangeInfo.ContaNoList.ForEach(p =>
+ {
+ TaskTransPlanHasChangeDetailInfo detailInfo = new TaskTransPlanHasChangeDetailInfo
+ {
+ CONTA_NO = p,
+ };
+
+ detailInfo.PK_ID = IDGen.NextID().ToString();
+ detailInfo.P_ID = taskTransPlanHasChangeInfo.PK_ID;
+
+ detailInfo.COLUMN_TYPE = "CTN";
+
+ detailInfo.CreatedTime = taskInfo.CreatedTime;
+ detailInfo.UpdatedTime = taskInfo.CreatedTime;
+
+ detailInfo.CreatedUserId = taskInfo.CreatedUserId;
+ detailInfo.CreatedUserName = taskInfo.CreatedUserName;
+ detailInfo.TenantId = taskInfo.TenantId;
+ detailInfo.TenantName = taskInfo.TenantName;
+
+ _taskTransPlanHasChangeDetailInfoRepository.Insert(detailInfo);
+
+ });
+ }
+ }
+ #endregion
+
+
if (info.Main.SerialMsgInfo != null)
{
var storeInfo = new TaskStoreMsgInfo