任务编排执行日志调整、判断条件调整

usertest
zhangxiaofeng 4 months ago
parent 236c855f23
commit ac190326a6

@ -29,10 +29,16 @@ namespace DS.WMS.Core.TaskPlat.Entity
[SugarColumn(ColumnDescription = "执行模块主键")]
public long ModuleId { get; set; }
/// <summary>
/// 执行模块名称
/// </summary>
[SugarColumn(ColumnDescription = "执行模块名称", IsNullable = true, Length = 255)]
public string? ModuleName { get; set; }
/// <summary>
/// 原始数据内容
/// </summary>
[SugarColumn(ColumnDescription = "原始数据内容", IsNullable = true)]
[SugarColumn(ColumnDescription = "原始数据内容", IsNullable = true, Length = 255)]
public string? OriginDataContext { get; set; }
///// <summary>

@ -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)
{

Loading…
Cancel
Save