|
@@ -303,7 +303,7 @@ namespace TEAMModelOS.Controllers
|
|
|
//获取线一个人的完整的能力点订阅数据
|
|
|
var replyIds = abilitySub.otherScore.SelectMany(x => x.replyIds).Where(y=>!string.IsNullOrEmpty(y));
|
|
|
List<DebateReply> replies = new List<DebateReply>();
|
|
|
- if (replyIds != null) {
|
|
|
+ if (replyIds != null && replyIds.Count()>0) {
|
|
|
|
|
|
string sql = $"select value(A1) from c join A1 in c.replies where A1.id in({string.Join(",", replyIds.Select(o => $"'{o}'"))})";
|
|
|
await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "School")
|
|
@@ -316,12 +316,28 @@ namespace TEAMModelOS.Controllers
|
|
|
|
|
|
});
|
|
|
}
|
|
|
+ List<OtherScoreReply> scoreReplies= new List<OtherScoreReply>();
|
|
|
+ abilitySub.otherScore.ForEach(x => {
|
|
|
+ OtherScoreReply scoreReply = new OtherScoreReply
|
|
|
+ {
|
|
|
+ roleType=x.roleType,
|
|
|
+ tmdid=x.tmdid,
|
|
|
+ tmdname=x.tmdname,
|
|
|
+ score=x.score,
|
|
|
+ scoreUploads=x.scoreUploads,
|
|
|
+ time=x.time
|
|
|
+ };
|
|
|
+ var rs= replies.FindAll(m => x.replyIds.Contains(m.id));
|
|
|
+ scoreReply.replies.AddRange(rs);
|
|
|
+ scoreReplies.Add(scoreReply);
|
|
|
+ });
|
|
|
+
|
|
|
Dictionary<string, List<DebateReply>> pairs = new Dictionary<string, List<DebateReply>>();
|
|
|
abilitySub.otherScore.GroupBy(x => x.roleType).Select(m => new { key= m.Key, list = m.ToList() }).ToList().ForEach(y => {
|
|
|
var reply= replies.FindAll(z =>y.list.SelectMany(a=>a.replyIds).Contains(z.id));
|
|
|
pairs.Add(y.key, reply);
|
|
|
});
|
|
|
- return Ok(new { abilitySub, ability= abilityA, replies= pairs });
|
|
|
+ return Ok(new { scoreReplies ,ability = abilityA });
|
|
|
case "SetOnlineDone":
|
|
|
//完成线上学习
|
|
|
abilitySub.done = true;
|