Browse Source

【增加】新生信息班级统计;新生信息统计:表格增加班级子表格;

大厂分支
dyy 4 years ago
parent
commit
7aa95f5a5c
9 changed files with 319 additions and 11 deletions
  1. +72
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs
  2. +40
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/StatisticClassIndex.cshtml
  3. +79
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/StatisticClassIndex.js
  4. +36
    -6
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/StatisticIndex.js
  5. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  6. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs
  7. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshEntity.cs
  8. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs
  9. +59
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs

+ 72
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs View File

@@ -261,6 +261,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
ViewBag.Grade = academic.AcademicYearShort.Substring(0, 2);
return View();
}
/// <summary>
/// 新生信息班级统计
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult StatisticClassIndex()
{
var academic = Common.GetSemesterAndYear();
ViewBag.Grade = academic.AcademicYearShort.Substring(0, 2);
return View();
}
#endregion

#region 获取数据
@@ -1036,7 +1047,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[AjaxOnly]
public ActionResult GetStatisticList(string queryJson)
{
var data = stuInfoFreshIBLL.GetList(queryJson);
var data = stuInfoFreshIBLL.GetList2(queryJson);
var list = data.Where(x => !string.IsNullOrEmpty(x.MajorNo)).GroupBy(x => x.MajorNo).Select(x => new StatisticModel
{
MajorNo = x.Key,
@@ -1045,8 +1056,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
TotalNum = x.Count(),
InfoNum = x.Count(y => y.IsStudentEdit == true),
RegisterNum = x.Count(y => y.RegisterStatus == "1"),
PayFeeNum = x.Count(y => y.PayFeeStatus == "1"),
PayFeeNum = x.Count(y => y.PayFeeStatus == "1" || y.OnsitePayFeeStatus == "1"),
GetKeyNum = x.Count(y => y.GetKeyStatus == "1"),
GetCardNum = x.Count(y => y.GetCardStatus == "1"),
CollectFileNum = x.Count(y => y.CollectFileStatus == "1"),
LoanNum = x.Count(y => y.StudentLoanStatus == "1")
}).OrderBy(x => x.MajorNo);

//var aa = new StatisticModel
@@ -1066,19 +1080,73 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
//allList.AddRange(list);

return Success(list);


}
/// <summary>
/// 获取列表数据
/// <summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetStatisticListOfClass(string queryJson)
{
var data = stuInfoFreshIBLL.GetList2(queryJson);
var list = data.Where(x => !string.IsNullOrEmpty(x.ClassNo) && !string.IsNullOrEmpty(x.MajorNo)).GroupBy(x => new { x.MajorNo, x.ClassNo }).Select(x => new StatisticModel
{
ClassNo = x.Key.ClassNo,
ClassName = x.FirstOrDefault()?.ClassName,
Grade = x.FirstOrDefault()?.Grade,
MajorNo = x.Key.MajorNo,
MajorName = x.FirstOrDefault()?.MajorName,
TotalNum = x.Count(),
InfoNum = x.Count(y => y.IsStudentEdit == true),
RegisterNum = x.Count(y => y.RegisterStatus == "1"),
PayFeeNum = x.Count(y => y.PayFeeStatus == "1" || y.OnsitePayFeeStatus == "1"),
GetKeyNum = x.Count(y => y.GetKeyStatus == "1"),
GetCardNum = x.Count(y => y.GetCardStatus == "1"),
CollectFileNum = x.Count(y => y.CollectFileStatus == "1"),
LoanNum = x.Count(y => y.StudentLoanStatus == "1")
}).OrderBy(x => x.MajorNo).ThenBy(x => x.ClassNo);
return Success(list);
}
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; }
/// <summary>
/// 总人数
/// </summary>
public int TotalNum { get; set; }
/// <summary>
/// 完善个人信息人数
/// </summary>
public int InfoNum { get; set; }
/// <summary>
/// 报到人数
/// </summary>
public int RegisterNum { get; set; }
/// <summary>
/// 缴费人数
/// </summary>
public int PayFeeNum { get; set; }
/// <summary>
/// 领钥匙人数
/// </summary>
public int GetKeyNum { get; set; }
/// <summary>
/// 已领取校园卡人数
/// </summary>
public int GetCardNum { get; set; }
/// <summary>
/// 已收取档案人数
/// </summary>
public int CollectFileNum { get; set; }
/// <summary>
/// 贷款人数
/// </summary>
public int LoanNum { get; set; }
}
/// <summary>
/// 获取列表数据


