|
- using Learun.Application.Base.SystemModule;
- using Learun.Application.TwoDevelopment.EducationalAdministration;
- using Learun.Util;
- using Nancy;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- using System.Net.Http;
- using System.Web.Http;
-
- namespace Learun.Application.WebApi.Modules.Echarts
- {
- public class StudentEchartsApi : BaseNoAuthentication
- {
- private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
- private DataItemIBLL dataItemIBLL = new DataItemBLL();
- private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
- private DIC_PROVINCEIBLL dIC_PROVINCEIBLL = new DIC_PROVINCEBLL();
- private DIC_CITYIBLL dIC_CITYIBLL = new DIC_CITYBLL();
- private StuEncourgementIBLL stuEncourgementIBLL = new StuEncourgementBLL();
- private StuTransferInfoIBLL stuTransferInfoIBLL = new StuTransferInfoBLL();
- private StuGraduateStatisticIBLL stuGraduateStatisticIBLL = new StuGraduateStatisticBLL();
- private CdMajorIBLL cdMajorIBLL = new CdMajorBLL();
- private EmpInfoIBLL empInfoIBLL = new EmpInfoBLL();
-
- public StudentEchartsApi() : base("/api/studentEcharts/")
- {
- Get["/stuTotalNum"] = stuTotalNum;
- Get["/stuManNum"] = stuManNum;
- Get["/stuWomanNum"] = stuWomanNum;
- Get["/stuSexEchart"] = stuSexEchart;
- Get["/stuAgeEchart"] = stuAgeEchart;
- Get["/stuNationalityEchart"] = stuNationalityEchart;
- Get["/stuPartyFaceEchart"] = stuPartyFaceEchart;
- Get["/stuClassPartyFaceEchart"] = stuClassPartyFaceEchart;
- Get["/stuProvinceEchart"] = stuProvinceEchart;
- Get["/stuEncourgementNum"] = stuEncourgementNum;
- Get["/stuEncourgementEchart"] = stuEncourgementEchart;
- Get["/stuTransferNum"] = stuTransferNum;
- Get["/stuGraduateEchart"] = stuGraduateEchart;
- Get["/stuMapEchart"] = stuMapEchart;
- Get["/stuGradeSelect"] = stuGradeSelect;
- Get["/stuClassSelect"] = stuClassSelect;
-
- Get["/majorSelect"] = majorSelect;
- Get["/stuClassEchart"] = stuClassEchart;
-
- Get["/teacherNumOfZZMM"] = teacherNumOfZZMM;
- Get["/teacherNumOfBZQK"] = teacherNumOfBZQK;
- Get["/teacherAgeEchart"] = teacherAgeEchart;
- Get["/teacherSexEchart"] = teacherSexEchart;
- Get["/teacherCollegeEchart"] = teacherCollegeEchart;
- Get["/teacherNationalEchart"] = teacherNationalEchart;
-
-
- }
- #region 学生信息分析
-
- /// <summary>
- /// 在校学生人数
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response stuTotalNum(dynamic _)
- {
- var sum = stuInfoBasicIBLL.GetAllList().Count();
- var res = new { value = sum };
-
- return Res(res);
- }
- /// <summary>
- /// 在校学生人数-男
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response stuManNum(dynamic _)
- {
- var sum = stuInfoBasicIBLL.GetAllList().Where(x => x.GenderNo == true).Count();
- var res = new { value = sum };
-
- return Res(res);
- }
- /// <summary>
- /// 在校学生人数-女
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response stuWomanNum(dynamic _)
- {
- var sum = stuInfoBasicIBLL.GetAllList().Where(x => x.GenderNo == false).Count();
- var res = new { value = sum };
-
- return Res(res);
- }
- /// <summary>
- /// 在校学生人数-性别图表
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response stuSexEchart(dynamic _)
- {
- var stuList = stuInfoBasicIBLL.GetAllList();
- var stuManNum = stuList.Where(x => x.GenderNo == true).Count();
- var stuWomanNum = stuList.Where(x => x.GenderNo == false).Count();
-
- var res = new BarModel()
- {
- categories = new List<string>(),
- series = new List<seriesModel>()
- };
- res.categories.Add("性别");
- var s1data = new List<int>();
- s1data.Add(stuManNum);
- res.series.Add(new seriesModel { name = "男", data = s1data });
- var s2data = new List<int>();
- s2data.Add(stuWomanNum);
- res.series.Add(new seriesModel { name = "女", data = s2data });
-
- return Res(res);
- }
- /// <summary>
- /// 学生年龄分布
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response stuAgeEchart(dynamic _)
- {
- var param = this.GetReqData();
- var res = new List<PieModel>();
- var stuList = stuInfoBasicIBLL.GetAllList().Where(x => x.Birthday.HasValue);
- if (!string.IsNullOrEmpty(param))
- {
- stuList = stuList.Where(x => x.Grade == param);
- }
- var num1820 = stuList.Where(x => Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) >= 18 && Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) <= 20).Count();
- res.Add(new PieModel() { name = "18-20", value = num1820 });
- var num2123 = stuList.Where(x => Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) >= 21 && Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) <= 23).Count();
- res.Add(new PieModel() { name = "21-23", value = num2123 });
- var num2426 = stuList.Where(x => Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) >= 24 && Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) <= 26).Count();
- res.Add(new PieModel() { name = "24-26", value = num2426 });
-
- return Res(res);
- }
- /// <summary>
- /// 学生民族分布
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response stuNationalityEchart(dynamic _)
- {
- var param = this.GetReqData();
- var stuList = stuInfoBasicIBLL.GetAllList().Where(x => x.NationalityNo != null && x.NationalityNo.Length > 0);
- if (!string.IsNullOrEmpty(param))
- {
- stuList = stuList.Where(x => x.Grade == param);
- }
- var stuListGroup = stuList.GroupBy(x => x.NationalityNo).Select(x => new
- {
- NationalityNo = x.Key,
- manNum = x.Where(y => y.GenderNo == true).Count(),
- womanNum = x.Where(y => y.GenderNo == false).Count()
- }).OrderBy(x => x.NationalityNo);
- var nationalityList = dataItemIBLL.GetDetailList2("National", null);
-
- var res = new BarModel()
- {
- categories = new List<string>(),
- series = new List<seriesModel>()
- };
- var s1data = new List<int>();
- var s2data = new List<int>();
- foreach (var item in stuListGroup)
- {
- res.categories.Add(nationalityList.FirstOrDefault(x => x.F_ItemValue == item.NationalityNo)?.F_ItemName);
- s1data.Add(item.manNum);
- s2data.Add(item.womanNum);
- }
- res.series.Add(new seriesModel { name = "男", data = s1data });
- res.series.Add(new seriesModel { name = "女", data = s2data });
-
- return Res(res);
- }
- /// <summary>
- /// 学生政治面貌
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response stuPartyFaceEchart(dynamic _)
- {
- var param = this.GetReqData();
- var res = new List<PieModel>();
- var stuList = stuInfoBasicIBLL.GetAllList();
- if (!string.IsNullOrEmpty(param))
- {
- stuList = stuList.Where(x => x.Grade == param);
- }
- //中共党员03 共青团员01 群众02 不限
- var num1 = stuList.Where(x => x.PartyFaceNo == "03").Count();
- res.Add(new PieModel() { name = "中共党员", value = num1 });
- var num2 = stuList.Where(x => x.PartyFaceNo == "01").Count();
- res.Add(new PieModel() { name = "共青团员", value = num2 });
- var num3 = stuList.Where(x => x.PartyFaceNo == "02").Count();
- res.Add(new PieModel() { name = "群众", value = num3 });
- var num4 = stuList.Where(x => x.PartyFaceNo != "03" && x.PartyFaceNo != "01" && x.PartyFaceNo != "02").Count();
- res.Add(new PieModel() { name = "不限", value = num4 });
-
- return Res(res);
- }
- /// <summary>
- /// 学生政治面貌-按班级统计
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response stuClassPartyFaceEchart(dynamic _)
- {
- var res = new List<TableModel>();
- //按班级统计
- var stuList = stuInfoBasicIBLL.GetAllList().Where(x => x.ClassNo != null && x.ClassNo.Length > 0).GroupBy(x => x.ClassNo).Select(x => new
- {
- classNo = x.Key,
- stuList = x
- }).OrderBy(x => x.classNo);
- //中共党员03 共青团员01 群众02 不限
- foreach (var item in stuList)
- {
- var model = new TableModel()
- {
- type1 = classInfoIBLL.GetClassInfoEntityByClassNo(item.classNo)?.ClassName,
- type2 = item.stuList.Where(x => x.PartyFaceNo == "03").Count().ToString(),
- type3 = item.stuList.Where(x => x.PartyFaceNo == "01").Count().ToString(),
- type4 = item.stuList.Where(x => x.PartyFaceNo == "02").Count().ToString(),
- type5 = item.stuList.Where(x => x.PartyFaceNo != "03" && x.PartyFaceNo != "01" && x.PartyFaceNo != "02").Count().ToString(),
- };
- res.Add(model);
- }
-
- return Res(res);
- }
- /// <summary>
- /// 学生籍贯地区
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response stuProvinceEchart(dynamic _)
- {
- var param = this.GetReqData();
- var res = new List<PieModel>();
- var stuList = stuInfoBasicIBLL.GetAllList().Where(x => x.F_ProvinceId != null && x.F_ProvinceId.Length > 0);
- if (!string.IsNullOrEmpty(param))
- {
- stuList = stuList.Where(x => x.Grade == param);
- }
- var stuListGroup = stuList.GroupBy(x => x.F_ProvinceId).Select(x => new
- {
- provinceCode = x.Key,
- num = x.Count()
- }).OrderBy(x => x.provinceCode);
- foreach (var item in stuListGroup)
- {
- var model = new PieModel()
- {
- name = dIC_PROVINCEIBLL.GetDIC_PROVINCEEntityByCode(item.provinceCode)?.PNAME,
- value = item.num
- };
- res.Add(model);
- }
-
- return Res(res);
- }
- /// <summary>
- /// 学生奖励人数
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response stuEncourgementNum(dynamic _)
- {
- var sum = stuEncourgementIBLL.GetAllList().Count();
- var res = new { value = sum };
-
- return Res(res);
- }
- /// <summary>
- /// 学生奖励
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response stuEncourgementEchart(dynamic _)
- {
- var res = stuEncourgementIBLL.GetPageList(null).GroupBy(x => x.GenderNo).Select(x => new PieModel()
- {
- name = x.Key.Value ? "男" : "女",
- value = x.Count()
- });
-
- return Res(res);
- }
- /// <summary>
- /// 异动人数
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response stuTransferNum(dynamic _)
- {
- var param = this.GetReq<TransferParam>();
- var res = new RingModel();
- var list = stuTransferInfoIBLL.GetList(null).Where(x => x.F_EnabledMark == 1);
- if (!string.IsNullOrEmpty(param.ClassNo))
- {
- list = list.Where(x => x.ClassNo == param.ClassNo);
- }
- if (!string.IsNullOrEmpty(param.AnomalousType))
- {
- res.value = list.Where(x => x.AnomalousType == param.AnomalousType).Count();
- if (list.Count() > 0)
- {
- res.data = ((res.value.ToDecimal() / list.Count().ToDecimal()) * 100).ToDecimal(2);
- }
- }
-
- return Res(res);
- }
- /// <summary>
- /// 学生毕业统计
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response stuGraduateEchart(dynamic _)
- {
- var stuList = stuGraduateStatisticIBLL.GetList().Where(x => x.UniversityLevel != null && x.UniversityLevel.Length > 0).GroupBy(x => x.UniversityLevel).Select(x => new
- {
- UniversityLevel = x.Key,
- Num = x.Count()
- });
- var GraduateLevelList = dataItemIBLL.GetDetailList2("GraduateLevel", null);
- var res = new List<PieModel>();
- foreach (var item in stuList)
- {
- var model = new PieModel()
- {
- name = GraduateLevelList.FirstOrDefault(x => x.F_ItemValue == item.UniversityLevel)?.F_ItemName + "毕业",
- value = item.Num
- };
- res.Add(model);
- }
-
- return Res(res);
- }
- /// <summary>
- /// 招生情况
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response stuMapEchart(dynamic _)
- {
- var res = new List<MapModel>();
- var stuList = stuInfoBasicIBLL.GetAllList().Where(x => x.F_ProvinceId != null && x.F_ProvinceId.Length > 0 && x.F_ProvinceId == "420000").GroupBy(x => x.F_CityId).Select(x => new
- {
- F_CityId = x.Key,
- num = x.Count()
- }).OrderBy(x => x.F_CityId);
- foreach (var item in stuList)
- {
- var model = new MapModel()
- {
- code = item.F_CityId,
- area = dIC_CITYIBLL.GetDIC_CITYEntityByCode(item.F_CityId)?.CNAME,
- number = item.num
- };
- res.Add(model);
- }
-
- return Res(res);
- }
- /// <summary>
- /// 年级下拉框
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response stuGradeSelect(dynamic _)
- {
- var res = new List<SelectModel>();
- var stuList = stuInfoBasicIBLL.GetAllList().Where(x => x.Grade != null && x.Grade.Length > 0).GroupBy(x => x.Grade).Select(x => new SelectModel()
- {
- value = x.Key,
- label = x.Key + "级"
- }).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 stuClassSelect(dynamic _)
- {
- var res = new List<SelectModel>();
- var stuList = stuTransferInfoIBLL.GetList(null).Where(x => x.F_EnabledMark == 1 && x.ClassNo != null && x.ClassNo.Length > 0).GroupBy(x => x.ClassNo).Select(x => new SelectModel()
- {
- value = x.Key,
- label = classInfoIBLL.GetClassInfoEntityByClassNo(x.Key)?.ClassName
- }).OrderBy(x => x.value);
- res.Add(new SelectModel() { value = "", label = "全校" });
- res.AddRange(stuList);
-
- return Res(res.OrderBy(x => x.value));
- }
-
- #endregion
-
- /// <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);
- }
-
- #region 教师信息分析
- /// <summary>
- /// 教师人数-政治面貌
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response teacherNumOfZZMM(dynamic _)
- {
- var param = this.GetReqData();
- var list = empInfoIBLL.GetAllList().Where(x => x.CheckMark == true);
- if (!string.IsNullOrEmpty(param))
- {
- list = list.Where(x => x.PartyFaceNo == param);
- }
- return Res(new { value = list.Count() });
- }
- /// <summary>
- /// 教师人数-编制情况
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response teacherNumOfBZQK(dynamic _)
- {
- var param = this.GetReqData();
- var list = empInfoIBLL.GetAllList().Where(x => x.CheckMark == true);
- if (!string.IsNullOrEmpty(param))
- {
- list = list.Where(x => x.CompilationCategory == param);
- }
- return Res(new { value = list.Count() });
- }
- /// <summary>
- /// 教师年龄分布
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response teacherAgeEchart(dynamic _)
- {
- var res = new BarModel()
- {
- categories = new List<string>(),
- series = new List<seriesModel>()
- };
- res.categories.Add("20-30");
- res.categories.Add("31-35");
- res.categories.Add("36-40");
- res.categories.Add("41-45");
- res.categories.Add("46-50");
- res.categories.Add("51-55");
- res.categories.Add("56-70");
- var list = empInfoIBLL.GetAllList().Where(x => x.CheckMark == true);
- var seriesModel = new seriesModel()
- {
- name = "年龄段",
- data = new List<int>()
- };
- seriesModel.data.Add(list.Where(x => Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) >= 20 && Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) <= 30).Count());
- seriesModel.data.Add(list.Where(x => Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) >= 31 && Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) <= 35).Count());
- seriesModel.data.Add(list.Where(x => Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) >= 36 && Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) <= 40).Count());
- seriesModel.data.Add(list.Where(x => Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) >= 41 && Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) <= 45).Count());
- seriesModel.data.Add(list.Where(x => Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) >= 46 && Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) <= 50).Count());
- seriesModel.data.Add(list.Where(x => Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) >= 51 && Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) <= 55).Count());
- seriesModel.data.Add(list.Where(x => Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) >= 56 && Math.Abs(x.Birthday.Value.Year - DateTime.Now.Year) <= 70).Count());
- res.series.Add(seriesModel);
-
- return Res(res);
- }
- /// <summary>
- /// 教师性别比例
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response teacherSexEchart(dynamic _)
- {
- var res = new List<PieModel>();
- var list = empInfoIBLL.GetAllList().Where(x => x.CheckMark == true);
- var man = new PieModel()
- {
- name = "男",
- value = list.Where(x => x.GenderNo == true).Count(),
- };
- man.rate = list.Count() > 0 ? (man.value.ToDecimal() / list.Count().ToDecimal() * 100).ToDecimal(2) : 0;
- res.Add(man);
- var woman = new PieModel()
- {
- name = "女",
- value = list.Where(x => x.GenderNo == false).Count(),
- };
- woman.rate = list.Count() > 0 ? (woman.value.ToDecimal() / list.Count().ToDecimal() * 100).ToDecimal(2) : 0;
- res.Add(woman);
-
- return Res(res);
- }
- /// <summary>
- /// 教师学历比例
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response teacherCollegeEchart(dynamic _)
- {
- var res = new List<PieModel>();
- var list = empInfoIBLL.GetAllList().Where(x => x.CheckMark == true);
- var college1 = new PieModel()
- {
- name = "本科",
- value = list.Where(x => x.HighestRecord == "1" || x.HighestRecord == "20" || x.HighestRecord == "21" || x.HighestRecord == "7").Count(),
- };
- college1.rate = list.Count() > 0 ? (college1.value.ToDecimal() / list.Count().ToDecimal() * 100).ToDecimal(2) : 0;
- res.Add(college1);
- var college2 = new PieModel()
- {
- name = "研究生",
- value = list.Where(x => x.HighestRecord == "13" || x.HighestRecord == "18" || x.HighestRecord == "19" || x.HighestRecord == "4").Count(),
- };
- college2.rate = list.Count() > 0 ? (college2.value.ToDecimal() / list.Count().ToDecimal() * 100).ToDecimal(2) : 0;
- res.Add(college2);
- var college3 = new PieModel()
- {
- name = "硕士",
- value = list.Where(x => x.HighestRecord == "17" || x.HighestRecord == "3" || x.HighestRecord == "5").Count(),
- };
- college3.rate = list.Count() > 0 ? (college3.value.ToDecimal() / list.Count().ToDecimal() * 100).ToDecimal(2) : 0;
- res.Add(college3);
- var college4 = new PieModel()
- {
- name = "博士",
- value = list.Where(x => x.HighestRecord == "14" || x.HighestRecord == "15" || x.HighestRecord == "16").Count(),
- };
- college4.rate = list.Count() > 0 ? (college4.value.ToDecimal() / list.Count().ToDecimal() * 100).ToDecimal(2) : 0;
- res.Add(college4);
-
- return Res(res);
- }
- /// <summary>
- /// 教师民族分布
- /// </summary>
- /// <param name="_"></param>
- /// <returns></returns>
- public Response teacherNationalEchart(dynamic _)
- {
- var res = new BarModel()
- {
- categories = new List<string>(),
- series = new List<seriesModel>()
- };
- var seriesModel = new seriesModel()
- {
- name = "教师人数",
- data = new List<int>()
- };
- var list = empInfoIBLL.GetAllList().Where(x => x.CheckMark == true && x.NationalityNo != null && x.NationalityNo.Length > 0).GroupBy(x => x.NationalityNo).Select(x => new
- {
- nationalityNo = x.Key,
- num = x.Select(y => y.EmpId).Count()
- });
- var nationalityData = dataItemIBLL.GetDetailList2("National", null);
- foreach (var item in list)
- {
- res.categories.Add(nationalityData.First(x => x.F_ItemValue == item.nationalityNo)?.F_ItemName);
- seriesModel.data.Add(item.num);
- }
- res.series.Add(seriesModel);
-
- return Res(res);
- }
-
- #endregion
-
-
-
- /// <summary>
- /// 柱状图数据
- /// </summary>
- public class BarModel
- {
- public List<string> categories { get; set; }
- public List<seriesModel> series { get; set; }
- }
- public class seriesModel
- {
- public string name { get; set; }
- public List<int> data { get; set; }
- }
- /// <summary>
- /// 饼图数据
- /// </summary>
- public class PieModel
- {
- public string name { get; set; }
- public int value { get; set; }
- /// <summary>
- /// 百分比
- /// </summary>
- public decimal rate { get; set; }
- }
- /// <summary>
- /// 表格数据
- /// </summary>
- public class TableModel
- {
- public string type1 { get; set; }
- public string type2 { get; set; }
- public string type3 { get; set; }
- public string type4 { get; set; }
- public string type5 { get; set; }
- }
- /// <summary>
- /// 环形图数据
- /// </summary>
- public class RingModel
- {
- /// <summary>
- /// 环文字名称
- /// </summary>
- public string label { get; set; }
- public int value { get; set; }
- /// <summary>
- /// 百分比
- /// </summary>
- public decimal data { get; set; }
- }
- /// <summary>
- /// 地图数据
- /// </summary>
- public class MapModel
- {
- public string code { get; set; }
- public string area { get; set; }
- public int number { get; set; }
- }
- /// <summary>
- /// 下拉框数据
- /// </summary>
- public class SelectModel
- {
- public string label { get; set; }
- public string value { get; set; }
- }
- /// <summary>
- /// 异动人数的传参
- /// </summary>
- public class TransferParam
- {
- public string AnomalousType { 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; }
- }
-
-
-
-
- }
- }
|