From ac190326a6447f2218d99b8f32bd625b075601de Mon Sep 17 00:00:00 2001
From: zhangxiaofeng <1939543722@qq.com>
Date: Tue, 23 Jul 2024 19:08:56 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=BC=96=E6=8E=92=E6=89=A7?=
=?UTF-8?q?=E8=A1=8C=E6=97=A5=E5=BF=97=E8=B0=83=E6=95=B4=E3=80=81=E5=88=A4?=
=?UTF-8?q?=E6=96=AD=E6=9D=A1=E4=BB=B6=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../TaskPlat/Entity/TaskFlowLogDetail.cs | 8 ++++-
.../TaskPlat/Other/TaskFlowRuner.cs | 31 +++++++++++++++----
2 files changed, 32 insertions(+), 7 deletions(-)
diff --git a/ds-wms-service/DS.WMS.Core/TaskPlat/Entity/TaskFlowLogDetail.cs b/ds-wms-service/DS.WMS.Core/TaskPlat/Entity/TaskFlowLogDetail.cs
index c175b01a..0901fdc0 100644
--- a/ds-wms-service/DS.WMS.Core/TaskPlat/Entity/TaskFlowLogDetail.cs
+++ b/ds-wms-service/DS.WMS.Core/TaskPlat/Entity/TaskFlowLogDetail.cs
@@ -29,10 +29,16 @@ namespace DS.WMS.Core.TaskPlat.Entity
[SugarColumn(ColumnDescription = "执行模块主键")]
public long ModuleId { get; set; }
+ ///
+ /// 执行模块名称
+ ///
+ [SugarColumn(ColumnDescription = "执行模块名称", IsNullable = true, Length = 255)]
+ public string? ModuleName { get; set; }
+
///
/// 原始数据内容
///
- [SugarColumn(ColumnDescription = "原始数据内容", IsNullable = true)]
+ [SugarColumn(ColumnDescription = "原始数据内容", IsNullable = true, Length = 255)]
public string? OriginDataContext { get; set; }
/////
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 4af2248c..c4cbd916 100644
--- a/ds-wms-service/DS.WMS.Core/TaskPlat/Other/TaskFlowRuner.cs
+++ b/ds-wms-service/DS.WMS.Core/TaskPlat/Other/TaskFlowRuner.cs
@@ -97,32 +97,49 @@ namespace DS.WMS.Core.TaskPlat
valStr = obj.ToString();
}
+ var oldValue = configMatchCount[configItem.Id];
if (conditionItem.MatchType == 1)
{
if (valStr?.Equals(conditionItem.MatchValue, StringComparison.CurrentCultureIgnoreCase) == true)
{
- configMatchCount[configItem.Id] = configMatchCount[configItem.Id] + 1;
+ configMatchCount[configItem.Id] = oldValue + 1;
+ }
+ else
+ {
+ configMatchCount[configItem.Id] = oldValue - 1;
}
}
else if (conditionItem.MatchType == 2)
{
if (valStr?.Contains(conditionItem.MatchValue, StringComparison.CurrentCultureIgnoreCase) == true)
{
- configMatchCount[configItem.Id] = configMatchCount[configItem.Id] + 1;
+ configMatchCount[configItem.Id] = oldValue + 1;
+ }
+ else
+ {
+ configMatchCount[configItem.Id] = oldValue - 1;
}
}
else if (conditionItem.MatchType == 3)
{
if (valStr?.StartsWith(conditionItem.MatchValue, StringComparison.CurrentCultureIgnoreCase) == true)
{
- configMatchCount[configItem.Id] = configMatchCount[configItem.Id] + 1;
+ configMatchCount[configItem.Id] = oldValue + 1;
+ }
+ else
+ {
+ configMatchCount[configItem.Id] = oldValue - 1;
}
}
else if (conditionItem.MatchType == 4)
{
if (valStr?.EndsWith(conditionItem.MatchValue, StringComparison.CurrentCultureIgnoreCase) == true)
{
- configMatchCount[configItem.Id] = configMatchCount[configItem.Id] + 1;
+ configMatchCount[configItem.Id] = oldValue + 1;
+ }
+ else
+ {
+ configMatchCount[configItem.Id] = oldValue - 1;
}
}
}
@@ -207,17 +224,19 @@ namespace DS.WMS.Core.TaskPlat
{
throw new Exception($"未找到指定流程配置,ExecuteModuleId:{configItem.ExecuteModuleId}");
}
+
+ flowLogDetail.ModuleId = module.Id;
+ flowLogDetail.ModuleName = module.Name;
+
Assembly assembly;
if (module.AssemblyName!.StartsWith("DS.WMS.Core"))
{
- //assembly = Assembly.GetEntryAssembly()!;
assembly = Assembly.GetExecutingAssembly();
}
else
{
assembly = Assembly.Load(module.AssemblyName!);
}
- //var interfaceType2 = assembly.GetType(module.InterfaceName!);
var interfaceType = assembly.DefinedTypes.FirstOrDefault(x => x.Name == module.InterfaceName!);
if (interfaceType == null)
{