|
|
@ -2196,7 +2196,12 @@ namespace Myshipping.Application
|
|
|
|
TimeSpan ts = eDate.Subtract(bDate);
|
|
|
|
TimeSpan ts = eDate.Subtract(bDate);
|
|
|
|
var timeDiff = ts.TotalMilliseconds;
|
|
|
|
var timeDiff = ts.TotalMilliseconds;
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation("批次={no} 结束发送,耗时:{timeDiff}ms. 结果{msg}", batchNo, timeDiff, sendStatus ? "成功" : "失败");
|
|
|
|
_logger.LogInformation("批次={no} 结束发送,耗时:{timeDiff}ms. 结果{msg}", batchNo, timeDiff, sendStatus.succ ? "成功" : "失败");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!sendStatus.succ)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw Oops.Bah($"FTP发送失败,原因:{sendStatus.msg}");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2210,9 +2215,11 @@ namespace Myshipping.Application
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="filePath">EDI文件路径</param>
|
|
|
|
/// <param name="filePath">EDI文件路径</param>
|
|
|
|
/// <param name="ediCfg">FTP配置</param>
|
|
|
|
/// <param name="ediCfg">FTP配置</param>
|
|
|
|
/// <returns>true-成功 false-失败</returns>
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
private async Task<bool> InnerSendBookingOrClosingEDIToFTP(string filePath, DjyEdiSetting ediCfg)
|
|
|
|
private async Task<CommonWebApiResult> InnerSendBookingOrClosingEDIToFTP(string filePath, DjyEdiSetting ediCfg)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
CommonWebApiResult result = new CommonWebApiResult { succ = true };
|
|
|
|
|
|
|
|
|
|
|
|
CancellationTokenSource cts = new CancellationTokenSource();
|
|
|
|
CancellationTokenSource cts = new CancellationTokenSource();
|
|
|
|
|
|
|
|
|
|
|
|
//后续发送
|
|
|
|
//后续发送
|
|
|
@ -2254,10 +2261,11 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
if (jobjRetn.GetStringValue("status") != "1")
|
|
|
|
if (jobjRetn.GetStringValue("status") != "1")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
result.succ = false;
|
|
|
|
|
|
|
|
result.msg = jobjRetn.GetStringValue("message");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|