|
@@ -110,53 +110,7 @@ namespace TEAMModelOS.Controllers
|
|
|
return Ok(new { count=count });
|
|
|
}
|
|
|
|
|
|
- private Dictionary<string, object> GetLessonCond(JsonElement request) {
|
|
|
- Dictionary<string, object> dict = new Dictionary<string, object>();
|
|
|
-
|
|
|
- if (request.TryGetProperty("tmdid", out JsonElement tmdid) && !string.IsNullOrWhiteSpace($"{tmdid}"))
|
|
|
- {
|
|
|
- dict.Add("tmdid", tmdid);
|
|
|
- }
|
|
|
- if (request.TryGetProperty("courseId", out JsonElement courseId) && !string.IsNullOrWhiteSpace($"{courseId}"))
|
|
|
- {
|
|
|
- dict.Add("courseId", courseId);
|
|
|
- }
|
|
|
- if (request.TryGetProperty("periodId", out JsonElement periodId) && !string.IsNullOrWhiteSpace($"{periodId}"))
|
|
|
- {
|
|
|
- dict.Add("periodId", periodId);
|
|
|
- }
|
|
|
- if (request.TryGetProperty("subjectId", out JsonElement subjectId))
|
|
|
- {
|
|
|
- dict.Add("subjectId[*]", subjectId);
|
|
|
- }
|
|
|
- if (request.TryGetProperty("groupIds", out JsonElement groupIds))
|
|
|
- {
|
|
|
- dict.Add("groupIds[*]", groupIds);
|
|
|
- }
|
|
|
- if (request.TryGetProperty("grade", out JsonElement grade))
|
|
|
- {
|
|
|
- dict.Add("grade[*]", grade);
|
|
|
- }
|
|
|
- if (request.TryGetProperty("category", out JsonElement category))
|
|
|
- {
|
|
|
- dict.Add("category[*]", category);
|
|
|
- }
|
|
|
- if (request.TryGetProperty("doubleGreen", out JsonElement doubleGreen) && doubleGreen.GetBoolean())
|
|
|
- {
|
|
|
- dict.Add(">=.tScore", 70);
|
|
|
- dict.Add(">=.pScore", 70);
|
|
|
- }
|
|
|
- if (request.TryGetProperty("quality", out JsonElement quality) && quality.GetBoolean())
|
|
|
- {
|
|
|
- dict.Add(">=.discuss", 1);
|
|
|
- }
|
|
|
-
|
|
|
- if (request.TryGetProperty("name", out JsonElement name) && !string.IsNullOrWhiteSpace($"{name}"))
|
|
|
- {
|
|
|
- dict.Add("$.name", name);
|
|
|
- }
|
|
|
- return dict;
|
|
|
- }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 获取开课记录
|
|
|
/// </summary>
|
|
@@ -254,5 +208,54 @@ namespace TEAMModelOS.Controllers
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ private Dictionary<string, object> GetLessonCond(JsonElement request)
|
|
|
+ {
|
|
|
+ Dictionary<string, object> dict = new Dictionary<string, object>();
|
|
|
+
|
|
|
+ if (request.TryGetProperty("tmdid", out JsonElement tmdid) && !string.IsNullOrWhiteSpace($"{tmdid}"))
|
|
|
+ {
|
|
|
+ dict.Add("tmdid", tmdid);
|
|
|
+ }
|
|
|
+ if (request.TryGetProperty("courseId", out JsonElement courseId) && !string.IsNullOrWhiteSpace($"{courseId}"))
|
|
|
+ {
|
|
|
+ dict.Add("courseId", courseId);
|
|
|
+ }
|
|
|
+ if (request.TryGetProperty("periodId", out JsonElement periodId) && !string.IsNullOrWhiteSpace($"{periodId}"))
|
|
|
+ {
|
|
|
+ dict.Add("periodId", periodId);
|
|
|
+ }
|
|
|
+ if (request.TryGetProperty("subjectId", out JsonElement subjectId))
|
|
|
+ {
|
|
|
+ dict.Add("subjectId[*]", subjectId);
|
|
|
+ }
|
|
|
+ if (request.TryGetProperty("groupIds", out JsonElement groupIds))
|
|
|
+ {
|
|
|
+ dict.Add("groupIds[*]", groupIds);
|
|
|
+ }
|
|
|
+ if (request.TryGetProperty("grade", out JsonElement grade))
|
|
|
+ {
|
|
|
+ dict.Add("grade[*]", grade);
|
|
|
+ }
|
|
|
+ if (request.TryGetProperty("category", out JsonElement category))
|
|
|
+ {
|
|
|
+ dict.Add("category[*]", category);
|
|
|
+ }
|
|
|
+ if (request.TryGetProperty("doubleGreen", out JsonElement doubleGreen) && doubleGreen.GetBoolean())
|
|
|
+ {
|
|
|
+ dict.Add(">=.tScore", 70);
|
|
|
+ dict.Add(">=.pScore", 70);
|
|
|
+ }
|
|
|
+ if (request.TryGetProperty("quality", out JsonElement quality) && quality.GetBoolean())
|
|
|
+ {
|
|
|
+ dict.Add(">=.discuss", 1);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (request.TryGetProperty("name", out JsonElement name) && !string.IsNullOrWhiteSpace($"{name}"))
|
|
|
+ {
|
|
|
+ dict.Add("$.name", name);
|
|
|
+ }
|
|
|
+ return dict;
|
|
|
+ }
|
|
|
}
|
|
|
}
|