|
@@ -34,7 +34,6 @@ using Microsoft.Identity.Client;
|
|
using TEAMModelOS.SDK.Models.Dtos;
|
|
using TEAMModelOS.SDK.Models.Dtos;
|
|
using DocumentFormat.OpenXml.Spreadsheet;
|
|
using DocumentFormat.OpenXml.Spreadsheet;
|
|
using DocumentFormat.OpenXml.Wordprocessing;
|
|
using DocumentFormat.OpenXml.Wordprocessing;
|
|
-using static TEAMModelBI.Controllers.BISchool.BatchSchoolController;
|
|
|
|
using DocumentFormat.OpenXml.Bibliography;
|
|
using DocumentFormat.OpenXml.Bibliography;
|
|
using HTEXLib;
|
|
using HTEXLib;
|
|
|
|
|
|
@@ -470,8 +469,8 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
await _dingDing.SendBotMsg($"BI,{_option.Location} \n 单个建校信息:{noticeDD}", GroupNames.成都开发測試群組);
|
|
await _dingDing.SendBotMsg($"BI,{_option.Location} \n 单个建校信息:{noticeDD}", GroupNames.成都开发測試群組);
|
|
|
|
|
|
//v2通知
|
|
//v2通知
|
|
- Teacher targetTeacher = await cosmosClient.GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReadItemAsync<Teacher>($"1", new PartitionKey($"Base"));
|
|
|
|
- _coreAPIHttpService.PushNotify(new List<IdNameCode> { new IdNameCode { id = targetTeacher.id, name = targetTeacher.name, code = targetTeacher.lang } }, "transfer-admin_school", Constant.NotifyType_IES5_Management, new Dictionary<string, object> { { "tmdname", "账号名称" }, { "schooName", "学校名称" }, { "schoolId", $"学校id" }, { "tmdid", "账号id" } }, _option.Location, _configuration, _dingDing, _environment.ContentRootPath);
|
|
|
|
|
|
+ Teacher targetTeacher = await cosmosClient.GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReadItemAsync<Teacher>($"{_tmdId}", new PartitionKey($"Base"));
|
|
|
|
+ _coreAPIHttpService.PushNotify(new List<IdNameCode> { new IdNameCode { id = targetTeacher.id, name = targetTeacher.name, code = targetTeacher.lang } }, "transfer-admin_school", Constant.NotifyType_IES5_Management, new Dictionary<string, object> { { "tmdname", $"{_tmdName}" }, { "schooName", "学校名称" }, { "schoolId", $"学校id" }, { "tmdid", "账号id" } }, _option.Location, _configuration, _dingDing, _environment.ContentRootPath);
|
|
|
|
|
|
//保存操作记录
|
|
//保存操作记录
|
|
await AzureStorageBlobExtensions.SaveBILog(blobClient, tableClient, "school-batchAdd", stringBuilder?.ToString(), _dingDing, httpContext: HttpContext);
|
|
await AzureStorageBlobExtensions.SaveBILog(blobClient, tableClient, "school-batchAdd", stringBuilder?.ToString(), _dingDing, httpContext: HttpContext);
|
|
@@ -1462,12 +1461,42 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
}
|
|
}
|
|
|
|
|
|
List<Period> periods = new();
|
|
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
|
|
periods.Add(new Period
|
|
{
|
|
{
|
|
id = Guid.NewGuid().ToString(),
|
|
id = Guid.NewGuid().ToString(),
|
|
- name = x,
|
|
|
|
|
|
+ name = "默认学段",
|
|
campusId = campusId,
|
|
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() },
|
|
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() } },
|
|
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[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[1].name,type=schoolConfig.PresetSubject[1].type },
|
|
new Subject { id=Guid.NewGuid().ToString(),name=schoolConfig.PresetSubject[2].name,type=schoolConfig.PresetSubject[2].type }
|
|
new Subject { id=Guid.NewGuid().ToString(),name=schoolConfig.PresetSubject[2].name,type=schoolConfig.PresetSubject[2].type }
|
|
- },
|
|
|
|
|
|
+ },
|
|
grades = schoolConfig.grades,
|
|
grades = schoolConfig.grades,
|
|
analysis = new Analysis()
|
|
analysis = new Analysis()
|
|
{
|
|
{
|
|
@@ -1488,7 +1517,7 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
touch = schoolConfig.PresetExam[0].touch
|
|
touch = schoolConfig.PresetExam[0].touch
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- });
|
|
|
|
|
|
+ }
|
|
|
|
|
|
return periods;
|
|
return periods;
|
|
}
|
|
}
|