@@ -4,6 +4,7 @@ using System.Data; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | using Learun.Application.TwoDevelopment.EducationalAdministration; | ||||
using System.Web.Mvc; | using System.Web.Mvc; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | ||||
{ | { | ||||
@@ -75,6 +76,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 主页面-汇总统计 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult IndexStatistic() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -116,6 +126,27 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetStatisticList(string queryJson) | |||||
{ | |||||
var list = scholarshipxjIBLL.GetList(queryJson); | |||||
var aa = list.GroupBy(x => new { x.IsType, x.State }).Select(x => new | |||||
{ | |||||
IsType = x.Key.IsType, | |||||
State = x.Key.State, | |||||
Count = x.Select(y => y.Id).Count() | |||||
}).OrderBy(x => x.IsType).ThenBy(x => x.State).ToList(); | |||||
return Success(aa); | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -18,6 +18,10 @@ | |||||
<div class="lr-form-item-title">姓名</div> | <div class="lr-form-item-title">姓名</div> | ||||
<input id="StuName" type="text" class="form-control" /> | <input id="StuName" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">身份证</div> | |||||
<input id="IdentityCardNo" type="text" class="form-control" /> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -0,0 +1,31 @@ | |||||
@{ | |||||
ViewBag.Title = "奖助学金统计"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<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="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">时段</div> | |||||
<input id="GetTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd' })" /> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</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> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Scholarshipxj/IndexStatistic.js") |
@@ -0,0 +1,56 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-10-11 16:46 | |||||
* 描 述:奖助学金统计 | |||||
*/ | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/GetStatisticList', | |||||
headData: [ | |||||
{ | |||||
label: "资助类型", name: "IsType", width: 200, align: "left", formatter: function (cellvalue) { | |||||
return cellvalue == "0" ? "奖学金" : cellvalue == "1" ? "助学金" : ""; | |||||
} | |||||
}, | |||||
{ | |||||
label: "审核状态", name: "State", width: 200, align: "left", formatter: function (cellvalue) { | |||||
return cellvalue == "1" ? "享受" : "不享受"; | |||||
} | |||||
}, | |||||
{ label: "数量", name: "Count", width: 200, align: "left"} | |||||
], | |||||
mainId: '', | |||||
isPage: false, | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||||
}, | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -22,6 +22,10 @@ | |||||
<div class="lr-form-item-title">状态</div> | <div class="lr-form-item-title">状态</div> | ||||
<div id="State"></div> | <div id="State"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">身份证</div> | |||||
<input id="IdentityCardNo" type="text" class="form-control" /> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -1118,6 +1118,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\FormAudit.js" /> | <Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\FormAudit.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\Formzxj.js" /> | <Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\Formzxj.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\IndexStatistic.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\IndexAudit.js" /> | <Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\IndexAudit.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\Indexzxj.js" /> | <Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\Indexzxj.js" /> | ||||
@@ -1235,6 +1236,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\IndexSchool.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\ClassPlan\IndexSchool.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuGraduateStatistic\Form.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuGraduateStatistic\Form.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StudentCertificate\FormScore.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StudentCertificate\FormScore.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\IndexStatistic.cshtml" /> | |||||
<None Include="Areas\EducationalAdministration\Views\StuInfoBasic\Printxjk.cshtml" /> | <None Include="Areas\EducationalAdministration\Views\StuInfoBasic\Printxjk.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" /> | ||||
@@ -43,6 +43,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<ScholarshipxjEntity> GetList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return scholarshipxjService.GetList(queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取ScholarshipAudit表实体数据 | /// 获取ScholarshipAudit表实体数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -21,6 +21,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="queryJson">查询参数</param> | /// <param name="queryJson">查询参数</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<ScholarshipxjEntity> GetPageList(Pagination pagination, string queryJson); | IEnumerable<ScholarshipxjEntity> GetPageList(Pagination pagination, string queryJson); | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<ScholarshipxjEntity> GetList(string queryJson); | |||||
/// <summary> | /// <summary> | ||||
/// 获取ScholarshipAudit表实体数据 | /// 获取ScholarshipAudit表实体数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -31,8 +31,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | strSql.Append("SELECT "); | ||||
strSql.Append(@" * "); | |||||
strSql.Append(@" t.* "); | |||||
strSql.Append(" FROM ScholarshipAudit t "); | strSql.Append(" FROM ScholarshipAudit t "); | ||||
strSql.Append(" left join StuInfoBasic s on t.StuNo=s.StuNo "); | |||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
@@ -57,6 +58,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
dp.Add("State", queryParam["State"].ToString(), DbType.String); | dp.Add("State", queryParam["State"].ToString(), DbType.String); | ||||
strSql.Append(" AND t.State = @State "); | strSql.Append(" AND t.State = @State "); | ||||
} | } | ||||
if (!queryParam["IdentityCardNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("IdentityCardNo", "%" + queryParam["IdentityCardNo"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND s.IdentityCardNo Like @IdentityCardNo "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<ScholarshipxjEntity>(strSql.ToString(), dp, pagination); | return this.BaseRepository("CollegeMIS").FindList<ScholarshipxjEntity>(strSql.ToString(), dp, pagination); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -72,6 +78,42 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<ScholarshipxjEntity> GetList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT t.Id,t.GetTime,t.IsType,(case when t.State is not null then t.State else 0 end) as State "); | |||||
strSql.Append(" FROM ScholarshipAudit t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["GetTime"].IsEmpty()) | |||||
{ | |||||
dp.Add("GetTime", queryParam["GetTime"].ToDate(), DbType.DateTime); | |||||
strSql.Append(" AND t.GetTime = @GetTime "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<ScholarshipxjEntity>(strSql.ToString(), dp); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取ScholarshipAudit表实体数据 | /// 获取ScholarshipAudit表实体数据 | ||||
/// </summary> | /// </summary> | ||||