|
- using Learun.Util;
- using System.Data;
- using Learun.Application.TwoDevelopment.PersonnelManagement;
- using System.Web.Mvc;
- using System.Collections.Generic;
- using System.Linq;
- using Learun.Application.Base.SystemModule;
- using Learun.Application.TwoDevelopment.EducationalAdministration;
-
- namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
- {
- /// <summary>
- /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
- /// Copyright (c) 2013-2018 北京泉江科技有限公司
- /// 创 建:超级管理员
- /// 日 期:2020-02-03 14:37
- /// 描 述:疫情记录
- /// </summary>
- public class EpidemicReportController : MvcControllerBase
- {
- private EpidemicSituationIBLL epidemicSituationIBLL = new EpidemicSituationBLL();
- private DataItemIBLL dataItemIbll = new DataItemBLL();
- private DataSourceIBLL dataSourceIbll=new DataSourceBLL();
- private DIC_PROVINCEIBLL dicProvinceibll=new DIC_PROVINCEBLL();
-
- #region 视图功能
-
-
- /// <summary>
- /// 外出原因统计
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult OutReasonReport()
- {
- return View();
- }
-
- /// <summary>
- /// 人员类别统计
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult PersonnelCategoryReport()
- {
- return View();
- }
-
- /// <summary>
- /// 各省份人数统计
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult ProviceReport()
- {
- return View();
- }
-
- /// <summary>
- /// 交通工具人数统计
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult VehicleReport()
- {
- return View();
- }
-
- #endregion
-
- #region 获取数据
-
- public ActionResult OutReasonReportList()
- {
- var dataItemList = dataItemIbll.GetDetailList("OutReason");
- var data = epidemicSituationIBLL.GetList("{}");
- var list = data.GroupBy(a => a.OutReason).Select(a => new
- {
- name = dataItemList.FirstOrDefault(b => b.F_ItemValue == a.Key.ToString())?.F_ItemName,
- value = a.Count()
- });
- return Success(list);
- }
- public ActionResult OutReasonReportData()
- {
- var dataItemList = dataItemIbll.GetDetailList("OutReason");
- var data = epidemicSituationIBLL.GetList("{}");
- var list = data.GroupBy(a => a.OutReason).Select(a => new
- {
- name = dataItemList.FirstOrDefault(b => b.F_ItemValue == a.Key.ToString())?.F_ItemName,
- value = a.Count()
- });
- var rdata = new
- {
- name = list.Select(a => a.name),
- value = list.Select(a => a.value)
- };
- return Success(rdata);
-
-
- }
-
-
-
- public ActionResult PersonnelCategoryReportList()
- {
- var dataItemList = dataItemIbll.GetDetailList("EUserType");
- var data = epidemicSituationIBLL.GetList("{}");
- var list = data.GroupBy(a => a.Type).Select(a => new
- {
- name = dataItemList.FirstOrDefault(b => b.F_ItemValue == a.Key.ToString())?.F_ItemName,
- value = a.Count()
- });
- return Success(list);
- }
- public ActionResult PersonnelCategoryReportData()
- {
- var dataItemList = dataItemIbll.GetDetailList("EUserType");
- var data = epidemicSituationIBLL.GetList("{}");
- var list = data.GroupBy(a => a.Type).Select(a => new
- {
- name = dataItemList.FirstOrDefault(b => b.F_ItemValue == a.Key.ToString())?.F_ItemName,
- value = a.Count()
- });
- var rdata = new
- {
- name = list.Select(a => a.name),
- value = list.Select(a => a.value)
- };
- return Success(rdata);
-
-
- }
-
-
-
-
- public ActionResult ProviceReportList()
- {
- var data = epidemicSituationIBLL.GetList("{}");
- var list = data.GroupBy(a => a.Provice).Select(a => new
- {
- name = dicProvinceibll.GetDIC_PROVINCEEntityByCode(a.Key.ToString())?.PNAME,
- value = a.Count()
- });
- return Success(list);
- }
- public ActionResult ProviceReportData()
- {
- var data = epidemicSituationIBLL.GetList("{}");
- var list = data.GroupBy(a => a.Provice).Select(a => new
- {
- name = dicProvinceibll.GetDIC_PROVINCEEntityByCode(a.Key.ToString())?.PNAME,
- value = a.Count()
- });
- var rdata = new
- {
- name = list.Select(a => a.name),
- value = list.Select(a => a.value)
- };
- return Success(rdata);
-
-
- }
-
-
-
-
- public ActionResult VehicleReportList()
- {
- var dataItemList = dataItemIbll.GetDetailList("Vehicle");
- var data = epidemicSituationIBLL.GetList("{}");
- var list = data.GroupBy(a => a.Vehicle).Select(a => new
- {
- name = dataItemList.FirstOrDefault(b => b.F_ItemValue == a.Key.ToString())?.F_ItemName,
- value = a.Count()
- });
- return Success(list);
- }
- public ActionResult VehicleReportData()
- {
- var dataItemList = dataItemIbll.GetDetailList("Vehicle");
- var data = epidemicSituationIBLL.GetList("{}");
- var list = data.GroupBy(a => a.Vehicle).Select(a => new
- {
- name = dataItemList.FirstOrDefault(b => b.F_ItemValue == a.Key.ToString())?.F_ItemName,
- value = a.Count()
- });
- var rdata = new
- {
- name = list.Select(a => a.name),
- value = list.Select(a => a.value)
- };
- return Success(rdata);
-
-
- }
-
- #endregion
-
-
- }
- }
|