|
@@ -30,13 +30,9 @@ using TEAMModelOS.SDK.Models.Service;
|
|
using TEAMModelOS.SDK.Models.Cosmos.BI.BINormal;
|
|
using TEAMModelOS.SDK.Models.Cosmos.BI.BINormal;
|
|
using TEAMModelOS.SDK.Models.Cosmos.Student;
|
|
using TEAMModelOS.SDK.Models.Cosmos.Student;
|
|
using Microsoft.OData.Edm;
|
|
using Microsoft.OData.Edm;
|
|
-using TEAMModelOS.Controllers.Core;
|
|
|
|
-using DocumentFormat.OpenXml.VariantTypes;
|
|
|
|
-using static TEAMModelOS.Controllers.CourseController;
|
|
|
|
using System.IdentityModel.Tokens.Jwt;
|
|
using System.IdentityModel.Tokens.Jwt;
|
|
using TEAMModelOS.SDK.Models.Cosmos.OpenEntity;
|
|
using TEAMModelOS.SDK.Models.Cosmos.OpenEntity;
|
|
using Microsoft.OData.UriParser;
|
|
using Microsoft.OData.UriParser;
|
|
-using FastJSON;
|
|
|
|
using Azure.Core;
|
|
using Azure.Core;
|
|
using System.Security.Policy;
|
|
using System.Security.Policy;
|
|
using System.Net.Http.Json;
|
|
using System.Net.Http.Json;
|
|
@@ -49,7 +45,7 @@ using TEAMModelOS.Models.ShanDa;
|
|
using System.Runtime.ConstrainedExecution;
|
|
using System.Runtime.ConstrainedExecution;
|
|
using DocumentFormat.OpenXml.Wordprocessing;
|
|
using DocumentFormat.OpenXml.Wordprocessing;
|
|
|
|
|
|
-namespace TEAMModelOS.Controllers
|
|
|
|
|
|
+namespace TEAMModelOS.SDK
|
|
{
|
|
{
|
|
public class OpenApiService
|
|
public class OpenApiService
|
|
{
|
|
{
|
|
@@ -632,22 +628,26 @@ namespace TEAMModelOS.Controllers
|
|
members = x.members,
|
|
members = x.members,
|
|
id = x.id
|
|
id = x.id
|
|
}).ToList();
|
|
}).ToList();
|
|
- if (bizId.Equals("cc7e900c-4881-4fe9-9c64-abb1a1f95518") || bizId.Equals("8254bc86-aae9-4fef-9655-4fbda1bd39da")) {
|
|
|
|
- if (listids.Count == 1 && listids.First().Equals("TeacherAll") && !string.IsNullOrEmpty(school)) {
|
|
|
|
- var keys = members.Select(x=>x.id).ToHashSet();
|
|
|
|
|
|
+ if (bizId.Equals("cc7e900c-4881-4fe9-9c64-abb1a1f95518") || bizId.Equals("8254bc86-aae9-4fef-9655-4fbda1bd39da"))
|
|
|
|
+ {
|
|
|
|
+ if (listids.Count == 1 && listids.First().Equals("TeacherAll") && !string.IsNullOrEmpty(school))
|
|
|
|
+ {
|
|
|
|
+ var keys = members.Select(x => x.id).ToHashSet();
|
|
var content = new StringContent(keys.ToJsonString(), Encoding.UTF8, "application/json");
|
|
var content = new StringContent(keys.ToJsonString(), Encoding.UTF8, "application/json");
|
|
string ujson = await _coreAPIHttpService.GetUserInfos(content);
|
|
string ujson = await _coreAPIHttpService.GetUserInfos(content);
|
|
if (!string.IsNullOrWhiteSpace(ujson))
|
|
if (!string.IsNullOrWhiteSpace(ujson))
|
|
{
|
|
{
|
|
var coreUsers = ujson.ToObject<List<CoreUser>>();
|
|
var coreUsers = ujson.ToObject<List<CoreUser>>();
|
|
- if (coreUsers.IsNotEmpty()) {
|
|
|
|
|
|
+ if (coreUsers.IsNotEmpty())
|
|
|
|
+ {
|
|
coreUsers.ForEach(z => {
|
|
coreUsers.ForEach(z => {
|
|
var mb = members.Find(x => x.id.Equals(z.id));
|
|
var mb = members.Find(x => x.id.Equals(z.id));
|
|
- if (mb != null) {
|
|
|
|
|
|
+ if (mb != null)
|
|
|
|
+ {
|
|
mb.no = z.mobile;
|
|
mb.no = z.mobile;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -793,7 +793,7 @@ namespace TEAMModelOS.Controllers
|
|
string input = stringBuilder.ToString();
|
|
string input = stringBuilder.ToString();
|
|
Field fields = input.ToObject<Field>();
|
|
Field fields = input.ToObject<Field>();
|
|
List<OCourseBase> courses = new();
|
|
List<OCourseBase> courses = new();
|
|
- List<(string name, double T, double P, int attendCount,int mCount,int groups,long time,
|
|
|
|
|
|
+ List<(string name, double T, double P, int attendCount, int mCount, int groups, long time,
|
|
List<(string name, int count)> counts, List<(string name, double score)> ps,
|
|
List<(string name, int count)> counts, List<(string name, double score)> ps,
|
|
List<(string name, long time)> appTimes, List<(string name, string url, int duration, long time)> vd)> scores = new();
|
|
List<(string name, long time)> appTimes, List<(string name, string url, int duration, long time)> vd)> scores = new();
|
|
//List<(string name, List<(string name, int count)> counts)> eveCounts = new();
|
|
//List<(string name, List<(string name, int count)> counts)> eveCounts = new();
|
|
@@ -838,11 +838,13 @@ namespace TEAMModelOS.Controllers
|
|
int P4Count = 0;
|
|
int P4Count = 0;
|
|
int P5Count = 0;
|
|
int P5Count = 0;
|
|
List<(string name, long time)> eveTimes = new();
|
|
List<(string name, long time)> eveTimes = new();
|
|
- List<(string name, string url,int duration, long time)> videos = new();
|
|
|
|
- foreach (var v in eve.videos) {
|
|
|
|
- videos.Add((v.videoName,v.video,v.duration, v.startTime));
|
|
|
|
|
|
+ List<(string name, string url, int duration, long time)> videos = new();
|
|
|
|
+ foreach (var v in eve.videos)
|
|
|
|
+ {
|
|
|
|
+ videos.Add((v.videoName, v.video, v.duration, v.startTime));
|
|
}
|
|
}
|
|
- foreach (var apps in eve.eves) {
|
|
|
|
|
|
+ foreach (var apps in eve.eves)
|
|
|
|
+ {
|
|
var name = fields.fields.Where(x => x.field.Equals(apps.@event)).FirstOrDefault()?.desc;
|
|
var name = fields.fields.Where(x => x.field.Equals(apps.@event)).FirstOrDefault()?.desc;
|
|
eveTimes.Add((name, apps.createTime));
|
|
eveTimes.Add((name, apps.createTime));
|
|
}
|
|
}
|
|
@@ -972,7 +974,7 @@ namespace TEAMModelOS.Controllers
|
|
double scoreT = scoreA + scoreB + scoreC;
|
|
double scoreT = scoreA + scoreB + scoreC;
|
|
scoreT = scoreT > 0 ? Math.Round(scoreT, 2) : 0;
|
|
scoreT = scoreT > 0 ? Math.Round(scoreT, 2) : 0;
|
|
P = P > 0 ? Math.Round(P, 2) : 0;
|
|
P = P > 0 ? Math.Round(P, 2) : 0;
|
|
- scores.Add((eve.courseName, scoreT, P,eve.attendCount,eve.mCount,eve.groups.Count,eve.time,eves, PScore, eveTimes, videos));
|
|
|
|
|
|
+ scores.Add((eve.courseName, scoreT, P, eve.attendCount, eve.mCount, eve.groups.Count, eve.time, eves, PScore, eveTimes, videos));
|
|
//eveCounts.Add((eve.courseName, eves));
|
|
//eveCounts.Add((eve.courseName, eves));
|
|
}
|
|
}
|
|
//var eve = courses.Select(c => c.eves).ToList();
|
|
//var eve = courses.Select(c => c.eves).ToList();
|
|
@@ -992,16 +994,16 @@ namespace TEAMModelOS.Controllers
|
|
c.groups,
|
|
c.groups,
|
|
c.time,
|
|
c.time,
|
|
count = c.counts.Select(x => new { x.name, x.count }),
|
|
count = c.counts.Select(x => new { x.name, x.count }),
|
|
- pScore = c.ps.Select(x => new {x.name,x.score }),
|
|
|
|
- appTime = c.appTimes.Select(x => new {x.name,x.time }),
|
|
|
|
- videos = c.vd.Select(x =>new { x.name,x.url,x.duration,x.time})
|
|
|
|
|
|
+ pScore = c.ps.Select(x => new { x.name, x.score }),
|
|
|
|
+ appTime = c.appTimes.Select(x => new { x.name, x.time }),
|
|
|
|
+ videos = c.vd.Select(x => new { x.name, x.url, x.duration, x.time })
|
|
});
|
|
});
|
|
/*var courseCount = eveCounts.Select(c => new
|
|
/*var courseCount = eveCounts.Select(c => new
|
|
{
|
|
{
|
|
c.name,
|
|
c.name,
|
|
count = c.counts.Select(x => new { x.name, x.count })
|
|
count = c.counts.Select(x => new { x.name, x.count })
|
|
});*/
|
|
});*/
|
|
- return new ResponseData<dynamic>() { code = RespondCode.Ok, msg = "成功", data = new { courseScore} };
|
|
|
|
|
|
+ return new ResponseData<dynamic>() { code = RespondCode.Ok, msg = "成功", data = new { courseScore } };
|
|
/*if (period != null)
|
|
/*if (period != null)
|
|
{
|
|
{
|
|
return new ResponseData<dynamic>() { code = RespondCode.Ok, msg = "成功", data = new { period.subjects, period.timetable, period.grades, period.majors, weekDays } };
|
|
return new ResponseData<dynamic>() { code = RespondCode.Ok, msg = "成功", data = new { period.subjects, period.timetable, period.grades, period.majors, weekDays } };
|
|
@@ -1679,7 +1681,7 @@ namespace TEAMModelOS.Controllers
|
|
/// <param name="_dingDing"></param>
|
|
/// <param name="_dingDing"></param>
|
|
/// <param name="json"></param>
|
|
/// <param name="json"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public static async Task<ResponseData<dynamic>> UpsertStudentPortrait(AzureCosmosFactory _azureCosmos, DingDing _dingDing, string bizId, string school, JsonElement json)
|
|
|
|
|
|
+ public static async Task<ResponseData<dynamic>> UpsertStudentPortrait(AzureCosmosFactory _azureCosmos, DingDing _dingDing, JsonElement json,string school=null)
|
|
{
|
|
{
|
|
try
|
|
try
|
|
{
|
|
{
|
|
@@ -1689,6 +1691,11 @@ namespace TEAMModelOS.Controllers
|
|
{
|
|
{
|
|
return responseData = new() { code = RespondCode.ParamsError, msg = "schoolCode为空" };
|
|
return responseData = new() { code = RespondCode.ParamsError, msg = "schoolCode为空" };
|
|
}
|
|
}
|
|
|
|
+#if !DEBUG
|
|
|
|
+ if (!string.IsNullOrWhiteSpace(school) && !school.Equals($"{schoolCode}", StringComparison.OrdinalIgnoreCase)) {
|
|
|
|
+ return responseData = new() { code = RespondCode.ParamsError, msg = "授权学校与参数schoolCode不匹配" };
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
if (!json.TryGetProperty("periodId", out JsonElement periodId))
|
|
if (!json.TryGetProperty("periodId", out JsonElement periodId))
|
|
{
|
|
{
|
|
return responseData = new() { code = RespondCode.ParamsError, msg = "periodId为空" };
|
|
return responseData = new() { code = RespondCode.ParamsError, msg = "periodId为空" };
|
|
@@ -1702,17 +1709,21 @@ namespace TEAMModelOS.Controllers
|
|
return responseData = new() { code = RespondCode.ParamsError, msg = "students为空或格式错误" };
|
|
return responseData = new() { code = RespondCode.ParamsError, msg = "students为空或格式错误" };
|
|
}
|
|
}
|
|
if (!$"{subjectId}".Equals("subject_sport") && !$"{subjectId}".Equals("subject_virtue") && !$"{subjectId}".Equals("subject_labour")
|
|
if (!$"{subjectId}".Equals("subject_sport") && !$"{subjectId}".Equals("subject_virtue") && !$"{subjectId}".Equals("subject_labour")
|
|
- //&& !$"{subjectId}".Equals("subject_music") && !$"{subjectId}".Equals("subject_painting")
|
|
|
|
|
|
+ && !$"{subjectId}".Equals("subject_intelligence")
|
|
&& !$"{subjectId}".Equals("subject_art"))
|
|
&& !$"{subjectId}".Equals("subject_art"))
|
|
{
|
|
{
|
|
return responseData = new() { code = RespondCode.ParamsError, msg = "当前subjectId未开放画像业务" };
|
|
return responseData = new() { code = RespondCode.ParamsError, msg = "当前subjectId未开放画像业务" };
|
|
}
|
|
}
|
|
- School schoolBase = await client.GetContainer(Constant.TEAMModelOS, Constant.School).ReadItemAsync<School>(school, new PartitionKey("Base"));
|
|
|
|
|
|
+ School schoolBase = await client.GetContainer(Constant.TEAMModelOS, Constant.School).ReadItemAsync<School>($"{schoolCode}", new PartitionKey("Base"));
|
|
List<PortraitStudent> students = _students.ToObject<List<PortraitStudent>>();
|
|
List<PortraitStudent> students = _students.ToObject<List<PortraitStudent>>();
|
|
List<(Student studentBase, PortraitStudent portrait)> studentsBases = new List<(Student, PortraitStudent)>();
|
|
List<(Student studentBase, PortraitStudent portrait)> studentsBases = new List<(Student, PortraitStudent)>();
|
|
|
|
+ //学生信息不匹配的
|
|
List<PortraitStudent> unmatchStuInfo = new List<PortraitStudent>();
|
|
List<PortraitStudent> unmatchStuInfo = new List<PortraitStudent>();
|
|
|
|
+ //学期不匹配的
|
|
List<PortraitStudent> unmatchSemester = new List<PortraitStudent>();
|
|
List<PortraitStudent> unmatchSemester = new List<PortraitStudent>();
|
|
List<PortraitStudent> upsertDatas = new List<PortraitStudent>();
|
|
List<PortraitStudent> upsertDatas = new List<PortraitStudent>();
|
|
|
|
+ //细项类型不匹配的
|
|
|
|
+ List<PortraitStudent> unmatchItemScoreType = new List<PortraitStudent>();
|
|
string stusql = $"select c.id,c.classId,c.name,c.year from c where c.id in ({string.Join(",", students.Select(f => $"'{f.studentId}'"))})";
|
|
string stusql = $"select c.id,c.classId,c.name,c.year from c where c.id in ({string.Join(",", students.Select(f => $"'{f.studentId}'"))})";
|
|
await foreach (var item in client.GetContainer(Constant.TEAMModelOS, Constant.Student)
|
|
await foreach (var item in client.GetContainer(Constant.TEAMModelOS, Constant.Student)
|
|
.GetItemQueryIterator<Student>(queryText: stusql, requestOptions: new QueryRequestOptions { PartitionKey = new PartitionKey($"Base-{schoolCode}") }))
|
|
.GetItemQueryIterator<Student>(queryText: stusql, requestOptions: new QueryRequestOptions { PartitionKey = new PartitionKey($"Base-{schoolCode}") }))
|
|
@@ -1763,9 +1774,9 @@ namespace TEAMModelOS.Controllers
|
|
periodChange = true;
|
|
periodChange = true;
|
|
}
|
|
}
|
|
//是否需要创建科目
|
|
//是否需要创建科目
|
|
- if (!$"{subjectId}".Equals("subject_art"))
|
|
|
|
|
|
+ if (!$"{subjectId}".Equals("subject_art", StringComparison.OrdinalIgnoreCase) || !$"{subjectId}".Equals("subject_intelligence", StringComparison.OrdinalIgnoreCase))
|
|
{
|
|
{
|
|
- var bind = period.subjects.Find(x => !string.IsNullOrWhiteSpace(x.bindId) && x.bindId.Equals($"{subjectId}"));
|
|
|
|
|
|
+ var bind = period.subjects.Find(x => !string.IsNullOrWhiteSpace(x.bindId) && x.bindId.Equals($"{subjectId}", StringComparison.OrdinalIgnoreCase));
|
|
if (bind == null)
|
|
if (bind == null)
|
|
{
|
|
{
|
|
string subjectName = "";
|
|
string subjectName = "";
|
|
@@ -1802,9 +1813,44 @@ namespace TEAMModelOS.Controllers
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ //是否要创建艺术类的 音乐,美术科目
|
|
|
|
+ if ($"{subjectId}".Equals("subject_art", StringComparison.OrdinalIgnoreCase))
|
|
|
|
+ {
|
|
|
|
+ var bind_music = period.subjects.Find(x => !string.IsNullOrWhiteSpace(x.bindId) && x.bindId.Equals("subject_music", StringComparison.OrdinalIgnoreCase));
|
|
|
|
+ if (bind_music != null)
|
|
|
|
+ {
|
|
|
|
+ string subjectName = "音乐";
|
|
|
|
+ var subName = period.subjects.Find(z => z.name.Contains(subjectName));
|
|
|
|
+ if (subName != null)
|
|
|
|
+ {
|
|
|
|
+ subName.bindId = "subject_music";
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ period.subjects.Add(new Subject { id = Guid.NewGuid().ToString(), name = subjectName, bindId = "subject_music", type = 1 });
|
|
|
|
+ }
|
|
|
|
+ periodChange = true;
|
|
|
|
+ }
|
|
|
|
+ var bind_painting = period.subjects.Find(x => !string.IsNullOrWhiteSpace(x.bindId) && x.bindId.Equals("subject_painting", StringComparison.OrdinalIgnoreCase));
|
|
|
|
+ if (bind_painting != null)
|
|
|
|
+ {
|
|
|
|
+ string subjectName = "美术";
|
|
|
|
+ var subName = period.subjects.Find(z => z.name.Contains(subjectName));
|
|
|
|
+ if (subName != null)
|
|
|
|
+ {
|
|
|
|
+ subName.bindId = "subject_painting";
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ period.subjects.Add(new Subject { id = Guid.NewGuid().ToString(), name = subjectName, bindId = "subject_painting", type = 1 });
|
|
|
|
+ }
|
|
|
|
+ periodChange = true;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (periodChange)
|
|
if (periodChange)
|
|
{
|
|
{
|
|
- await client.GetContainer(Constant.TEAMModelOS, Constant.School).ReplaceItemAsync<School>(schoolBase, school, new PartitionKey("Base"));
|
|
|
|
|
|
+ await client.GetContainer(Constant.TEAMModelOS, Constant.School).ReplaceItemAsync<School>(schoolBase, $"{schoolCode}", new PartitionKey("Base"));
|
|
}
|
|
}
|
|
List<Semester> sortedSemesters = SchoolService.SortSemester(period.semesters);
|
|
List<Semester> sortedSemesters = SchoolService.SortSemester(period.semesters);
|
|
foreach (var studentInfo in studentsBases)
|
|
foreach (var studentInfo in studentsBases)
|
|
@@ -1930,7 +1976,7 @@ namespace TEAMModelOS.Controllers
|
|
});
|
|
});
|
|
if (newOverallEducations.Any())
|
|
if (newOverallEducations.Any())
|
|
{
|
|
{
|
|
- newOverallEducations = FillSemesterData($"{subjectId}", newOverallEducations, newDatas);
|
|
|
|
|
|
+ (newOverallEducations, unmatchItemScoreType) = FillSemesterData($"{subjectId}", newOverallEducations, unmatchItemScoreType, newDatas,period);
|
|
foreach (var edu in newOverallEducations)
|
|
foreach (var edu in newOverallEducations)
|
|
{
|
|
{
|
|
await client.GetContainer(Constant.TEAMModelOS, Constant.Student).CreateItemAsync(edu, new PartitionKey(edu.code));
|
|
await client.GetContainer(Constant.TEAMModelOS, Constant.Student).CreateItemAsync(edu, new PartitionKey(edu.code));
|
|
@@ -1938,7 +1984,7 @@ namespace TEAMModelOS.Controllers
|
|
}
|
|
}
|
|
if (overallEducations.Any())
|
|
if (overallEducations.Any())
|
|
{
|
|
{
|
|
- overallEducations = FillSemesterData($"{subjectId}", overallEducations, updateDatas);
|
|
|
|
|
|
+ (overallEducations, unmatchItemScoreType) = FillSemesterData($"{subjectId}", overallEducations, unmatchItemScoreType, updateDatas, period);
|
|
foreach (var edu in overallEducations)
|
|
foreach (var edu in overallEducations)
|
|
{
|
|
{
|
|
await client.GetContainer(Constant.TEAMModelOS, Constant.Student).ReplaceItemAsync(edu, edu.id, new PartitionKey(edu.code));
|
|
await client.GetContainer(Constant.TEAMModelOS, Constant.Student).ReplaceItemAsync(edu, edu.id, new PartitionKey(edu.code));
|
|
@@ -1948,7 +1994,7 @@ namespace TEAMModelOS.Controllers
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- return responseData = new() { data = new { unmatchStuInfo, unmatchSemester, upsertDatas }, code = RespondCode.Ok, msg = "成功" };
|
|
|
|
|
|
+ return responseData = new() { data = new { unmatchStuInfo, unmatchSemester, unmatchItemScoreType, upsertDatas }, code = RespondCode.Ok, msg = "成功" };
|
|
}
|
|
}
|
|
catch (CosmosException cex) when (cex.Status == 404)
|
|
catch (CosmosException cex) when (cex.Status == 404)
|
|
{
|
|
{
|
|
@@ -1956,14 +2002,13 @@ namespace TEAMModelOS.Controllers
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
{
|
|
{
|
|
- await _dingDing.SendBotMsg($"OpenApi,{Environment.GetEnvironmentVariable("Option:Location")} OpenApiService/UpsertStudentPortrait() 参数:bizId:{bizId},school:{school},参数json:{json.ToJsonString()} \n {ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
|
|
|
|
|
|
+ await _dingDing.SendBotMsg($"OpenApi,{Environment.GetEnvironmentVariable("Option:Location")} OpenApiService/UpsertStudentPortrait() ,参数json:{json.ToJsonString()} \n {ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
|
|
return new ResponseData<dynamic>() { code = RespondCode.Error, msg = "服务端异常" };
|
|
return new ResponseData<dynamic>() { code = RespondCode.Error, msg = "服务端异常" };
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- public static List<OverallEducation> FillSemesterData(string subjectId, List<OverallEducation> overallEducations, List<SemesterData> semestersDatas)
|
|
|
|
|
|
+ public static (List<OverallEducation> overallEducations, List<PortraitStudent> unmatchItemScoreType) FillSemesterData(string subjectId, List<OverallEducation> overallEducations,List<PortraitStudent> unmatchItemScoreType, List<SemesterData> semestersDatas,Period period)
|
|
{
|
|
{
|
|
-
|
|
|
|
- semestersDatas.ForEach(z =>
|
|
|
|
|
|
+ foreach (var z in semestersDatas)
|
|
{
|
|
{
|
|
var oedu = overallEducations.Find(x => x.id.Equals($"{z.year}-{z.semesterId}"));
|
|
var oedu = overallEducations.Find(x => x.id.Equals($"{z.year}-{z.semesterId}"));
|
|
if (oedu != null)
|
|
if (oedu != null)
|
|
@@ -1980,15 +2025,46 @@ namespace TEAMModelOS.Controllers
|
|
case bool when $"{subjectId}".Equals("subject_labour"):
|
|
case bool when $"{subjectId}".Equals("subject_labour"):
|
|
educationScores = oedu.labour;
|
|
educationScores = oedu.labour;
|
|
break;
|
|
break;
|
|
- //case bool when $"{subjectId}".Equals("subject_music"):
|
|
|
|
- // educationScores = oedu.art;
|
|
|
|
- // break;
|
|
|
|
- //case bool when $"{subjectId}".Equals("subject_painting"):
|
|
|
|
- // educationScores = oedu.art;
|
|
|
|
- // break;
|
|
|
|
|
|
+ case bool when $"{subjectId}".Equals("subject_intelligence"):
|
|
|
|
+ {
|
|
|
|
+ educationScores = oedu.intelligence;
|
|
|
|
+ //对评测需要验证 细项的具体信息
|
|
|
|
+ bool isunmatch = false;
|
|
|
|
+ foreach (var v in z.itemScore)
|
|
|
|
+ {
|
|
|
|
+ var subject = period.subjects.Find(b => b.id.Equals(v.type));
|
|
|
|
+ if (subject == null)
|
|
|
|
+ {
|
|
|
|
+ isunmatch = true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (isunmatch)
|
|
|
|
+ {
|
|
|
|
+ unmatchItemScoreType.Add(new PortraitStudent { classId = oedu.classId, name = oedu.name, studentId = oedu.studentId, semesterData = new List<SemesterData> { z } });
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
case bool when $"{subjectId}".Equals("subject_art"):
|
|
case bool when $"{subjectId}".Equals("subject_art"):
|
|
- educationScores = oedu.art;
|
|
|
|
- break;
|
|
|
|
|
|
+ {
|
|
|
|
+ educationScores = oedu.art;
|
|
|
|
+ //对艺术评测需要验证 细项的具体信息
|
|
|
|
+ bool isunmatch = false;
|
|
|
|
+ foreach (var v in z.itemScore)
|
|
|
|
+ {
|
|
|
|
+ var subject = period.subjects.Find(b => b.bindId.Equals(v.type));
|
|
|
|
+ if (subject == null)
|
|
|
|
+ {
|
|
|
|
+ isunmatch = true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (isunmatch)
|
|
|
|
+ {
|
|
|
|
+ unmatchItemScoreType.Add(new PortraitStudent { classId = oedu.classId, name = oedu.name, studentId = oedu.studentId, semesterData = new List<SemesterData> { z } });
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
default:
|
|
default:
|
|
educationScores = new List<EducationScore>();
|
|
educationScores = new List<EducationScore>();
|
|
break;
|
|
break;
|
|
@@ -2012,8 +2088,8 @@ namespace TEAMModelOS.Controllers
|
|
edu.passRate = z.passRate;
|
|
edu.passRate = z.passRate;
|
|
edu.itemScore = z.itemScore;
|
|
edu.itemScore = z.itemScore;
|
|
}
|
|
}
|
|
- });
|
|
|
|
- return overallEducations;
|
|
|
|
|
|
+ }
|
|
|
|
+ return (overallEducations, unmatchItemScoreType);
|
|
}
|
|
}
|
|
public static void GenApiTableRecord(AzureStorageFactory azureStorage)
|
|
public static void GenApiTableRecord(AzureStorageFactory azureStorage)
|
|
{
|
|
{
|