浏览代码

Merge branch 'develop' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop

CrazyIter_Bin 2 年之前
父节点
当前提交
e19c17e459
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      TEAMModelBI/Controllers/BISchool/SchoolController.cs

+ 2 - 2
TEAMModelBI/Controllers/BISchool/SchoolController.cs

@@ -1536,7 +1536,7 @@ namespace TEAMModelBI.Controllers.BISchool
             }
 
             List<(string name, string periodId, int count)> grades = LessonStatisWay.GetGradeCount(records);
-            var subs = records.GroupBy(x => x.subjectId).Select(y => new { key = y.Key, count = y.ToList().Count }).ToList();
+            var subs = records.GroupBy(x => x.subjectId).Where(w => !string.IsNullOrEmpty(w.Key)).Select(y => new { key = y.Key, count = y.ToList().Count }).ToList();
 
             var gradeCnt = grades.Select(x => new { x.name, x.periodId, value = x.count });
             var subCnt = subs.Select(x => new { name = x.key, value = x.count });
@@ -1883,7 +1883,7 @@ namespace TEAMModelBI.Controllers.BISchool
                 lessAnalyses.Add(lessItem);
             }
             List<(string name, string periodId, int count)> grades = LessonStatisWay.GetGradeCount(lessAnalyses);
-            var subs = lessAnalyses.GroupBy(x => x.subjectId).Select(y => new { key = y.Key, count = y.ToList().Count }).ToList();
+            var subs = lessAnalyses.GroupBy(x => x.subjectId).Where(y => !string.IsNullOrEmpty(y.Key)).Select(y => new { key = y.Key, count = y.ToList().Count }).ToList();
 
             var gradeCnt = grades.Select(x => new { x.name, x.periodId,value = x.count });
             var subCnt = subs.Select(x => new { name = x.key, value = x.count });