|
@@ -34,7 +34,6 @@ using Microsoft.Identity.Client;
|
|
|
using TEAMModelOS.SDK.Models.Dtos;
|
|
|
using DocumentFormat.OpenXml.Spreadsheet;
|
|
|
using DocumentFormat.OpenXml.Wordprocessing;
|
|
|
-using static TEAMModelBI.Controllers.BISchool.BatchSchoolController;
|
|
|
using DocumentFormat.OpenXml.Bibliography;
|
|
|
using HTEXLib;
|
|
|
|
|
@@ -1462,12 +1461,42 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
}
|
|
|
|
|
|
List<Period> periods = new();
|
|
|
- period.ForEach(x =>
|
|
|
+ if (period.Count > 0)
|
|
|
+ {
|
|
|
+ period.ForEach(x =>
|
|
|
+ {
|
|
|
+ periods.Add(new Period
|
|
|
+ {
|
|
|
+ id = Guid.NewGuid().ToString(),
|
|
|
+ name = x,
|
|
|
+ campusId = campusId,
|
|
|
+ semesters = new List<Semester>() { new Semester { name = schoolConfig.semester[0].term, start = schoolConfig.semester[0].start, month = schoolConfig.semester[0].month, day = schoolConfig.semester[0].day, id = Guid.NewGuid().ToString() },
|
|
|
+ new Semester { name = schoolConfig.semester[1].term, start = schoolConfig.semester[1].start, month = schoolConfig.semester[1].month, day = schoolConfig.semester[1].day, id = Guid.NewGuid().ToString() } },
|
|
|
+ subjects = new List<Subject>() {
|
|
|
+ new Subject { id=Guid.NewGuid().ToString(),name=schoolConfig.PresetSubject[0].name,type=schoolConfig.PresetSubject[0].type },
|
|
|
+ new Subject { id=Guid.NewGuid().ToString(),name=schoolConfig.PresetSubject[1].name,type=schoolConfig.PresetSubject[1].type },
|
|
|
+ new Subject { id=Guid.NewGuid().ToString(),name=schoolConfig.PresetSubject[2].name,type=schoolConfig.PresetSubject[2].type }
|
|
|
+ },
|
|
|
+ grades = schoolConfig.grades,
|
|
|
+ analysis = new Analysis()
|
|
|
+ {
|
|
|
+ type = new List<ExamSimple>() { new ExamSimple { id = Guid.NewGuid().ToString(), name = schoolConfig.PresetExam[0].type[0].name },
|
|
|
+ new ExamSimple { id = Guid.NewGuid().ToString(), name = schoolConfig.PresetExam[0].type[1].name },
|
|
|
+ new ExamSimple { id = Guid.NewGuid().ToString(), name = schoolConfig.PresetExam[0].type[2].name },
|
|
|
+ new ExamSimple { id = Guid.NewGuid().ToString(), name = schoolConfig.PresetExam[0].type[3].name } },
|
|
|
+ income = schoolConfig.PresetExam[0].income,
|
|
|
+ eugenics = schoolConfig.PresetExam[0].eugenics,
|
|
|
+ touch = schoolConfig.PresetExam[0].touch
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
periods.Add(new Period
|
|
|
{
|
|
|
id = Guid.NewGuid().ToString(),
|
|
|
- name = x,
|
|
|
+ name = "默认学段",
|
|
|
campusId = campusId,
|
|
|
semesters = new List<Semester>() { new Semester { name = schoolConfig.semester[0].term, start = schoolConfig.semester[0].start, month = schoolConfig.semester[0].month, day = schoolConfig.semester[0].day, id = Guid.NewGuid().ToString() },
|
|
|
new Semester { name = schoolConfig.semester[1].term, start = schoolConfig.semester[1].start, month = schoolConfig.semester[1].month, day = schoolConfig.semester[1].day, id = Guid.NewGuid().ToString() } },
|
|
@@ -1475,7 +1504,7 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
new Subject { id=Guid.NewGuid().ToString(),name=schoolConfig.PresetSubject[0].name,type=schoolConfig.PresetSubject[0].type },
|
|
|
new Subject { id=Guid.NewGuid().ToString(),name=schoolConfig.PresetSubject[1].name,type=schoolConfig.PresetSubject[1].type },
|
|
|
new Subject { id=Guid.NewGuid().ToString(),name=schoolConfig.PresetSubject[2].name,type=schoolConfig.PresetSubject[2].type }
|
|
|
- },
|
|
|
+ },
|
|
|
grades = schoolConfig.grades,
|
|
|
analysis = new Analysis()
|
|
|
{
|
|
@@ -1488,7 +1517,7 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
touch = schoolConfig.PresetExam[0].touch
|
|
|
}
|
|
|
});
|
|
|
- });
|
|
|
+ }
|
|
|
|
|
|
return periods;
|
|
|
}
|