|
@@ -1976,7 +1976,7 @@ namespace TEAMModelOS.SDK
|
|
|
});
|
|
|
if (newOverallEducations.Any())
|
|
|
{
|
|
|
- (newOverallEducations, unmatchItemScoreType) = FillSemesterData($"{subjectId}", newOverallEducations, unmatchItemScoreType, newDatas,period);
|
|
|
+ (newOverallEducations, unmatchItemScoreType) = FillSemesterData(studentId, $"{subjectId}", newOverallEducations, unmatchItemScoreType, newDatas,period);
|
|
|
foreach (var edu in newOverallEducations)
|
|
|
{
|
|
|
await client.GetContainer(Constant.TEAMModelOS, Constant.Student).CreateItemAsync(edu, new PartitionKey(edu.code));
|
|
@@ -1984,7 +1984,7 @@ namespace TEAMModelOS.SDK
|
|
|
}
|
|
|
if (overallEducations.Any())
|
|
|
{
|
|
|
- (overallEducations, unmatchItemScoreType) = FillSemesterData($"{subjectId}", overallEducations, unmatchItemScoreType, updateDatas, period);
|
|
|
+ (overallEducations, unmatchItemScoreType) = FillSemesterData(studentId, $"{subjectId}", overallEducations, unmatchItemScoreType, updateDatas, period);
|
|
|
foreach (var edu in overallEducations)
|
|
|
{
|
|
|
await client.GetContainer(Constant.TEAMModelOS, Constant.Student).ReplaceItemAsync(edu, edu.id, new PartitionKey(edu.code));
|
|
@@ -2006,11 +2006,11 @@ namespace TEAMModelOS.SDK
|
|
|
return new ResponseData<dynamic>() { code = RespondCode.Error, msg = "服务端异常" };
|
|
|
}
|
|
|
}
|
|
|
- public static (List<OverallEducation> overallEducations, List<PortraitStudent> unmatchItemScoreType) FillSemesterData(string subjectId, List<OverallEducation> overallEducations,List<PortraitStudent> unmatchItemScoreType, List<SemesterData> semestersDatas,Period period)
|
|
|
+ public static (List<OverallEducation> overallEducations, List<PortraitStudent> unmatchItemScoreType) FillSemesterData(string studentId, string subjectId, List<OverallEducation> overallEducations,List<PortraitStudent> unmatchItemScoreType, List<SemesterData> semestersDatas,Period period)
|
|
|
{
|
|
|
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}-{studentId}"));
|
|
|
if (oedu != null)
|
|
|
{
|
|
|
List<EducationScore> educationScores = null;
|
|
@@ -2052,7 +2052,7 @@ namespace TEAMModelOS.SDK
|
|
|
bool isunmatch = false;
|
|
|
foreach (var v in z.itemScore)
|
|
|
{
|
|
|
- var subject = period.subjects.Find(b => b.bindId.Equals(v.type));
|
|
|
+ var subject = period.subjects.Find(b =>!string .IsNullOrWhiteSpace(b.bindId) && b.bindId.Equals(v.type));
|
|
|
if (subject == null)
|
|
|
{
|
|
|
isunmatch = true;
|