Merge branch 'dev' of ssh://git.tuotong-tech.com:9105/tnb/tnb.server into dev

This commit is contained in:
2023-05-31 10:19:09 +08:00
82 changed files with 3193 additions and 535 deletions

View File

@@ -3288,7 +3288,11 @@ public class RunService : IRunService, ITransient
default:
{
var itemValue = item.Value.ToString().Contains("[") ? item.Value.ToJsonString() : item.Value.ToString();
JArray jarr = null;
if (itemValue!.Contains("["))
{
jarr = JArray.Parse(itemValue);
}
if (model.searchType == 1)
{
conModels.Add(new ConditionalCollections()
@@ -3306,9 +3310,17 @@ public class RunService : IRunService, ITransient
}
else
{
conModels.Add(new ConditionalCollections()
if (jarr?.Children() != null && jarr?.Children().ToList().Count > 1)
{
ConditionalList = new List<KeyValuePair<WhereType, ConditionalModel>>()
var values = string.Join(",", jarr.ToList().Select(t => t.Value<string>()));
conModels.Add(new ConditionalModel { FieldName = item.Key, ConditionalType = ConditionalType.In, FieldValue = values });
}
else
{
conModels.Add(new ConditionalCollections()
{
ConditionalList = new List<KeyValuePair<WhereType, ConditionalModel>>()
{
new KeyValuePair<WhereType, ConditionalModel>(WhereType.And, new ConditionalModel
{
@@ -3317,7 +3329,8 @@ public class RunService : IRunService, ITransient
FieldValue = itemValue
})
}
});
});
}
}
}