|
@@ -20,6 +20,7 @@ namespace Learun.Application.WebApi.Modules.Echarts |
|
|
private StuEncourgementIBLL stuEncourgementIBLL = new StuEncourgementBLL(); |
|
|
private StuEncourgementIBLL stuEncourgementIBLL = new StuEncourgementBLL(); |
|
|
private StuTransferInfoIBLL stuTransferInfoIBLL = new StuTransferInfoBLL(); |
|
|
private StuTransferInfoIBLL stuTransferInfoIBLL = new StuTransferInfoBLL(); |
|
|
private StuGraduateStatisticIBLL stuGraduateStatisticIBLL = new StuGraduateStatisticBLL(); |
|
|
private StuGraduateStatisticIBLL stuGraduateStatisticIBLL = new StuGraduateStatisticBLL(); |
|
|
|
|
|
private CdMajorIBLL cdMajorIBLL = new CdMajorBLL(); |
|
|
|
|
|
|
|
|
public StudentEchartsApi() : base("/api/studentEcharts/") |
|
|
public StudentEchartsApi() : base("/api/studentEcharts/") |
|
|
{ |
|
|
{ |
|
@@ -39,6 +40,8 @@ namespace Learun.Application.WebApi.Modules.Echarts |
|
|
Get["/stuMapEchart"] = stuMapEchart; |
|
|
Get["/stuMapEchart"] = stuMapEchart; |
|
|
Get["/stuGradeSelect"] = stuGradeSelect; |
|
|
Get["/stuGradeSelect"] = stuGradeSelect; |
|
|
Get["/stuClassSelect"] = stuClassSelect; |
|
|
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)); |
|
|
return Res(res.OrderBy(x => x.value)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
/// 专业下拉框 |
|
|
|
|
|
/// </summary> |
|
|
|
|
|
/// <param name="_"></param> |
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
public Response majorSelect(dynamic _) |
|
|
|
|
|
{ |
|
|
|
|
|
var res = new List<SelectModel>(); |
|
|
|
|
|
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)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
/// 学生班级信息统计 |
|
|
|
|
|
/// </summary> |
|
|
|
|
|
/// <param name="_"></param> |
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
public Response stuClassEchart(dynamic _) |
|
|
|
|
|
{ |
|
|
|
|
|
var param = this.GetReq<ClassParam>(); |
|
|
|
|
|
var res = new List<TableModelOfClass>(); |
|
|
|
|
|
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 string ClassNo { get; set; } |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
/// 班级信息统计数据 |
|
|
|
|
|
/// </summary> |
|
|
|
|
|
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; } |
|
|
|
|
|
} |
|
|
|
|
|
/// <summary> |
|
|
|
|
|
/// 班级信息统计的传参 |
|
|
|
|
|
/// </summary> |
|
|
|
|
|
public class ClassParam |
|
|
|
|
|
{ |
|
|
|
|
|
public string MajorNo { get; set; } |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|