生成实体类代码调整

This commit is contained in:
DEVICE8\12494
2023-04-07 14:32:05 +08:00
parent 2bbe6991f8
commit 3867c1978d
3 changed files with 28 additions and 4 deletions

View File

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