From f77bcee54e5167fe96d7b1c975a0e955aad7db31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B5=87=E6=96=87=E9=BE=99?= Date: Wed, 14 Aug 2024 15:57:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E5=AE=B9=E6=A8=A1=E6=9D=BF=E5=BB=BA?= =?UTF-8?q?=E7=AB=8B=E6=96=87=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ds-wms-service/DS.WMS.Core/DS.WMS.Core.csproj | 7 +++- .../Booking/MailActionExecutor.cs | 6 +++- .../IncomingNotificationAction.cs | 6 +++- .../Op/{ => Templates}/MailTemplate.cshtml | 2 +- .../Op/Templates/入货通知.cshtml | 32 +++++++++++++++++++ 5 files changed, 49 insertions(+), 4 deletions(-) rename ds-wms-service/DS.WMS.Core/Op/{ => Templates}/MailTemplate.cshtml (87%) create mode 100644 ds-wms-service/DS.WMS.Core/Op/Templates/入货通知.cshtml diff --git a/ds-wms-service/DS.WMS.Core/DS.WMS.Core.csproj b/ds-wms-service/DS.WMS.Core/DS.WMS.Core.csproj index 876794d0..d488e16e 100644 --- a/ds-wms-service/DS.WMS.Core/DS.WMS.Core.csproj +++ b/ds-wms-service/DS.WMS.Core/DS.WMS.Core.csproj @@ -25,10 +25,15 @@ + - + + true + PreserveNewest + + true PreserveNewest diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/Booking/MailActionExecutor.cs b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/Booking/MailActionExecutor.cs index 8456af88..87873c48 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/Booking/MailActionExecutor.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/Booking/MailActionExecutor.cs @@ -69,7 +69,11 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor.Booking return; } - var model = new MailTemplateModel(result2.Data) { BusinessId = context.TaskInfo.BusinessId }; + var model = new MailTemplateModel(result2.Data) + { + BusinessId = context.TaskInfo.BusinessId, + BusinessType = context.TaskInfo.BusinessType, + }; MailService mailService = new(context.ServiceProvider); result = await mailService.SendAsync(mailConfig, model); if (!result.Succeeded) diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/SpaceRelease/IncomingNotificationAction.cs b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/SpaceRelease/IncomingNotificationAction.cs index 1f0e5209..ed2e9a40 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/SpaceRelease/IncomingNotificationAction.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/SpaceRelease/IncomingNotificationAction.cs @@ -54,7 +54,11 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor.SpaceRelease } result.Data.Order = result2.Data; - var model = new MailTemplateModel(result.Data) { BusinessId = context.TaskInfo.BusinessId }; + var model = new MailTemplateModel(result.Data) + { + BusinessId = context.TaskInfo.BusinessId, + BusinessType = context.TaskInfo.BusinessType, + }; MailService mailService = new(context.ServiceProvider); var result3 = await mailService.SendAsync(mailConfig, model); if (!result3.Succeeded) diff --git a/ds-wms-service/DS.WMS.Core/Op/MailTemplate.cshtml b/ds-wms-service/DS.WMS.Core/Op/Templates/MailTemplate.cshtml similarity index 87% rename from ds-wms-service/DS.WMS.Core/Op/MailTemplate.cshtml rename to ds-wms-service/DS.WMS.Core/Op/Templates/MailTemplate.cshtml index b19f0627..6b1b63d1 100644 --- a/ds-wms-service/DS.WMS.Core/Op/MailTemplate.cshtml +++ b/ds-wms-service/DS.WMS.Core/Op/Templates/MailTemplate.cshtml @@ -1,4 +1,4 @@ -@* @model DS.Module.Core.Data.MailTemplateModel *@ +@* @model DS.WMS.Core.Op.Entity.MailTemplateModel *@ @{ var item = Model.Primary; } diff --git a/ds-wms-service/DS.WMS.Core/Op/Templates/入货通知.cshtml b/ds-wms-service/DS.WMS.Core/Op/Templates/入货通知.cshtml new file mode 100644 index 00000000..8635b706 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Op/Templates/入货通知.cshtml @@ -0,0 +1,32 @@ +@model DS.WMS.Core.Op.Entity.MailTemplateModel +@{ + var item = Model.Primary; +} + + + +

测试邮件-@item.Order.MBLNO@item.Order.CustomerNo

+ +
+ 预计开船日期:@item.Order.ETD + 预计抵达日期:@item.Order.ETA +
+
+ +
+
+
\ No newline at end of file