diff --git a/Tnb.BasicData/ProcessManageService.cs b/Tnb.BasicData/ProcessManageService.cs index 5ffc8b97..6a430421 100644 --- a/Tnb.BasicData/ProcessManageService.cs +++ b/Tnb.BasicData/ProcessManageService.cs @@ -43,6 +43,7 @@ namespace Tnb.BasicData /// 获取工艺路线树形结构 /// /// 工艺路线模版树形结构 + [AllowAnonymous] [HttpGet("route-tree")] public async Task GetRouteTreeList() { diff --git a/system/Tnb.Systems/System/DataBaseService.cs b/system/Tnb.Systems/System/DataBaseService.cs index 3663e876..493c16e9 100644 --- a/system/Tnb.Systems/System/DataBaseService.cs +++ b/system/Tnb.Systems/System/DataBaseService.cs @@ -335,10 +335,10 @@ public class DataBaseService : IDynamicApiController, ITransient [AllowAnonymous] public async Task CleanTableData(string linkId, DatabaseTableDataCleanInput input) { - SqlSugarScope? sugarClient = null!; + ISqlSugarClient? sugarClient = null!; if (linkId == "0") { - sugarClient = _repository.AsSugarClient() as SqlSugarScope; + sugarClient = _repository.AsSugarClient(); } else { @@ -371,10 +371,10 @@ public class DataBaseService : IDynamicApiController, ITransient { Directory.CreateDirectory(dir); } - SqlSugarScope sugarClient = null!; + ISqlSugarClient sugarClient = null!; if (linkId == "0") //默认时,使用当前默认数据库配置 { - sugarClient = _repository.AsSugarClient() as SqlSugarScope; + sugarClient = _repository.AsSugarClient(); } else { diff --git a/visualdev/Tnb.VisualDev/RunService.cs b/visualdev/Tnb.VisualDev/RunService.cs index fbb7dbf7..fdccee5d 100644 --- a/visualdev/Tnb.VisualDev/RunService.cs +++ b/visualdev/Tnb.VisualDev/RunService.cs @@ -24,6 +24,7 @@ using JNPF.VisualDev.Interfaces; using JNPF.WorkFlow.Entitys.Entity; using JNPF.WorkFlow.Interfaces.Repository; using Mapster; +using Newtonsoft.Json.Linq; using SqlSugar; namespace JNPF.VisualDev; @@ -2864,7 +2865,13 @@ public class RunService : IRunService, ITransient break; case JnpfKeyConst.SELECT: { + //modified by ly on 20230407 var itemValue = item.Value.ToString().Contains("[") ? item.Value.ToJsonString() : item.Value.ToString(); + JArray jarr = null; + if (itemValue!.Contains("[")) + { + jarr = JArray.Parse(itemValue); + } // 多选时为模糊查询 if (model.multiple) @@ -2882,6 +2889,22 @@ public class RunService : IRunService, ITransient } }); } + else if (jarr?.Children()!= null && jarr?.Children().ToList().Count > 1) + { + var values = jarr.ToList().Select(t =>t.Value()).ToList(); + var condition = new ConditionalCollections(); + condition.ConditionalList = new List>(values.Count); + values.ForEach(x => + { + new KeyValuePair(WhereType.Or, new ConditionalModel + { + FieldName = item.Key, + ConditionalType = ConditionalType.Equal, + FieldValue = itemValue + }); + }); + conModels.Add(condition); + } else { conModels.Add(new ConditionalCollections()