修改运踪查询

master
jianghaiqing 6 months ago
parent 133cb7b5f7
commit cb023b9689

@ -16,7 +16,7 @@ namespace Myshipping.Application
/// <summary>
/// 回执消息
/// </summary>
public string message { get; set; }
public string msg { get; set; }
/// <summary>
/// 查询详情列表

@ -318,9 +318,9 @@ namespace Myshipping.Application
}
else
{
_logger.LogInformation($"{JSON.Serialize(queryDto)} 查询失败,{queryRlt.message}");
_logger.LogInformation($"{JSON.Serialize(queryDto)} 查询失败,{queryRlt.msg}");
throw Oops.Oh(result.resultMessage.Contains("官网查询无数据") ? "无查询结果" : "查询失败");
throw Oops.Oh((result != null && result.resultMessage != null && result.resultMessage.Contains("官网查询无数据")) ? "无查询结果" : queryRlt.msg);
}
return result;

@ -2536,6 +2536,38 @@ namespace Myshipping.Application
if (bcOrder == null)
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)
{
var server = _namedBookingSlotServiceProvider.GetService<ITransient>(nameof(BookingSlotService));
@ -2603,6 +2635,8 @@ namespace Myshipping.Application
}
else
{
_logger.LogInformation($"taskPKId={taskPKId} 无法获取舱位信息");
throw Oops.Oh($"无法获取舱位信息");
}
}
@ -2698,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表示可以自动发送
if (paramConfig != null && paramConfig.ParaValue.Equals("ENABLE", StringComparison.OrdinalIgnoreCase))
@ -2765,6 +2771,9 @@ namespace Myshipping.Application
result.succ = false;
result.msg = $"处理异常,原因:{ex.Message}";
_logger.LogInformation($"taskPKId={taskPKId} 处理异常,原因:{ex.Message}");
//new EmailNoticeHelper().SendEmailNotice($"taskPKId={taskPKId} 转发通知邮件失败", $"taskPKId={taskPKId} 转发通知邮件失败,原因:{ex.Message}", App.Configuration["EmailNoticeDefaultUser"].GetUserEmailList());

Loading…
Cancel
Save