生成实体类代码调整
This commit is contained in:
@@ -43,6 +43,7 @@ namespace Tnb.BasicData
|
|||||||
/// 获取工艺路线树形结构
|
/// 获取工艺路线树形结构
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>工艺路线模版树形结构</returns>
|
/// <returns>工艺路线模版树形结构</returns>
|
||||||
|
[AllowAnonymous]
|
||||||
[HttpGet("route-tree")]
|
[HttpGet("route-tree")]
|
||||||
public async Task<dynamic> GetRouteTreeList()
|
public async Task<dynamic> GetRouteTreeList()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -335,10 +335,10 @@ public class DataBaseService : IDynamicApiController, ITransient
|
|||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public async Task<dynamic> CleanTableData(string linkId, DatabaseTableDataCleanInput input)
|
public async Task<dynamic> CleanTableData(string linkId, DatabaseTableDataCleanInput input)
|
||||||
{
|
{
|
||||||
SqlSugarScope? sugarClient = null!;
|
ISqlSugarClient? sugarClient = null!;
|
||||||
if (linkId == "0")
|
if (linkId == "0")
|
||||||
{
|
{
|
||||||
sugarClient = _repository.AsSugarClient() as SqlSugarScope;
|
sugarClient = _repository.AsSugarClient();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -371,10 +371,10 @@ public class DataBaseService : IDynamicApiController, ITransient
|
|||||||
{
|
{
|
||||||
Directory.CreateDirectory(dir);
|
Directory.CreateDirectory(dir);
|
||||||
}
|
}
|
||||||
SqlSugarScope sugarClient = null!;
|
ISqlSugarClient sugarClient = null!;
|
||||||
if (linkId == "0") //默认时,使用当前默认数据库配置
|
if (linkId == "0") //默认时,使用当前默认数据库配置
|
||||||
{
|
{
|
||||||
sugarClient = _repository.AsSugarClient() as SqlSugarScope;
|
sugarClient = _repository.AsSugarClient();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ using JNPF.VisualDev.Interfaces;
|
|||||||
using JNPF.WorkFlow.Entitys.Entity;
|
using JNPF.WorkFlow.Entitys.Entity;
|
||||||
using JNPF.WorkFlow.Interfaces.Repository;
|
using JNPF.WorkFlow.Interfaces.Repository;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
|
||||||
namespace JNPF.VisualDev;
|
namespace JNPF.VisualDev;
|
||||||
@@ -2864,7 +2865,13 @@ public class RunService : IRunService, ITransient
|
|||||||
break;
|
break;
|
||||||
case JnpfKeyConst.SELECT:
|
case JnpfKeyConst.SELECT:
|
||||||
{
|
{
|
||||||
|
//modified by ly on 20230407
|
||||||
var itemValue = item.Value.ToString().Contains("[") ? item.Value.ToJsonString() : item.Value.ToString();
|
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)
|
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
|
else
|
||||||
{
|
{
|
||||||
conModels.Add(new ConditionalCollections()
|
conModels.Add(new ConditionalCollections()
|
||||||
|
|||||||
Reference in New Issue
Block a user