|
@@ -33,7 +33,7 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
List<JointEventGroupBase> stuLists = new List<JointEventGroupBase>();
|
|
List<JointEventGroupBase> stuLists = new List<JointEventGroupBase>();
|
|
//取得JointCourse ※examType == "custom" 之後再處理
|
|
//取得JointCourse ※examType == "custom" 之後再處理
|
|
List<JointEventGroupDb> jointCourses = new List<JointEventGroupDb>();
|
|
List<JointEventGroupDb> jointCourses = new List<JointEventGroupDb>();
|
|
- if (!jointExam.examType.Equals("custom")) //老師報名名單
|
|
|
|
|
|
+ if (!jointExam.examType.Equals("custom")) //熱身賽:老師報名名單
|
|
{
|
|
{
|
|
string jointCourseSql = $"SELECT * FROM c WHERE c.jointEventId = '{jointExam.jointEventId}' AND c.jointGroupId = '{jointExam.jointGroupId}' AND ( IS_DEFINED(c.type) = false OR c.type = 'regular' )";
|
|
string jointCourseSql = $"SELECT * FROM c WHERE c.jointEventId = '{jointExam.jointEventId}' AND c.jointGroupId = '{jointExam.jointGroupId}' AND ( IS_DEFINED(c.type) = false OR c.type = 'regular' )";
|
|
if (!string.IsNullOrWhiteSpace(creatorId)) jointCourseSql += $" AND c.creatorId = '{creatorId}' ";
|
|
if (!string.IsNullOrWhiteSpace(creatorId)) jointCourseSql += $" AND c.creatorId = '{creatorId}' ";
|
|
@@ -42,6 +42,15 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
jointCourses.Add(item);
|
|
jointCourses.Add(item);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ else //決賽:決賽名單
|
|
|
|
+ {
|
|
|
|
+ string jointCourseSql = $"SELECT * FROM c WHERE c.jointEventId = '{jointExam.jointEventId}' AND c.jointGroupId = '{jointExam.jointGroupId}' AND IS_DEFINED(c.type) = true AND c.type = 'custom' ";
|
|
|
|
+ if (!string.IsNullOrWhiteSpace(creatorId)) jointCourseSql += $" AND c.creatorId = '{creatorId}' ";
|
|
|
|
+ await foreach (var item in client.GetContainer("TEAMModelOS", Constant.Teacher).GetItemQueryIteratorSql<JointEventGroupDb>(queryText: jointCourseSql, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"JointCourse") }))
|
|
|
|
+ {
|
|
|
|
+ jointCourses.Add(item);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
//評量資料生成 ExamInfo actExamInfo ※一個課程一個Exam
|
|
//評量資料生成 ExamInfo actExamInfo ※一個課程一個Exam
|
|
List<ExamInfo> examList = new List<ExamInfo>();
|
|
List<ExamInfo> examList = new List<ExamInfo>();
|
|
foreach (JointEventGroupDb jointCourse in jointCourses)
|
|
foreach (JointEventGroupDb jointCourse in jointCourses)
|