生产管理新增,同组工单下发,取消同组工单
This commit is contained in:
@@ -2886,9 +2886,27 @@ public class RunService : IRunService, ITransient
|
||||
// 多选时为模糊查询
|
||||
if (model.multiple)
|
||||
{
|
||||
conModels.Add(new ConditionalCollections()
|
||||
if (jarr?.Children() != null && jarr?.Children().ToList().Count > 1)
|
||||
{
|
||||
ConditionalList = new List<KeyValuePair<WhereType, ConditionalModel>>()
|
||||
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 =>
|
||||
{
|
||||
condition.ConditionalList.Add(new KeyValuePair<WhereType, ConditionalModel>(WhereType.Or, new ConditionalModel
|
||||
{
|
||||
FieldName = item.Key,
|
||||
ConditionalType = ConditionalType.Like,
|
||||
FieldValue = x,
|
||||
}));
|
||||
});
|
||||
conModels.Add(condition);
|
||||
}
|
||||
else
|
||||
{
|
||||
conModels.Add(new ConditionalCollections()
|
||||
{
|
||||
ConditionalList = new List<KeyValuePair<WhereType, ConditionalModel>>()
|
||||
{
|
||||
new KeyValuePair<WhereType, ConditionalModel>(WhereType.And, new ConditionalModel
|
||||
{
|
||||
@@ -2897,7 +2915,9 @@ public class RunService : IRunService, ITransient
|
||||
FieldValue = itemValue
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
//modified by ly on 20230407
|
||||
else if (jarr?.Children() != null && jarr?.Children().ToList().Count > 1)
|
||||
@@ -2940,6 +2960,73 @@ public class RunService : IRunService, ITransient
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case JnpfKeyConst.TAB: //modifed by ly on 20230425
|
||||
{
|
||||
var itemValue = item.Value.ToString().Contains("[") ? item.Value.ToJsonString() : item.Value.ToString();
|
||||
//modified by ly on 20230407
|
||||
JArray jarr = null;
|
||||
if (itemValue!.Contains("["))
|
||||
{
|
||||
jarr = JArray.Parse(itemValue);
|
||||
}
|
||||
|
||||
// 多选时为模糊查询
|
||||
if (model.multiple)
|
||||
{
|
||||
conModels.Add(new ConditionalCollections()
|
||||
{
|
||||
ConditionalList = new List<KeyValuePair<WhereType, ConditionalModel>>()
|
||||
{
|
||||
new KeyValuePair<WhereType, ConditionalModel>(WhereType.And, new ConditionalModel
|
||||
{
|
||||
FieldName = item.Key,
|
||||
ConditionalType = ConditionalType.Like,
|
||||
FieldValue = itemValue
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
//modified by ly on 20230407
|
||||
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 =>
|
||||
{
|
||||
condition.ConditionalList.Add(new KeyValuePair<WhereType, ConditionalModel>(WhereType.Or, new ConditionalModel
|
||||
{
|
||||
FieldName = item.Key,
|
||||
ConditionalType = ConditionalType.Equal,
|
||||
FieldValue = x,
|
||||
}));
|
||||
});
|
||||
conModels.Add(condition);
|
||||
}
|
||||
else
|
||||
{
|
||||
//modified by ly on 20230407
|
||||
if (itemValue.IsMatch(@"\[(.+)\]"))
|
||||
{
|
||||
itemValue = Regex.Match(itemValue, @"\[(.+)\]").Groups[1].Value;
|
||||
itemValue = itemValue.Trim('"');
|
||||
}
|
||||
|
||||
conModels.Add(new ConditionalCollections()
|
||||
{
|
||||
ConditionalList = new List<KeyValuePair<WhereType, ConditionalModel>>()
|
||||
{
|
||||
new KeyValuePair<WhereType, ConditionalModel>(WhereType.And, new ConditionalModel
|
||||
{
|
||||
FieldName = item.Key,
|
||||
ConditionalType = ConditionalType.Equal,
|
||||
FieldValue = itemValue
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user