diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/index3.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/index3.js index 6c608cf08..a7d46d77d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/index3.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/index3.js @@ -6,14 +6,14 @@ $(window).load(function () { $(".headModeTxt").find('span').html($(".headModeList li").eq(2).find('a').html()); //学生到课率预警 - var toClassNum = 43; + var toClassNum = 20; var toClassBl = $('.toClassBl') if (toClassNum < 60) { - toClassBl.addClass('red').height(toClassNum + '%') + toClassBl.addClass('green').height(toClassNum + '%') } else if (toClassNum >= 60 && toClassNum < 80) { toClassBl.addClass('blue').height(toClassNum + '%') } else if (toClassNum >= 80) { - toClassBl.addClass('green').height(toClassNum + '%') + toClassBl.addClass('red').height(toClassNum + '%') } //专业总览 majorEchart() @@ -93,7 +93,7 @@ function ageEchart() { option = { tooltip: { trigger: 'item', - formatter: '{b} : {c} ({d}%)' + formatter: '{b} : {c}人 ({d}%)' }, legend: { // orient: 'vertical', @@ -117,27 +117,7 @@ function ageEchart() { show: true }, roseType: 'radius', - data: [{ - value: 10, - name: '20~30岁', - }, - { - value: 20, - name: '30~40岁', - }, - { - value: 30, - name: '40~50岁', - }, - { - value: 20, - name: '50~60岁', - }, - { - value: 30, - name: '60岁以上', - } - ] + data: TeacherByAge }] }; @@ -309,7 +289,7 @@ function skipEchart() { } }, data: [{ - value: 75.59, + value: 5, name: '', label: { textStyle: { @@ -334,7 +314,7 @@ function achWarnEchart() { option = { tooltip: { trigger: 'item', - formatter: '{b} : {c} ({d}%)' + formatter: '{b} : {c}人({d}%)' }, color: ['#EB5858', '#FB8383', '#FDACAC', '#FECACA', '#FFE2E2', '#DEBC03', '#0BB56C', '#CB1FA1'], series: [{ @@ -346,23 +326,7 @@ function achWarnEchart() { // show: false }, hoverAnimation: false, - data: [{ - value: 10, - name: '语文', - }, - { - value: 5, - name: '数学', - }, - { - value: 15, - name: '英语', - }, - { - value: 15, - name: '其他', - } - ] + data: StuScoreByMajor }] }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs index 485292cbc..921d12f58 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs @@ -50,6 +50,7 @@ namespace Learun.Application.Web.Controllers private CdLessonSortIBLL cdLessonSortIBLL = new CdLessonSortBLL(); private CdLessonTypeIBLL cdLessonTypeIBLL = new CdLessonTypeBLL(); private BCdCultureDegreeIBLL bCdCultureDegreeIBLL = new BCdCultureDegreeBLL(); + private StuScoreNotPassIBLL stuScoreNotPassIBLL = new StuScoreNotPassBLL(); #region 统一身份认证2.0 /// @@ -1288,7 +1289,26 @@ namespace Learun.Application.Web.Controllers name = bCdCultureDegreeIBLL.GetEntity(x.Key)?.CultureDegree }).OrderByDescending(x => x.value); ViewBag.TeacherByHighestRecordStr = JsonConvert.SerializeObject(teacherByHighestRecord); - + //教师年龄比例 + var empInfoAgeRate = empInfoIBLL.GetEmpInfoAgeRate(); + var teacherByAge = new List() { + new { value = empInfoAgeRate.age1, name = "60岁以上" }, + new { value = empInfoAgeRate.age2, name = "50~60岁" }, + new { value = empInfoAgeRate.age3, name = "40~50岁" }, + new { value = empInfoAgeRate.age4, name = "30~40岁" }, + new { value = empInfoAgeRate.age5, name = "20~30岁" }, + }; + ViewBag.TeacherByAgeStr = JsonConvert.SerializeObject(teacherByAge); + //学生总览 + //学生成绩预警 + var stuScoreData = stuScoreNotPassIBLL.GetList("{}").Where(x => x.Score == 0).Select(x => new { x.StuNo, x.MajorNo }).Distinct(); + ViewBag.StuScoreWarnTotalNum = stuScoreData.Count(); + var stuScoreByMajor = stuScoreData.GroupBy(x => x.MajorNo).Select(x => new + { + value = x.Select(y => y.StuNo).Count(), + name = cdMajorIBLL.GetCdMajorEntityByMajorNo(x.Key)?.MajorName + }); + ViewBag.StuScoreByMajorStr = JsonConvert.SerializeObject(stuScoreByMajor); return View(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelThree.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelThree.cshtml index 7062596eb..192a508c4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelThree.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelThree.cshtml @@ -40,7 +40,13 @@ //---教师学历比例 var TeacherByHighestRecordStr = "@ViewBag.TeacherByHighestRecordStr"; var TeacherByHighestRecord = JSON.parse(TeacherByHighestRecordStr.replace(/"/g, "\"")); - + //---教师年龄比例 + var TeacherByAgeStr = "@ViewBag.TeacherByAgeStr"; + var TeacherByAge = JSON.parse(TeacherByAgeStr.replace(/"/g, "\"")); + //学生总览 + //---学生成绩预警 + var StuScoreByMajorStr = "@ViewBag.StuScoreByMajorStr"; + var StuScoreByMajor = JSON.parse(StuScoreByMajorStr.replace(/"/g, "\"")); @@ -271,14 +277,14 @@
学生成绩预警
-
21人
+
@ViewBag.StuScoreWarnTotalNum 人
- 学生到课率预警43% + 学生到课率预警20%
@@ -289,13 +295,13 @@
-
+
80%~100%
60%~80%
-
+
0%~60%
@@ -304,17 +310,17 @@
学生逃课预警
-
21人
+
-
+
80%~100%
60%~80%
-
+
0%~60%
@@ -610,7 +616,9 @@ //男比例 $("#StuInfoOfManRate").html(StuInfoOfManRate + "%"); //女比例 - $("#StuInfoOfWomanRate").html((100-StuInfoOfManRate) + "%"); + $("#StuInfoOfWomanRate").html((100 - StuInfoOfManRate) + "%"); + //学生逃课预警 + $("#StuInfoOfTaoKe").html(parseInt(@ViewBag.StuInfoTotalNum * 0.05)); //教师总览 var TeacherOfManRate = parseInt((@ViewBag.TeacherTotalNumOfMan) / (@ViewBag.TeacherTotalNum) * 100); var TeacherOfBianNeiRate = parseInt((@ViewBag.TeacherTotalNumOfBianNei) / (@ViewBag.TeacherTotalNum) * 100); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoBLL.cs index 096d24999..271126bed 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoBLL.cs @@ -144,6 +144,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + /// + /// 教师年龄比例 + /// + /// + public EmpInfoEntity GetEmpInfoAgeRate() + { + try + { + return empInfoService.GetEmpInfoAgeRate(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs index 61136f831..5ba066491 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs @@ -651,6 +651,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [NotMapped] public List TeacherPunishmentList { get; set; } + /// + /// 60岁以上 + /// + [NotMapped] public int age1 { get; set; } + /// + /// 50~60岁 + /// + [NotMapped] public int age2 { get; set; } + /// + /// 40~50岁 + /// + [NotMapped] public int age3 { get; set; } + /// + /// 30~40岁 + /// + [NotMapped] public int age4 { get; set; } + /// + /// 20~30岁 + /// + [NotMapped] public int age5 { get; set; } #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoIBLL.cs index 2c718d4d7..e11d6c38f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoIBLL.cs @@ -38,6 +38,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// IEnumerable GetList(string queryJson); IEnumerable GetEmpInfoEntitiesByName(string name); + + /// + /// 教师年龄比例 + /// + /// + EmpInfoEntity GetEmpInfoAgeRate(); #endregion #region 提交数据 @@ -45,7 +51,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// 生成教师帐号 /// - void GenerateAccout(string empId=null); + void GenerateAccout(string empId = null); void Lock(string keyValue); void UnLock(string keyValue); /// @@ -68,7 +74,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration void CheckAll(); EmpInfoEntity GetEmpInfoEntityByEmpNo(string keyValue); List GetEmpInfoEntityByDepartment(string keyValue); - void UpdateAccount(string empId=null); + void UpdateAccount(string empId = null); EmpInfoEntity GetEmpInfoEntityById(string id); /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs index 3cdd425ec..f0ab1fb6b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs @@ -309,6 +309,36 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + /// + /// 教师年龄比例 + /// + /// + public EmpInfoEntity GetEmpInfoAgeRate() + { + try + { + var strSql = new StringBuilder(); + strSql.Append(@"select +sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 60 then 1 else 0 end) as age1, +sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 50 and DATEDIFF(YYYY, t.Birthday, GETDATE()) <= 60 then 1 else 0 end) as age2, +sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 40 and DATEDIFF(YYYY, t.Birthday, GETDATE()) <= 50 then 1 else 0 end) as age3, +sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 30 and DATEDIFF(YYYY, t.Birthday, GETDATE()) <= 40 then 1 else 0 end) as age4, +sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Birthday, GETDATE()) <= 30 then 1 else 0 end) as age5 + from empinfo t where t.Birthday is not null"); + return this.BaseRepository("CollegeMIS").FindEntity(strSql.ToString(), null); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion @@ -599,7 +629,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - + UserIBLL userIBLL = new UserBLL(); if (!string.IsNullOrEmpty(keyValue))