|
@@ -866,6 +866,8 @@ namespace TEAMModelOS.FunctionV4
|
|
|
var papers = info.papers.GroupBy(c => c.subjectId).Select(x => new {
|
|
|
subject = x.Key,
|
|
|
blob = x.ToList().Select(z => z.blob).ToList() });
|
|
|
+ bool flag = info.papers.Exists(c => c.subjectId != null);
|
|
|
+ //var subs = info.papers.Select(z => z.subjectId).Distinct().ToList();
|
|
|
if (addTmdidsCls.IsNotEmpty())
|
|
|
{
|
|
|
addTmdidsCls.ForEach(x =>
|
|
@@ -932,7 +934,7 @@ namespace TEAMModelOS.FunctionV4
|
|
|
creatorId = info.creatorId,
|
|
|
subjects = sub,
|
|
|
blob = null,
|
|
|
- paper = info.pk.Equals("Art") ? papers.Select(c => new {
|
|
|
+ paper = flag ? papers.Select(c => new {
|
|
|
c.subject,
|
|
|
blob = c.blob[new Random().Next(c.blob.Count)]
|
|
|
}) : "",
|
|
@@ -1015,7 +1017,7 @@ namespace TEAMModelOS.FunctionV4
|
|
|
creatorId = info.creatorId,
|
|
|
subjects = sub,
|
|
|
blob = null,
|
|
|
- paper = info.pk.Equals("Art") ? papers.Select(c => new {
|
|
|
+ paper = flag ? papers.Select(c => new {
|
|
|
c.subject,
|
|
|
blob = c.blob[new Random().Next(c.blob.Count)]
|
|
|
}) : "",
|
|
@@ -1675,6 +1677,7 @@ namespace TEAMModelOS.FunctionV4
|
|
|
items.type = itemInfos.Where(c => c.id.Equals(items.id)).FirstOrDefault().type;
|
|
|
items.pId = itemInfos.Where(c => c.id.Equals(items.id)).FirstOrDefault().pid;
|
|
|
items.knowledge = itemInfos.Where(c => c.id.Equals(items.id)).FirstOrDefault().knows;
|
|
|
+ items.qamode = info.qamode;
|
|
|
error.its.Add(items);
|
|
|
}
|
|
|
errors.Add(error);
|