@@ -147,6 +147,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 专业 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult MajorIndex() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -188,6 +197,30 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取专业统计 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetMajorStatistics(string queryJson) | |||||
{ | |||||
var Data = stuVolunteerIBLL.GetMajorStatistics(queryJson); | |||||
var list = Data.GroupBy(x => x.Grade).Select(x => new | |||||
{ | |||||
DeptNo = x.FirstOrDefault()?.DeptNo, | |||||
MajorNo = x.FirstOrDefault()?.MajorNo, | |||||
Grade = x.FirstOrDefault()?.Grade, | |||||
ZRNum = x.Count(), | |||||
EnrollNum = x.Count(s => s.IsEnroll == true), | |||||
WillNum = x.Count(s => s.IsEnroll == true && s.IsSubmit == true), | |||||
ManNum = x.Count(s => s.IsEnroll == true && s.IsSubmit == true && s.Sex == "1"), | |||||
WoManNum = x.Count(s => s.IsEnroll == true && s.IsSubmit == true && s.Sex == "0") | |||||
}); | |||||
return Success(list); | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -377,9 +410,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
/// </summary> | /// </summary> | ||||
/// <param name="keyValue"></param> | /// <param name="keyValue"></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public ActionResult MajorForm(string keyValue ,int MajorStatus) | |||||
public ActionResult MajorForm(string keyValue, int MajorStatus) | |||||
{ | { | ||||
stuVolunteerIBLL.MajorForm(keyValue,MajorStatus); | |||||
stuVolunteerIBLL.MajorForm(keyValue, MajorStatus); | |||||
return Success("录取成功!"); | return Success("录取成功!"); | ||||
} | } | ||||
@@ -43,6 +43,10 @@ | |||||
<div class="lr-form-item-title">录取意向(本校)<font face="宋体">*</font></div> | <div class="lr-form-item-title">录取意向(本校)<font face="宋体">*</font></div> | ||||
<div id="IsCYSchool" isvalid="yes" checkexpession="NotNull"></div> | <div id="IsCYSchool" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||||
<div id="Grade" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | <div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | ||||
<div class="lr-form-item-title">第一志愿</div> | <div class="lr-form-item-title">第一志愿</div> | ||||
<input id="FirstVolunteer" type="text" class="form-control" /> | <input id="FirstVolunteer" type="text" class="form-control" /> | ||||
@@ -17,6 +17,11 @@ var bootstrap = function ($, learun) { | |||||
bind: function () { | bind: function () { | ||||
$('#IsCYSchool').lrDataItemSelect({ code: 'YesOrNoBit' }); | $('#IsCYSchool').lrDataItemSelect({ code: 'YesOrNoBit' }); | ||||
$('#Sex').lrDataItemSelect({ code: 'usersex' }); | $('#Sex').lrDataItemSelect({ code: 'usersex' }); | ||||
$('#Grade').lrselect({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
if (!!keyValue) { | if (!!keyValue) { | ||||
@@ -0,0 +1,40 @@ | |||||
@{ | |||||
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> | |||||
<div id="DeptNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">学年</div> | |||||
<div id="Grade"></div> | |||||
</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 class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuVolunteer/MajorIndex.js") |
@@ -0,0 +1,89 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-12-16 10:14 | |||||
* 描 述:长阳迎新 | |||||
*/ | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
$('#DeptNo').lrselect({ | |||||
allowSearch: true, | |||||
value: "deptno", | |||||
text: "deptname", | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||||
}); | |||||
$('#Grade').lrselect({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByClass', | |||||
value: "year", | |||||
text: "year", | |||||
}); | |||||
$('#Sex').lrDataItemSelect({ code: 'usersex' }); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/GetMajorStatistics', | |||||
headData: [ | |||||
{ | |||||
label: "专业部", name: "DeptNo", width: 200, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||||
key: value, | |||||
keyId: 'deptno', | |||||
callback: function (_data) { | |||||
callback(_data['deptname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "专业", name: "MajorNo", width: 200, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||||
key: value, | |||||
keyId: 'majorno', | |||||
callback: function (_data) { | |||||
callback(_data['majorname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "总人数", name: "ZRNum", width: 200, align: "left" }, | |||||
{ label: "年级", name: "Grade", width: 200, align: "left" }, | |||||
{ label: "录取人数", name: "EnrollNum", width: 200, align: "left" }, | |||||
{ label: "报名人数", name: "WillNum", width: 200, align: "left" }, | |||||
{ label: "男生", name: "ManNum", width: 200, align: "left" }, | |||||
{ label: "女生", name: "WoManNum", width: 200, align: "left" }, | |||||
], | |||||
mainId: 'DeptNo', | |||||
sidx: 'DeptNo asc,MajorNo desc,Grade desc', | |||||
isPage: false, | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -1124,6 +1124,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuVolunteer\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\ClassForm.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuVolunteer\ClassForm.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\FormSchool.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuVolunteer\FormSchool.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\MajorIndex.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuVolunteer\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexAccount.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexAccount.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexMajor.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexMajor.js" /> | ||||
@@ -7558,6 +7559,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexMajor.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexMajor.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\FormMajor.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuVolunteer\FormMajor.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\FormTran.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\FormTran.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\MajorIndex.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
@@ -66,7 +66,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 专业统计 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuVolunteerEntity> GetMajorStatistics(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return stuVolunteerService.GetMajorStatistics(queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -143,7 +166,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
public void CheckForm(string keyValue,int ClassStatus) | |||||
public void CheckForm(string keyValue, int ClassStatus) | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
@@ -377,7 +400,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 获取StuVolunteer表实体数据 | /// 获取StuVolunteer表实体数据 | ||||
@@ -256,7 +256,15 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
[Column("PROVINCECODE")] | [Column("PROVINCECODE")] | ||||
public string ProvinceCode { get; set; } | public string ProvinceCode { get; set; } | ||||
/// <summary> | |||||
/// 学年 | |||||
/// </summary> | |||||
[Column("GRADE")] | |||||
public string Grade { get; set; } | |||||
/// <summary> | |||||
/// 提交标识 | |||||
/// </summary> | |||||
public bool? IsSubmit { get; set; } | |||||
#endregion | #endregion | ||||
#region 扩展操作 | #region 扩展操作 | ||||
@@ -27,6 +27,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
StuVolunteerEntity GetStuVolunteerEntity(string keyValue); | StuVolunteerEntity GetStuVolunteerEntity(string keyValue); | ||||
/// <summary> | |||||
/// 专业统计 | |||||
/// </summary> | |||||
/// <param name="pagination"></param> | |||||
/// <param name="queryJson"></param> | |||||
/// <returns></returns> | |||||
IEnumerable<StuVolunteerEntity> GetMajorStatistics(string queryJson); | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -151,6 +151,51 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取专业统计 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuVolunteerEntity> GetMajorStatistics(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append(" SELECT "); | |||||
strSql.Append(@" t.* "); | |||||
strSql.Append(" FROM StuVolunteer t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["DeptNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.DeptNo = @DeptNo "); | |||||
} | |||||
if (!queryParam["Grade"].IsEmpty()) | |||||
{ | |||||
dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Grade = @Grade "); | |||||
} | |||||
var data = this.BaseRepository("CollegeMIS").FindList<StuVolunteerEntity>(strSql.ToString(), dp); | |||||
return data; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -736,4 +781,48 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
#endregion | #endregion | ||||
} | } | ||||
public class MajorStatistics | |||||
{ | |||||
/// <summary> | |||||
/// 专业部 | |||||
/// </summary> | |||||
public string DeptNo { get; set; } | |||||
/// <summary> | |||||
/// 专业部 | |||||
/// </summary> | |||||
public string DeptName { get; set; } | |||||
/// <summary> | |||||
/// 专业名称 | |||||
/// </summary> | |||||
public string MajorNo { get; set; } | |||||
/// <summary> | |||||
/// 专业名称 | |||||
/// </summary> | |||||
public string MajorName { get; set; } | |||||
/// <summary> | |||||
/// 年级 | |||||
/// </summary> | |||||
public string Grade { get; set; } | |||||
/// <summary> | |||||
/// 总人数 | |||||
/// </summary> | |||||
public string ZRNum { get; set; } | |||||
/// <summary> | |||||
/// 录取人数 | |||||
/// </summary> | |||||
public int? EnrollNum { get; set; } | |||||
/// <summary> | |||||
/// 报名人数 | |||||
/// </summary> | |||||
public int? WillNum { get; set; } | |||||
/// <summary> | |||||
/// 男生 | |||||
/// </summary> | |||||
public int? ManNum { get; set; } | |||||
/// <summary> | |||||
/// 女生 | |||||
/// </summary> | |||||
public int? WoManNum { get; set; } | |||||
} | |||||
} | } |