diff --git a/Myshipping.Application/Myshipping.Application.xml b/Myshipping.Application/Myshipping.Application.xml
index 4320f11c..1f69d345 100644
--- a/Myshipping.Application/Myshipping.Application.xml
+++ b/Myshipping.Application/Myshipping.Application.xml
@@ -4923,7 +4923,7 @@
EDI文件路径
FTP配置
- true-成功 false-失败
+ 返回回执
diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
index 8510e2c7..f5f43719 100644
--- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
+++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
@@ -2196,7 +2196,12 @@ namespace Myshipping.Application
TimeSpan ts = eDate.Subtract(bDate);
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
///
/// EDI文件路径
/// FTP配置
- /// true-成功 false-失败
- private async Task InnerSendBookingOrClosingEDIToFTP(string filePath, DjyEdiSetting ediCfg)
+ /// 返回回执
+ private async Task InnerSendBookingOrClosingEDIToFTP(string filePath, DjyEdiSetting ediCfg)
{
+ CommonWebApiResult result = new CommonWebApiResult { succ = true };
+
CancellationTokenSource cts = new CancellationTokenSource();
//后续发送
@@ -2254,10 +2261,11 @@ namespace Myshipping.Application
if (jobjRetn.GetStringValue("status") != "1")
{
- return false;
+ result.succ = false;
+ result.msg = jobjRetn.GetStringValue("message");
}
- return true;
+ return result;
}
#endregion