From b0b206cb31f5d0a04657bc5a69124dd7d40e4602 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Mon, 13 Mar 2023 12:00:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9EDI=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=AE=B0=E5=BD=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingOrder/BookingOrderService.cs | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index d1a7d017..3a041116 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -70,6 +70,8 @@ using System.Collections.Specialized; using System.Net.Http.Headers; using MySqlX.XDevAPI.Common; using Ubiety.Dns.Core; +using static ICSharpCode.SharpZipLib.Zip.ExtendedUnixData; +using System.Security.Cryptography; namespace Myshipping.Application { @@ -3574,9 +3576,27 @@ namespace Myshipping.Application _logger.LogInformation("批次={no} 发送完成,耗时:{timeDiff}ms. 结果{msg}", batchNo, timeDiff, sendStatus.succ ? "成功" : "失败"); + var logId = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog + { + Type = "Trace", + BookingId = model.Id, + TenantId = Convert.ToInt64(UserManager.TENANT_ID), + CreatedTime = DateTime.Now, + CreatedUserId = UserManager.UserId, + CreatedUserName = UserManager.Name + }); + + await _bookinglogdetail.InsertReturnSnowflakeIdAsync(new BookingLogDetail + { + PId = logId, + Field = String.Empty, + OldValue = String.Empty, + NewValue = $"发送 {order.CARRIERID} EDI 类型={model.sendType} 通过{(isSendEmail?"邮件":"FTP")} {(sendStatus.succ ? "成功":"失败")}", + }); + if (!sendStatus.succ) { - throw Oops.Bah($"FTP发送失败,原因:{sendStatus.msg}"); + throw Oops.Bah($"发送失败,原因:{sendStatus.msg}"); } }