diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HomeStatisticsController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HomeStatisticsController.cs
new file mode 100644
index 000000000..c1781eb9f
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HomeStatisticsController.cs
@@ -0,0 +1,133 @@
+using Learun.Application.TwoDevelopment.EducationalAdministration;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Mvc;
+using Learun.Util;
+
+namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
+{
+ public class HomeStatisticsController : Controller
+ {
+ private StuInfoFreshIBLL stuInfoFreshIBLL = new StuInfoFreshBLL();
+ // GET: EducationalAdministration/HomeStatistics
+ public ActionResult Index()
+ {
+ return View();
+ }
+ public class InAndOutList
+ {
+
+ public string DeptNo { get; set; }
+ public string DeptName { get; set; }
+ public string MajorNo { get; set; }
+ public string MajorName { get; set; }
+ ///
+ /// 总人数
+ ///
+ public int TotalNum { get; set; }
+ ///
+ /// 未报到人数
+ ///
+ public int NoNum { get; set; }
+ ///
+ /// 报到人数
+ ///
+ public int RegisterNum { get; set; }
+ }
+
+ public class StatisticsList
+ {
+ public string MajorName { get; set; }
+ ///
+ /// 已报到人数
+ ///
+ public int Num { get; set; }
+ ///
+ /// 总人数
+ ///
+ public string s { get; set; }
+ }
+ public class StatisticModel
+ {
+ public string MajorNo { get; set; }
+ public string MajorName { get; set; }
+ public string ClassNo { get; set; }
+ public string ClassName { get; set; }
+ public string Grade { get; set; }
+ ///
+ /// 总人数
+ ///
+ public int TotalNum { get; set; }
+ ///
+ /// 完善个人信息人数
+ ///
+ public int InfoNum { get; set; }
+ ///
+ /// 未报到人数
+ ///
+ public int NoNum { get; set; }
+ ///
+ /// 报到人数
+ ///
+ public int RegisterNum { get; set; }
+ ///
+ /// 缴费人数
+ ///
+ public int PayFeeNum { get; set; }
+ ///
+ /// 领钥匙人数
+ ///
+ public int GetKeyNum { get; set; }
+ ///
+ /// 已领取校园卡人数
+ ///
+ public int GetCardNum { get; set; }
+ ///
+ /// 已收取档案人数
+ ///
+ public int CollectFileNum { get; set; }
+ ///
+ /// 贷款人数
+ ///
+ public int LoanNum { get; set; }
+ }
+ ///
+ /// 获取报道学生和未报到学生列表
+ ///
+ ///
+ [HttpGet]
+ public ActionResult GetNewStudentList(string queryJson)
+ {
+ var data = stuInfoFreshIBLL.GetNewStudentList(queryJson);
+ var list = data.Where(x => !string.IsNullOrEmpty(x.MajorNo)).GroupBy(x => x.MajorNo).Select(x => new InAndOutList
+ {
+ MajorNo = x.Key,
+ MajorName = x.FirstOrDefault()?.MajorName,
+ DeptNo = x.FirstOrDefault()?.DeptNo,
+ DeptName = x.FirstOrDefault()?.DeptName,
+ TotalNum = x.Count(),
+ RegisterNum = x.Count(y => y.RegisterStatus == "1"),
+ NoNum = x.Count() - x.Count(y => y.RegisterStatus == "1")
+ }).OrderBy(x => x.MajorNo);
+ List Lists = new List();
+ foreach (var item in list)
+ {
+ StatisticsList InOutlist = new StatisticsList();
+ InOutlist.MajorName = item.MajorName;
+ InOutlist.Num = item.TotalNum;
+ InOutlist.s = "s1";
+ Lists.Add(InOutlist);
+ InOutlist = new StatisticsList();
+ InOutlist.MajorName = item.MajorName;
+ InOutlist.Num = item.RegisterNum;
+ InOutlist.s = "s2";
+ Lists.Add(InOutlist);
+ }
+ Response.AddHeader("Access-Control-Allow-Credentials", "true");
+ Response.AddHeader("Access-Control-Allow-Origin", "http://yuntu.cloud.tencent.com ");
+ return Content(Lists.ToJson());
+ }
+ }
+}
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
index 162deb3d4..9f528dd08 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
@@ -322,6 +322,7 @@
+
@@ -6186,6 +6187,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs
index b513275b2..f0d81fed9 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs
@@ -406,6 +406,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
+
+ public IEnumerable GetNewStudentList(string queryJson)
+ {
+ try
+ {
+ return stuInfoFreshService.GetNewStudentList(queryJson);
+ }
+ 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/StuInfoFresh/StuInfoFreshIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs
index 878d3c8f3..46f4460ce 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs
@@ -23,6 +23,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
///
void SynchronousList();
+ ///
+ /// 获取报道学生和未报到学生列表
+ ///
+ ///
+ IEnumerable GetNewStudentList(string queryJson);
+
///
/// 获取列表数据
///
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs
index eb243e1fb..d98219818 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs
@@ -865,6 +865,58 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
+
+ public IEnumerable GetNewStudentList(string queryJson)
+ {
+ try
+ {
+ //虚拟参数
+ var dp = new DynamicParameters(new { });
+
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT t.*,d.DeptName,m.MajorName,c.ClassName ");
+ strSql.Append(" FROM StuInfoFresh t ");
+ strSql.Append(" left join CdDept d on t.DeptNo=d.DeptNo ");
+ strSql.Append(" left join CdMajor m on t.MajorNo=m.MajorNo ");
+ strSql.Append(" left join ClassInfo c on t.ClassNo=c.ClassNo ");
+ strSql.Append(" where 1=1 ");
+ strSql.Append(" AND t.Grade ='21' ");
+
+ if (!string.IsNullOrEmpty(queryJson))
+ {
+ dp.Add("DeptNo", queryJson, DbType.String);
+ strSql.Append(" AND t.DeptNo =@DeptNo ");
+ }
+
+ var data = this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp);
+ foreach (var item in data)
+ {
+ var familyList = this.BaseRepository("CollegeMIS").FindList(x => x.StuInfoFreshId == item.ID);
+ if (familyList.Any())
+ {
+ item.IsStudentEdit = true;
+ }
+ else
+ {
+ item.IsStudentEdit = false;
+ }
+ }
+
+ return data;
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
#endregion
#region 提交数据
@@ -1867,7 +1919,12 @@ where bb.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=bb.StuNo
}
}
-
+ public class InAndOutList
+ {
+ public string X { get; set; }
+ public string Y { get; set; }
+ public string Sum { get; set; }
+ }
#endregion
#region 上传图片