|
|
|
@ -127,6 +127,8 @@ namespace Myshipping.Application
|
|
|
|
|
private readonly SqlSugarRepository<TaskRouteChangeAdvisoryInfo> _taskRouteChangeAdvisoryInfoRepository;
|
|
|
|
|
private readonly SqlSugarRepository<TaskRouteChangeAdvisoryDetailInfo> _taskRouteChangeAdvisoryDetailInfoRepository;
|
|
|
|
|
|
|
|
|
|
private readonly SqlSugarRepository<TaskTransPlanHasChangeInfo> _taskTransPlanHasChangeInfoRepository;
|
|
|
|
|
private readonly SqlSugarRepository<TaskTransPlanHasChangeDetailInfo> _taskTransPlanHasChangeDetailInfoRepository;
|
|
|
|
|
|
|
|
|
|
private readonly IDjyWebsiteAccountConfigService _webAccountConfig;
|
|
|
|
|
private readonly ISysCacheService _cache;
|
|
|
|
@ -193,6 +195,8 @@ namespace Myshipping.Application
|
|
|
|
|
SqlSugarRepository<TaskCautionNoticeDetailInfo> taskCautionNoticeDetailInfoRepository,
|
|
|
|
|
SqlSugarRepository<TaskRouteChangeAdvisoryInfo> taskRouteChangeAdvisoryInfoRepository,
|
|
|
|
|
SqlSugarRepository<TaskRouteChangeAdvisoryDetailInfo> taskRouteChangeAdvisoryDetailInfoRepository,
|
|
|
|
|
SqlSugarRepository<TaskTransPlanHasChangeInfo> taskTransPlanHasChangeInfoRepository,
|
|
|
|
|
SqlSugarRepository<TaskTransPlanHasChangeDetailInfo> taskTransPlanHasChangeDetailInfoRepository,
|
|
|
|
|
INamedServiceProvider<IBookingOrderService> 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>();
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|