根据生产bom拆分子工单代码调整

This commit is contained in:
DEVICE8\12494
2023-05-24 23:31:13 +08:00
parent 65072abc04
commit d12e05d737
16 changed files with 336 additions and 98 deletions

View File

@@ -3023,7 +3023,11 @@ public class RunService : IRunService, ITransient
{
if (item.Value.IsNullOrEmpty()) continue;
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()
@@ -3041,9 +3045,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
{
@@ -3052,7 +3064,8 @@ public class RunService : IRunService, ITransient
FieldValue = itemValue
})
}
});
});
}
}
}