|
|
|
@ -115,6 +115,8 @@ namespace Myshipping.Application
|
|
|
|
|
private readonly SqlSugarRepository<TaskPODDischargeGateoutFullInfo> _taskPODDischargeGateoutFullInfoRepository;
|
|
|
|
|
private readonly SqlSugarRepository<TaskPODDischargeGateoutFullDetailInfo> _taskPODDischargeGateoutFullDetailInfoRepository;
|
|
|
|
|
|
|
|
|
|
private readonly SqlSugarRepository<TaskCautionNoticeInfo> _taskCautionNoticeInfoRepository;
|
|
|
|
|
private readonly SqlSugarRepository<TaskCautionNoticeDetailInfo> _taskCautionNoticeDetailInfoRepository;
|
|
|
|
|
|
|
|
|
|
private readonly IDjyWebsiteAccountConfigService _webAccountConfig;
|
|
|
|
|
private readonly ISysCacheService _cache;
|
|
|
|
@ -176,6 +178,8 @@ namespace Myshipping.Application
|
|
|
|
|
SqlSugarRepository<TaskDraftInfo> taskDraftInfoRepository,
|
|
|
|
|
SqlSugarRepository<TaskPODDischargeGateoutFullInfo> taskPODDischargeGateoutFullInfoRepository,
|
|
|
|
|
SqlSugarRepository<TaskPODDischargeGateoutFullDetailInfo> taskPODDischargeGateoutFullDetailInfoRepository,
|
|
|
|
|
SqlSugarRepository<TaskCautionNoticeInfo> taskCautionNoticeInfoRepository,
|
|
|
|
|
SqlSugarRepository<TaskCautionNoticeDetailInfo> taskCautionNoticeDetailInfoRepository,
|
|
|
|
|
INamedServiceProvider<IBookingOrderService> namedBookingOrderServiceProvider,
|
|
|
|
|
IDjyWebsiteAccountConfigService webAccountConfig,
|
|
|
|
|
ISysCacheService cache,
|
|
|
|
@ -239,6 +243,9 @@ namespace Myshipping.Application
|
|
|
|
|
_taskPODDischargeGateoutFullDetailInfoRepository = taskPODDischargeGateoutFullDetailInfoRepository;
|
|
|
|
|
|
|
|
|
|
_namedBookingMSKAPIServiceProvider = namedBookingMSKAPIServiceProvider;
|
|
|
|
|
|
|
|
|
|
_taskCautionNoticeInfoRepository = taskCautionNoticeInfoRepository;
|
|
|
|
|
_taskCautionNoticeDetailInfoRepository = taskCautionNoticeDetailInfoRepository;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 创建任务
|
|
|
|
@ -1400,6 +1407,69 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 重要提醒
|
|
|
|
|
if (info.Main.TaskType == TaskBaseTypeEnum.CAUTION_NOTICE)
|
|
|
|
|
{
|
|
|
|
|
TaskCautionNoticeInfo taskCautionNoticeInfo = info.Main.CautionNoticeInfo.Adapt<TaskCautionNoticeInfo>();
|
|
|
|
|
|
|
|
|
|
taskCautionNoticeInfo.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
taskCautionNoticeInfo.TASK_ID = taskInfo.PK_ID;
|
|
|
|
|
|
|
|
|
|
taskCautionNoticeInfo.CreatedTime = taskInfo.CreatedTime;
|
|
|
|
|
taskCautionNoticeInfo.UpdatedTime = taskInfo.CreatedTime;
|
|
|
|
|
|
|
|
|
|
taskCautionNoticeInfo.CreatedUserId = taskInfo.CreatedUserId;
|
|
|
|
|
taskCautionNoticeInfo.CreatedUserName = taskInfo.CreatedUserName;
|
|
|
|
|
taskCautionNoticeInfo.TenantId = taskInfo.TenantId;
|
|
|
|
|
taskCautionNoticeInfo.TenantName = taskInfo.TenantName;
|
|
|
|
|
|
|
|
|
|
if (info.Main.CautionNoticeInfo.CautionNoticeType == CautionNoticeTaskEnum.WeekAt)
|
|
|
|
|
{
|
|
|
|
|
taskCautionNoticeInfo.IS_WEEK_DIFF = true;
|
|
|
|
|
}
|
|
|
|
|
else if (info.Main.CautionNoticeInfo.CautionNoticeType == CautionNoticeTaskEnum.PriceCalcDate)
|
|
|
|
|
{
|
|
|
|
|
taskCautionNoticeInfo.IS_PRICE_DATE_DIFF = true;
|
|
|
|
|
}
|
|
|
|
|
else if (info.Main.CautionNoticeInfo.CautionNoticeType == CautionNoticeTaskEnum.ChangeVessel)
|
|
|
|
|
{
|
|
|
|
|
taskCautionNoticeInfo.IS_VESSEL_CHANGE = true;
|
|
|
|
|
}
|
|
|
|
|
else if (info.Main.CautionNoticeInfo.CautionNoticeType == CautionNoticeTaskEnum.ChangeTransfer)
|
|
|
|
|
{
|
|
|
|
|
taskCautionNoticeInfo.IS_TRANSFER = true;
|
|
|
|
|
}
|
|
|
|
|
else if (info.Main.CautionNoticeInfo.CautionNoticeType == CautionNoticeTaskEnum.CutDateAdvanced)
|
|
|
|
|
{
|
|
|
|
|
taskCautionNoticeInfo.IS_CUT_DATE_ADVANCED = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
await _taskCautionNoticeInfoRepository.InsertAsync(taskCautionNoticeInfo);
|
|
|
|
|
|
|
|
|
|
//异步写入集装箱
|
|
|
|
|
info.Main.CautionNoticeInfo.NoticeList.ForEach(async notice =>
|
|
|
|
|
{
|
|
|
|
|
var noticeInfo = notice.Adapt<TaskCautionNoticeDetailInfo>();
|
|
|
|
|
|
|
|
|
|
noticeInfo.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
noticeInfo.P_ID = taskCautionNoticeInfo.PK_ID;
|
|
|
|
|
|
|
|
|
|
noticeInfo.CreatedTime = taskInfo.CreatedTime;
|
|
|
|
|
noticeInfo.UpdatedTime = taskInfo.CreatedTime;
|
|
|
|
|
|
|
|
|
|
noticeInfo.CreatedUserId = taskInfo.CreatedUserId;
|
|
|
|
|
noticeInfo.CreatedUserName = taskInfo.CreatedUserName;
|
|
|
|
|
noticeInfo.TenantId = taskInfo.TenantId;
|
|
|
|
|
noticeInfo.TenantName = taskInfo.TenantName;
|
|
|
|
|
|
|
|
|
|
noticeInfo.STATUS = TaskCautionNoticeStatusEnum.TEMP.ToString();
|
|
|
|
|
noticeInfo.STATUS_NAME = TaskCautionNoticeStatusEnum.TEMP.GetDescription();
|
|
|
|
|
|
|
|
|
|
await _taskCautionNoticeDetailInfoRepository.InsertAsync(noticeInfo);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
if (info.Main.SerialMsgInfo != null)
|
|
|
|
|
{
|
|
|
|
|
var storeInfo = new TaskStoreMsgInfo
|
|
|
|
|