From 343689e9353f5889f3eeb6934bc061237cf8ce33 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Thu, 29 Aug 2024 10:44:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TaskPOLContainerNotPickUpService.cs | 9 +++++++-- .../DS.WMS.Core/TaskPlat/Method/TaskManageService.cs | 11 +++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/TaskPlat/Method/POLContainerNotPickUp/TaskPOLContainerNotPickUpService.cs b/ds-wms-service/DS.WMS.Core/TaskPlat/Method/POLContainerNotPickUp/TaskPOLContainerNotPickUpService.cs index 94ce64f7..b6bbf0e5 100644 --- a/ds-wms-service/DS.WMS.Core/TaskPlat/Method/POLContainerNotPickUp/TaskPOLContainerNotPickUpService.cs +++ b/ds-wms-service/DS.WMS.Core/TaskPlat/Method/POLContainerNotPickUp/TaskPOLContainerNotPickUpService.cs @@ -352,8 +352,13 @@ namespace DS.WMS.Core.TaskPlat.Method /// 返回回执 public async Task> SendEmailToCustomerTask(TaskFlowDataContext dataContext) { - var taskPKId = dataContext.Get>(TaskFlowDataNameConst.TaskPKId) ?? throw new ArgumentException($"缺少参数:{nameof(TaskFlowDataNameConst.TaskPKId)}"); - var businessTaskMailId = dataContext.Get>($"{nameof(BusinessTaskMail)}.{nameof(BusinessTaskMail.Id)}") ?? throw new ArgumentException(); + var taskPKId = dataContext.Get(TaskFlowDataNameConst.TaskPKId); + if (taskPKId == 0) + throw new ArgumentException($"缺少参数:{nameof(TaskFlowDataNameConst.TaskPKId)}"); + + var businessTaskMailId = dataContext.Get($"{nameof(BusinessTaskMail)}.{nameof(BusinessTaskMail.Id)}"); + if (businessTaskMailId == 0) + throw new ArgumentException($"缺少参数:{nameof(BusinessTaskMail)}.{nameof(BusinessTaskMail.Id)}"); if (businessTaskMailId == 0) { diff --git a/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs b/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs index 26111f17..0627baee 100644 --- a/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs +++ b/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs @@ -1594,11 +1594,14 @@ namespace DS.WMS.Core.TaskPlat.Method await tenantDb.Insertable(taskPOLContainerNotPickUpInfo).ExecuteCommandAsync(); - ////触发推送消息 - //var name = _namedTaskPOLContainerNotPickUpServiceProvider - // .GetService(nameof(TaskPOLContainerNotPickUpService)); + //出发任务流程 + TaskFlowDataContext dataContext = new( + // 固定 + (TaskFlowDataNameConst.TaskPKId, taskInfo.Id) + ); - //await name.AutoTransferNotice(taskInfo.PK_ID); + TaskFlowRuner taskFlow = new TaskFlowRuner(tenantDb, serviceProvider); + await taskFlow.Run(info.Main.TaskType, taskInfo.Id, dataContext); } #endregion