+ 40
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/StatisticClassIndex.cshtml View File

@@ -0,0 +1,40 @@
@{
ViewBag.Title = "新生信息统计";
Layout = "~/Views/Shared/_Index.cshtml";
}
<style>
.lr-select {
width: 150px;
}
</style>

<script>
var Grade = "@ViewBag.Grade";
</script>
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">

<div class="lr-layout-tool-item">
<div id="Grade" type="lrselect" class="lr-select"></div>
</div>
<div class="lr-layout-tool-item">
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>&nbsp;查询</a>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">

</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuInfoFresh/StatisticClassIndex.js")

+ 79
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/StatisticClassIndex.js View File

@@ -0,0 +1,79 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-08-08 17:21
* 描 述:新生信息统计
*/
var selectedRow;
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
page.bindSelect();
},
bind: function () {
// 查询
$('#btn_Search').on('click', function () {
var Grade = $('#Grade').lrselectGet();
if (Grade == null || Grade == "") {
learun.alert.warning("请选择年级!");
return;
}
page.search({ Grade: Grade });
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});


},
bindSelect: function () {
//年级
$('#Grade').lrselect({
placeholder: "请选择年级",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData',
value: 'value',
text: 'text'
});
$('#Grade').lrselectSet(Grade);
},
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetStatisticListOfClass',
headData: [
{ label: '年级', name: 'Grade', width: 80, align: "left" },
{ label: '专业编号', name: 'MajorNo', width: 100, align: "left" },
{ label: '专业名称', name: 'MajorName', width: 100, align: "left" },
{ label: "班级编号", name: "ClassNo", width: 100, align: "left" },
{ label: "班级名称", name: "ClassName", width: 100, align: "left" },
{ label: '总人数', name: 'TotalNum', width: 100, align: "left", statistics: true },
{ label: '已完善个人信息人数', name: 'InfoNum', width: 130, align: "left", statistics: true },
{ label: '已报到人数', name: 'RegisterNum', width: 100, align: "left", statistics: true },
{ label: '已缴费人数', name: 'PayFeeNum', width: 100, align: "left", statistics: true },
{ label: '贷款人数', name: 'LoanNum', width: 100, align: "left", statistics: true },
{ label: '已领取钥匙人数', name: 'GetKeyNum', width: 100, align: "left", statistics: true },
{ label: '已领取校园卡人数', name: 'GetCardNum', width: 120, align: "left", statistics: true },
{ label: '已收取档案人数', name: 'CollectFileNum', width: 100, align: "left", statistics: true },
],
mainId: 'MajorNo',
isPage: false,
sidx: 'MajorNo,ClassNo',
sord: 'asc',
});
page.search({ Grade: Grade });
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
page.init();
}

+ 36
- 6
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/StatisticIndex.js View File

