From 47d99da6dcfd24e1236cd8305a820a2c6f85a171 Mon Sep 17 00:00:00 2001
From: zhangxiaofeng <1939543722@qq.com>
Date: Wed, 14 Aug 2024 09:02:35 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=9A=E6=A0=B9=E6=8D=AE?=
=?UTF-8?q?=E5=BD=93=E5=89=8D=E8=8A=82=E7=82=B9Id=EF=BC=8C=E8=8E=B7?=
=?UTF-8?q?=E5=8F=96=E5=B7=A5=E4=BD=9C=E6=B5=81=E4=B8=8B=E4=B8=80=E4=B8=AA?=
=?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=B1=BB=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Enums/TaskPlat/TaskBaseTypeEnum.cs | 16 +++++++++++++++-
.../Op/Method/TaskInteraction/TaskService.cs | 4 ++--
.../DS.WMS.Core/TaskPlat/Other/TaskFlowRuner.cs | 5 +++--
ds-wms-service/DS.WMS.Test/SaasTest.cs | 2 +-
4 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/ds-wms-service/DS.Module.Core/Enums/TaskPlat/TaskBaseTypeEnum.cs b/ds-wms-service/DS.Module.Core/Enums/TaskPlat/TaskBaseTypeEnum.cs
index cd30b13f..878708ec 100644
--- a/ds-wms-service/DS.Module.Core/Enums/TaskPlat/TaskBaseTypeEnum.cs
+++ b/ds-wms-service/DS.Module.Core/Enums/TaskPlat/TaskBaseTypeEnum.cs
@@ -189,7 +189,7 @@ namespace DS.Module.Core
TRNAS_PLAN_HAS_CHANGE = 30,
- #region 工作流--主要流程
+ #region 工作流--主流程任务类型
///
/// 审单
///
@@ -329,5 +329,19 @@ namespace DS.Module.Core
[Description("箱使")]
WAIT_XIANGSHI = 316,
#endregion
+
+ #region 工作流--流程编码
+ ///
+ /// 工作流任务创建主流程
+ ///
+ [Description("工作流任务创建主流程")]
+ WORK_FLOW_MAIN = 601,
+
+ ///
+ /// 工作流退舱流程
+ ///
+ [Description("工作流退舱流程")]
+ WORK_FLOW_RETURN_CABIN = 602
+ #endregion
}
}
diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs
index d2d9db00..f09a0251 100644
--- a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs
+++ b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs
@@ -83,8 +83,8 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
{
TaskFlowRuner flowRuner = new TaskFlowRuner(TenantDb, ServiceProvider);
- var result = await flowRuner.GetWorkFlowNextConfig(new TaskFlowDataContext(
-
+ var result = await flowRuner.GetWorkFlowNextConfig(TaskBaseTypeEnum.WORK_FLOW_MAIN, new TaskFlowDataContext(
+
), current.NextId);
if (result.HasValue)
diff --git a/ds-wms-service/DS.WMS.Core/TaskPlat/Other/TaskFlowRuner.cs b/ds-wms-service/DS.WMS.Core/TaskPlat/Other/TaskFlowRuner.cs
index ec30d31d..c70a634e 100644
--- a/ds-wms-service/DS.WMS.Core/TaskPlat/Other/TaskFlowRuner.cs
+++ b/ds-wms-service/DS.WMS.Core/TaskPlat/Other/TaskFlowRuner.cs
@@ -366,13 +366,14 @@ namespace DS.WMS.Core.TaskPlat
///
/// 根据当前节点Id,获取工作流下一个任务类型
///
+ /// 工作流流程类型
///
/// 当前执行的配置Id(如果为空,则返回首个任务类型)
/// (下一个任务类型,下一节点Id)
- public async Task<(TaskBaseTypeEnum taskType, long configId)?> GetWorkFlowNextConfig(TaskFlowDataContext dataContext, long? currentConfigId = null)
+ public async Task<(TaskBaseTypeEnum taskType, long configId)?> GetWorkFlowNextConfig(TaskBaseTypeEnum workFlowType, TaskFlowDataContext dataContext, long? currentConfigId = null)
{
var allConfigList = await tenantDb.Queryable()
- .Where(t => t.MainConfigId == SqlFunc.Subqueryable().Where(x => x.IsMain && x.TaskType == "WORK_FLOW").Select(x => x.Id))
+ .Where(t => t.MainConfigId == SqlFunc.Subqueryable().Where(x => x.IsMain && x.TaskType == workFlowType.ToString()).Select(x => x.Id))
.OrderBy(t => t.Id)
.ToListAsync();
diff --git a/ds-wms-service/DS.WMS.Test/SaasTest.cs b/ds-wms-service/DS.WMS.Test/SaasTest.cs
index 0d4890cf..e9b56d2d 100644
--- a/ds-wms-service/DS.WMS.Test/SaasTest.cs
+++ b/ds-wms-service/DS.WMS.Test/SaasTest.cs
@@ -265,6 +265,6 @@ public class SaasTest
(TaskFlowDataNameConst.Business, order)
);
TaskFlowRuner runer = new TaskFlowRuner(tenantDb, _serviceProvider);
- var result =await runer.GetWorkFlowNextConfig(dataContext, null);
+ var result = await runer.GetWorkFlowNextConfig(TaskBaseTypeEnum.WORK_FLOW_MAIN, dataContext);
}
}
\ No newline at end of file