diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Echarts/StudentEchartsApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Echarts/StudentEchartsApi.cs
index 7415b03b5..d60ba6ccc 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Echarts/StudentEchartsApi.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Echarts/StudentEchartsApi.cs
@@ -20,6 +20,7 @@ namespace Learun.Application.WebApi.Modules.Echarts
private StuEncourgementIBLL stuEncourgementIBLL = new StuEncourgementBLL();
private StuTransferInfoIBLL stuTransferInfoIBLL = new StuTransferInfoBLL();
private StuGraduateStatisticIBLL stuGraduateStatisticIBLL = new StuGraduateStatisticBLL();
+ private CdMajorIBLL cdMajorIBLL = new CdMajorBLL();
public StudentEchartsApi() : base("/api/studentEcharts/")
{
@@ -39,6 +40,8 @@ namespace Learun.Application.WebApi.Modules.Echarts
Get["/stuMapEchart"] = stuMapEchart;
Get["/stuGradeSelect"] = stuGradeSelect;
Get["/stuClassSelect"] = stuClassSelect;
+ Get["/majorSelect"] = majorSelect;
+ Get["/stuClassEchart"] = stuClassEchart;
}
@@ -395,6 +398,52 @@ namespace Learun.Application.WebApi.Modules.Echarts
return Res(res.OrderBy(x => x.value));
}
+ ///
+ /// 专业下拉框
+ ///
+ ///
+ ///
+ public Response majorSelect(dynamic _)
+ {
+ var res = new List();
+ var stuList = cdMajorIBLL.GetAllList().Where(x => x.MajorNo != null && x.MajorNo.Length > 0).GroupBy(x => x.MajorNo).Select(x => new SelectModel()
+ {
+ value = x.Key,
+ label = x.FirstOrDefault().MajorName
+ }).OrderBy(x => x.value);
+ res.Add(new SelectModel() { value = "", label = "全校" });
+ res.AddRange(stuList);
+
+ return Res(res.OrderBy(x => x.value));
+ }
+
+ ///
+ /// 学生班级信息统计
+ ///
+ ///
+ ///
+ public Response stuClassEchart(dynamic _)
+ {
+ var param = this.GetReq();
+ var res = new List();
+ var stuList = classInfoIBLL.GetAllClass().Where(x => x.ClassNo != null && x.ClassNo.Length > 0);
+ if (!string.IsNullOrEmpty(param.MajorNo))
+ {
+ stuList = stuList.Where(x => x.MajorNo == param.MajorNo);
+ }
+ var groupList = stuList.GroupBy(x => x.ClassNo).Select(x => new TableModelOfClass()
+ {
+ classno = x.Key,
+ classname = x.FirstOrDefault().ClassName,
+ man = stuInfoBasicIBLL.GetStuInfoByClassNo(x.Key).Where(y => y.GenderNo == true).Count(),
+ woman = stuInfoBasicIBLL.GetStuInfoByClassNo(x.Key).Where(y => y.GenderNo == false).Count(),
+ total = stuInfoBasicIBLL.GetStuInfoByClassNo(x.Key).Count()
+ }).OrderBy(x => x.classno);
+ res.AddRange(groupList);
+
+ return Res(res);
+ }
+
@@ -472,6 +521,25 @@ namespace Learun.Application.WebApi.Modules.Echarts
public string ClassNo { get; set; }
}
+ ///
+ /// 班级信息统计数据
+ ///
+ public class TableModelOfClass
+ {
+ public string classno { get; set; }
+ public string classname { get; set; }
+ public int man { get; set; }
+ public int woman { get; set; }
+ public int total { get; set; }
+ }
+ ///
+ /// 班级信息统计的传参
+ ///
+ public class ClassParam
+ {
+ public string MajorNo { get; set; }
+ }
+