|
@@ -75,7 +75,7 @@ namespace TEAMModelOS.Controllers
|
|
|
await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School)
|
|
|
.GetItemQueryIterator<Course>(queryText: sql.ToString(),requestOptions:new QueryRequestOptions() { PartitionKey=new PartitionKey("Course-hbcn") }))
|
|
|
{
|
|
|
- schoolCourses.Add(item);
|
|
|
+
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(item.school))
|
|
|
{
|
|
@@ -148,7 +148,7 @@ namespace TEAMModelOS.Controllers
|
|
|
// }
|
|
|
// }
|
|
|
//}
|
|
|
- string sqlCourseBase = $"select value c from c where c.name ='{course.name}' and c.period.id='{period.id}' and c.subject.id='{subject.id}' ";
|
|
|
+ string sqlCourseBase = $"select value c from c where c.period.id='{period.id}' and c.subject.id='{subject.id}' ";
|
|
|
var result = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).GetList<CourseBase>(sqlCourseBase, $"CourseBase-{school.id}");
|
|
|
List<CourseBase> courseBases = result.list.OrderBy(z => z.grade).ToList();
|
|
|
var subjectIndex = period.subjects.FindIndex(z => z.id.Equals(subject.id));
|
|
@@ -255,7 +255,7 @@ namespace TEAMModelOS.Controllers
|
|
|
|
|
|
{
|
|
|
//重新处理编号
|
|
|
- string sqlCourseBaseNo = $"select value c from c where c.name ='{course.name}' and c.period.id='{period.id}' and c.subject.id='{subject.id}' ";
|
|
|
+ string sqlCourseBaseNo = $"select value c from c where c.period.id='{period.id}' and c.subject.id='{subject.id}' ";
|
|
|
var resultNo = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).GetList<CourseBase>(sqlCourseBase, $"CourseBase-{school.id}");
|
|
|
List<CourseBase> courseBasesNo = resultNo.list.OrderBy(z => z.grade).ToList();
|
|
|
var subjectIndexNo = period.subjects.FindIndex(z => z.id.Equals(subject.id));
|