|
|
@ -2536,6 +2536,38 @@ namespace Myshipping.Application
|
|
|
|
if (bcOrder == null)
|
|
|
|
if (bcOrder == null)
|
|
|
|
throw Oops.Oh($"BC任务获取失败,不存在或已作废");
|
|
|
|
throw Oops.Oh($"BC任务获取失败,不存在或已作废");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DjyTenantParamValueOutput paramConfig = null;
|
|
|
|
|
|
|
|
DjyTenantParamValueOutput dingdingConfig = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var paramList = _djyTenantParamService.GetParaCodeWithValue(new[] { CONST_AMENDMENT_DEFAULT_PARAM,
|
|
|
|
|
|
|
|
CONST_CANCELLATION_DEFAULT_PARAM,
|
|
|
|
|
|
|
|
CONST_AMENDMENT_DING_DEFAULT_PARAM,
|
|
|
|
|
|
|
|
CONST_CANCELLATION_DING_DEFAULT_PARAM }).GetAwaiter().GetResult();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (baseTask.TASK_TYPE == TaskBaseTypeEnum.BC_MODIFY.ToString())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (paramList != null && paramList.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
paramConfig = paramList.FirstOrDefault(a => a.ParaCode.Equals(CONST_AMENDMENT_DEFAULT_PARAM, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dingdingConfig = paramList.FirstOrDefault(a => a.ParaCode.Equals(CONST_AMENDMENT_DING_DEFAULT_PARAM, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (baseTask.TASK_TYPE == TaskBaseTypeEnum.CANCELLATION.ToString())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (paramList != null && paramList.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
paramConfig = paramList.FirstOrDefault(a => a.ParaCode.Equals(CONST_CANCELLATION_DEFAULT_PARAM, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dingdingConfig = paramList.FirstOrDefault(a => a.ParaCode.Equals(CONST_CANCELLATION_DING_DEFAULT_PARAM, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"taskPKId={taskPKId} 判断是否默认转发邮件 paramConfig={JSON.Serialize(paramConfig)}");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!bcOrder.BOOKING_SLOT_ID.HasValue || bcOrder.BOOKING_SLOT_ID.Value == 0)
|
|
|
|
if (!bcOrder.BOOKING_SLOT_ID.HasValue || bcOrder.BOOKING_SLOT_ID.Value == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var server = _namedBookingSlotServiceProvider.GetService<ITransient>(nameof(BookingSlotService));
|
|
|
|
var server = _namedBookingSlotServiceProvider.GetService<ITransient>(nameof(BookingSlotService));
|
|
|
@ -2603,6 +2635,8 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
_logger.LogInformation($"taskPKId={taskPKId} 无法获取舱位信息");
|
|
|
|
|
|
|
|
|
|
|
|
throw Oops.Oh($"无法获取舱位信息");
|
|
|
|
throw Oops.Oh($"无法获取舱位信息");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -2632,6 +2666,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
if (bcOrder.BOOKING_ORDER_ID != null && bcOrder.BOOKING_ORDER_ID.HasValue && bcOrder.BOOKING_ORDER_ID.Value > 0)
|
|
|
|
if (bcOrder.BOOKING_ORDER_ID != null && bcOrder.BOOKING_ORDER_ID.HasValue && bcOrder.BOOKING_ORDER_ID.Value > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
/*
|
|
|
|
SaveBookingOrderInput bkModel = new SaveBookingOrderInput
|
|
|
|
SaveBookingOrderInput bkModel = new SaveBookingOrderInput
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MBLNO = bcOrder.MBL_NO.ToUpper().Trim(),
|
|
|
|
MBLNO = bcOrder.MBL_NO.ToUpper().Trim(),
|
|
|
@ -2689,7 +2724,7 @@ namespace Myshipping.Application
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.LogInformation($"taskPKId={taskPKId} 更新订舱详情失败没有对应舱位ID");
|
|
|
|
_logger.LogInformation($"taskPKId={taskPKId} 更新订舱详情失败没有对应舱位ID");
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -2697,35 +2732,7 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DjyTenantParamValueOutput paramConfig = null;
|
|
|
|
|
|
|
|
DjyTenantParamValueOutput dingdingConfig = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var paramList = _djyTenantParamService.GetParaCodeWithValue(new[] { CONST_AMENDMENT_DEFAULT_PARAM,
|
|
|
|
|
|
|
|
CONST_CANCELLATION_DEFAULT_PARAM,
|
|
|
|
|
|
|
|
CONST_AMENDMENT_DING_DEFAULT_PARAM,
|
|
|
|
|
|
|
|
CONST_CANCELLATION_DING_DEFAULT_PARAM }).GetAwaiter().GetResult();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (baseTask.TASK_TYPE == TaskBaseTypeEnum.BC_MODIFY.ToString())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (paramList != null && paramList.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
paramConfig = paramList.FirstOrDefault(a => a.ParaCode.Equals(CONST_AMENDMENT_DEFAULT_PARAM, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dingdingConfig = paramList.FirstOrDefault(a => a.ParaCode.Equals(CONST_AMENDMENT_DING_DEFAULT_PARAM, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (baseTask.TASK_TYPE == TaskBaseTypeEnum.CANCELLATION.ToString())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (paramList != null && paramList.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
paramConfig = paramList.FirstOrDefault(a => a.ParaCode.Equals(CONST_CANCELLATION_DEFAULT_PARAM, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dingdingConfig = paramList.FirstOrDefault(a => a.ParaCode.Equals(CONST_CANCELLATION_DING_DEFAULT_PARAM, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"taskPKId={taskPKId} 判断是否默认转发邮件 paramConfig={JSON.Serialize(paramConfig)}");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//如果值是ENABLE表示可以自动发送
|
|
|
|
//如果值是ENABLE表示可以自动发送
|
|
|
|
if (paramConfig != null && paramConfig.ParaValue.Equals("ENABLE", StringComparison.OrdinalIgnoreCase))
|
|
|
|
if (paramConfig != null && paramConfig.ParaValue.Equals("ENABLE", StringComparison.OrdinalIgnoreCase))
|
|
|
@ -2764,6 +2771,9 @@ namespace Myshipping.Application
|
|
|
|
result.succ = false;
|
|
|
|
result.succ = false;
|
|
|
|
result.msg = $"处理异常,原因:{ex.Message}";
|
|
|
|
result.msg = $"处理异常,原因:{ex.Message}";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"taskPKId={taskPKId} 处理异常,原因:{ex.Message}");
|
|
|
|
|
|
|
|
|
|
|
|
//new EmailNoticeHelper().SendEmailNotice($"taskPKId={taskPKId} 转发通知邮件失败", $"taskPKId={taskPKId} 转发通知邮件失败,原因:{ex.Message}", App.Configuration["EmailNoticeDefaultUser"].GetUserEmailList());
|
|
|
|
//new EmailNoticeHelper().SendEmailNotice($"taskPKId={taskPKId} 转发通知邮件失败", $"taskPKId={taskPKId} 转发通知邮件失败,原因:{ex.Message}", App.Configuration["EmailNoticeDefaultUser"].GetUserEmailList());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|