生成实体类代码调整
This commit is contained in:
@@ -43,6 +43,7 @@ namespace Tnb.BasicData
|
||||
/// 获取工艺路线树形结构
|
||||
/// </summary>
|
||||
/// <returns>工艺路线模版树形结构</returns>
|
||||
[AllowAnonymous]
|
||||
[HttpGet("route-tree")]
|
||||
public async Task<dynamic> GetRouteTreeList()
|
||||
{
|
||||
|
||||
@@ -335,10 +335,10 @@ public class DataBaseService : IDynamicApiController, ITransient
|
||||
[AllowAnonymous]
|
||||
public async Task<dynamic> 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
|
||||
{
|
||||
|
||||
@@ -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<string>()).ToList();
|
||||
var condition = new ConditionalCollections();
|
||||
condition.ConditionalList = new List<KeyValuePair<WhereType, ConditionalModel>>(values.Count);
|
||||
values.ForEach(x =>
|
||||
{
|
||||
new KeyValuePair<WhereType, ConditionalModel>(WhereType.Or, new ConditionalModel
|
||||
{
|
||||
FieldName = item.Key,
|
||||
ConditionalType = ConditionalType.Equal,
|
||||
FieldValue = itemValue
|
||||
});
|
||||
});
|
||||
conModels.Add(condition);
|
||||
}
|
||||
else
|
||||
{
|
||||
conModels.Add(new ConditionalCollections()
|
||||
|
||||
Reference in New Issue
Block a user