@@ -46,19 +46,49 @@ var bootstrap = function ($, learun) {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetStatisticList',
headData: [
{ label: '年级', name: 'Grade', width: 150, align: "left" },
{ label: '专业编号', name: 'MajorNo', width: 150, align: "left" },
{ label: '专业名称', name: 'MajorName', width: 150, align: "left" },
{ label: '总人数', name: 'TotalNum', width: 150, align: "left", statistics: true },
{ label: '年级', name: 'Grade', width: 80, align: "left" },
{ label: '专业编号', name: 'MajorNo', width: 100, align: "left" },
{ label: '专业名称', name: 'MajorName', width: 100, align: "left" },
{ label: '总人数', name: 'TotalNum', width: 100, align: "left", statistics: true },
{ label: '已完善个人信息人数', name: 'InfoNum', width: 130, align: "left", statistics: true },
{ label: '已报到人数', name: 'RegisterNum', width: 100, align: "left", statistics: true },
{ label: '已缴费人数', name: 'PayFeeNum', width: 100, align: "left", statistics: true },
{ label: '已领取用品人数', name: 'GetKeyNum', width: 100, align: "left", statistics: true },
{ label: '贷款人数', name: 'LoanNum', width: 100, align: "left", statistics: true },
{ label: '已领取钥匙人数', name: 'GetKeyNum', width: 100, align: "left", statistics: true },
{ label: '已领取校园卡人数', name: 'GetCardNum', width: 120, align: "left", statistics: true },
{ label: '已收取档案人数', name: 'CollectFileNum', width: 100, align: "left", statistics: true },
],
mainId: 'MajorNo',
isPage: false,
sidx: 'MajorNo',
sord: 'asc'
sord: 'asc',
isSubGrid: true,
subGridExpanded: function (subContentId, rowItem) {
$('#' + subContentId).jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetStatisticListOfClass',
headData: [
{ label: '年级', name: 'Grade', width: 80, align: "left" },
{ label: "班级编号", name: "ClassNo", width: 100, align: "left" },
{ label: "班级名称", name: "ClassName", width: 100, align: "left" },
{ label: '总人数', name: 'TotalNum', width: 100, align: "left" },
{ label: '已完善个人信息人数', name: 'InfoNum', width: 130, align: "left" },
{ label: '已报到人数', name: 'RegisterNum', width: 100, align: "left" },
{ label: '已缴费人数', name: 'PayFeeNum', width: 100, align: "left" },
{ label: '贷款人数', name: 'LoanNum', width: 100, align: "left" },
{ label: '已领取钥匙人数', name: 'GetKeyNum', width: 100, align: "left" },
{ label: '已领取校园卡人数', name: 'GetCardNum', width: 120, align: "left" },
{ label: '已收取档案人数', name: 'CollectFileNum', width: 100, align: "left" },
],
mainId: 'ClassNo',
isPage: false,
sidx: 'ClassNo'
});
var param;
param = param || {};
param.Grade = rowItem.Grade;
param.MajorNo = rowItem.MajorNo;
$('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
});
page.search({ Grade: Grade });
},


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj View File

@@ -952,6 +952,7 @@
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\MyClass.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\Print.css" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatusView.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\OnsitePayForm.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\LoanForm.js" />
@@ -6818,6 +6819,7 @@
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\ReadList.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveFile\IndexGWJS.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatusView.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" />


+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs View File

@@ -42,6 +42,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 获取列表数据
/// <summary>
/// <returns></returns>
public IEnumerable<StuInfoFreshEntity> GetList2(string queryJson)
{
try
{
return stuInfoFreshService.GetList2(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取列表分页数据
/// <param name="pagination">分页参数</param>


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshEntity.cs View File

@@ -710,7 +710,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
[NotMapped]
public string Build { get; set; }

/// <summary>
/// 是否完善个人信息
/// </summary>
[NotMapped]
public bool? IsStudentEdit { get; set; }



+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs View File

@@ -22,6 +22,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <returns></returns>
IEnumerable<StuInfoFreshEntity> GetList(string queryJson);
/// <summary>
/// 获取列表数据
/// <summary>
/// <returns></returns>
IEnumerable<StuInfoFreshEntity> GetList2(string queryJson);
/// <summary>
/// 获取列表分页数据
/// <param name="pagination">分页参数</param>
/// <summary>


+ 59
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs View File

@@ -159,6 +159,65 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String);
}

var data = this.BaseRepository("CollegeMIS").FindList<StuInfoFreshEntity>(strSql.ToString(), dp);
return data;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取列表数据
/// <summary>
/// <returns></returns>
public IEnumerable<StuInfoFreshEntity> GetList2(string queryJson)
{
try
{
//参考写法
var queryParam = queryJson.ToJObject();
//虚拟参数
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 ");

if (!queryParam["DeptNo"].IsEmpty())
{
strSql.Append(" and t.DeptNo = @DeptNo ");
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
}
if (!queryParam["MajorNo"].IsEmpty())
{
strSql.Append(" and t.MajorNo = @MajorNo ");
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
}
if (!queryParam["ClassNo"].IsEmpty())
{
strSql.Append(" and t.ClassNo = @ClassNo ");
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String);
}
if (!queryParam["Grade"].IsEmpty())
{
strSql.Append(" and t.Grade = @Grade ");
dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String);
}

var data = this.BaseRepository("CollegeMIS").FindList<StuInfoFreshEntity>(strSql.ToString(), dp);

foreach (var item in data)


Loading…
Cancel
Save