@@ -9,6 +9,7 @@ using Hangfire.Annotations; | |||
using Learun.Application.Base.SystemModule; | |||
using Newtonsoft.Json; | |||
using System.Data; | |||
using Learun.Application.WorkFlow; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -321,6 +322,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 招生统计 | |||
/// </summary> | |||
/// <returns></returns> | |||
public ActionResult StatisticIndex() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
@@ -426,13 +435,13 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
if (string.IsNullOrEmpty(student.PhotoUrl)) | |||
{ | |||
student.PhotoUrl = Guid.NewGuid().ToString(); | |||
stuEnrollIBLL.SaveEntity(student.StuId,student); | |||
stuEnrollIBLL.SaveEntity(student.StuId, student); | |||
} | |||
var annexEntity = annexesFileIBLL.GetEntityByFolderId(student.PhotoUrl); | |||
if (annexEntity == null) | |||
{ | |||
annexEntity=new AnnexesFileEntity(); | |||
annexEntity = new AnnexesFileEntity(); | |||
annexEntity.Create(); | |||
annexEntity.F_Id = Guid.NewGuid().ToString(); | |||
} | |||
@@ -456,11 +465,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public ActionResult GetYearListByClass() | |||
{ | |||
var classList = classInfoIBLL.GetAllClass().ToList(); | |||
var result = classList.GroupBy(a => a.Grade).Select(m=>m.Key).ToList(); | |||
List<object> list=new List<object>(); | |||
var result = classList.GroupBy(a => a.Grade).Select(m => m.Key).ToList(); | |||
List<object> list = new List<object>(); | |||
foreach (var item in result) | |||
{ | |||
list.Add(new{year=item}); | |||
list.Add(new { year = item }); | |||
} | |||
return Success(list); | |||
@@ -959,6 +968,193 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <summary> | |||
/// 招生统计数据 | |||
/// </summary> | |||
/// <param name="queryJson"></param> | |||
/// <returns></returns> | |||
public ActionResult GetStatisticData(string queryJson) | |||
{ | |||
var data = stuEnrollIBLL.GetList(queryJson); | |||
//是否报到 | |||
var datagroupIsReport = data.OrderByDescending(x => x.IsReport).GroupBy(x => x.IsReport).Select(x => new | |||
{ | |||
status = x.Key.HasValue ? (x.Key.Value == true ? "报到" : "未报到") : "未处理", | |||
count = x.Select(y => y.StuId).Count() | |||
}); | |||
var legendDataIsReport = new List<string>(); | |||
var seriesDataIsReport = new List<WfSchemeReportModelOfPie>(); | |||
foreach (var item in datagroupIsReport) | |||
{ | |||
legendDataIsReport.Add(item.status); | |||
seriesDataIsReport.Add(new WfSchemeReportModelOfPie() | |||
{ | |||
value = item.count, | |||
name = item.status | |||
}); | |||
} | |||
//是否住宿 | |||
var datagroupIsCheckIn = data.OrderByDescending(x => x.IsCheckIn).GroupBy(x => x.IsCheckIn).Select(x => new | |||
{ | |||
status = x.Key.HasValue ? (x.Key.Value == true ? "住宿" : "走读") : "未处理", | |||
count = x.Select(y => y.StuId).Count() | |||
}); | |||
var legendDataIsCheckIn = new List<string>(); | |||
var seriesDataIsCheckIn = new List<WfSchemeReportModelOfPie>(); | |||
foreach (var item in datagroupIsCheckIn) | |||
{ | |||
legendDataIsCheckIn.Add(item.status); | |||
seriesDataIsCheckIn.Add(new WfSchemeReportModelOfPie() | |||
{ | |||
value = item.count, | |||
name = item.status | |||
}); | |||
} | |||
//是否资助 | |||
var datagroupIsSubsidize1 = data.OrderByDescending(x => x.IsSubsidize1).GroupBy(x => x.IsSubsidize1).Select(x => new | |||
{ | |||
status = x.Key.HasValue ? (x.Key.Value == true ? "资助" : "不资助") : "未处理", | |||
count = x.Select(y => y.StuId).Count() | |||
}); | |||
var legendDataIsSubsidize1 = new List<string>(); | |||
var seriesDataIsSubsidize1 = new List<WfSchemeReportModelOfPie>(); | |||
foreach (var item in datagroupIsSubsidize1) | |||
{ | |||
legendDataIsSubsidize1.Add(item.status); | |||
seriesDataIsSubsidize1.Add(new WfSchemeReportModelOfPie() | |||
{ | |||
value = item.count, | |||
name = item.status | |||
}); | |||
} | |||
//是否军训 | |||
var datagroupIsMilitary = data.OrderByDescending(x => x.IsMilitary).GroupBy(x => x.IsMilitary).Select(x => new | |||
{ | |||
status = x.Key.HasValue ? (x.Key.Value == true ? "军训" : "不军训") : "未处理", | |||
count = x.Select(y => y.StuId).Count() | |||
}); | |||
var legendDataIsMilitary = new List<string>(); | |||
var seriesDataIsMilitary = new List<WfSchemeReportModelOfPie>(); | |||
foreach (var item in datagroupIsMilitary) | |||
{ | |||
legendDataIsMilitary.Add(item.status); | |||
seriesDataIsMilitary.Add(new WfSchemeReportModelOfPie() | |||
{ | |||
value = item.count, | |||
name = item.status | |||
}); | |||
} | |||
//缴费状态 | |||
var datagroupIsPay = data.OrderByDescending(x => x.IsPay).GroupBy(x => x.IsPay).Select(x => new | |||
{ | |||
status = x.Key.HasValue ? (x.Key.Value == true ? "缴费" : "未缴费") : "未处理", | |||
count = x.Select(y => y.StuId).Count() | |||
}); | |||
var legendDataIsPay = new List<string>(); | |||
var seriesDataIsPay = new List<WfSchemeReportModelOfPie>(); | |||
foreach (var item in datagroupIsPay) | |||
{ | |||
legendDataIsPay.Add(item.status); | |||
seriesDataIsPay.Add(new WfSchemeReportModelOfPie() | |||
{ | |||
value = item.count, | |||
name = item.status | |||
}); | |||
} | |||
//拍照 | |||
var datagroupIsMug = data.OrderByDescending(x => x.IsMug).GroupBy(x => x.IsMug).Select(x => new | |||
{ | |||
status = x.Key.HasValue ? (x.Key.Value == true ? "已拍照" : "未拍照") : "未处理", | |||
count = x.Select(y => y.StuId).Count() | |||
}); | |||
var legendDataIsMug = new List<string>(); | |||
var seriesDataIsMug = new List<WfSchemeReportModelOfPie>(); | |||
foreach (var item in datagroupIsMug) | |||
{ | |||
legendDataIsMug.Add(item.status); | |||
seriesDataIsMug.Add(new WfSchemeReportModelOfPie() | |||
{ | |||
value = item.count, | |||
name = item.status | |||
}); | |||
} | |||
//领取军训服 | |||
var datagroupIsTakeCloths = data.OrderByDescending(x => x.IsTakeCloths).GroupBy(x => x.IsTakeCloths).Select(x => new | |||
{ | |||
status = x.Key.HasValue ? (x.Key.Value == true ? "已领取" : "未领取") : "未处理", | |||
count = x.Select(y => y.StuId).Count() | |||
}); | |||
var legendDataIsTakeCloths = new List<string>(); | |||
var seriesDataIsTakeCloths = new List<WfSchemeReportModelOfPie>(); | |||
foreach (var item in datagroupIsTakeCloths) | |||
{ | |||
legendDataIsTakeCloths.Add(item.status); | |||
seriesDataIsTakeCloths.Add(new WfSchemeReportModelOfPie() | |||
{ | |||
value = item.count, | |||
name = item.status | |||
}); | |||
} | |||
//量取校服尺寸 | |||
var datagroupIsQuantity = data.OrderByDescending(x => x.IsQuantity).GroupBy(x => x.IsQuantity).Select(x => new | |||
{ | |||
status = x.Key.HasValue ? (x.Key.Value == true ? "已量" : "未量") : "未处理", | |||
count = x.Select(y => y.StuId).Count() | |||
}); | |||
var legendDataIsQuantity = new List<string>(); | |||
var seriesDataIsQuantity = new List<WfSchemeReportModelOfPie>(); | |||
foreach (var item in datagroupIsQuantity) | |||
{ | |||
legendDataIsQuantity.Add(item.status); | |||
seriesDataIsQuantity.Add(new WfSchemeReportModelOfPie() | |||
{ | |||
value = item.count, | |||
name = item.status | |||
}); | |||
} | |||
//领取床上用品 | |||
var datagroupIsGetBeddingArticle = data.OrderByDescending(x => x.IsGetBeddingArticle).GroupBy(x => x.IsGetBeddingArticle).Select(x => new | |||
{ | |||
status = x.Key.HasValue ? (x.Key.Value == true ? "已领取" : "未领取") : "未处理", | |||
count = x.Select(y => y.StuId).Count() | |||
}); | |||
var legendDataIsGetBeddingArticle = new List<string>(); | |||
var seriesDataIsGetBeddingArticle = new List<WfSchemeReportModelOfPie>(); | |||
foreach (var item in datagroupIsGetBeddingArticle) | |||
{ | |||
legendDataIsGetBeddingArticle.Add(item.status); | |||
seriesDataIsGetBeddingArticle.Add(new WfSchemeReportModelOfPie() | |||
{ | |||
value = item.count, | |||
name = item.status | |||
}); | |||
} | |||
var jsonData = new | |||
{ | |||
legendDataIsReport = legendDataIsReport, | |||
seriesDataIsReport = seriesDataIsReport, | |||
legendDataIsCheckIn = legendDataIsCheckIn, | |||
seriesDataIsCheckIn = seriesDataIsCheckIn, | |||
legendDataIsSubsidize1 = legendDataIsSubsidize1, | |||
seriesDataIsSubsidize1 = seriesDataIsSubsidize1, | |||
legendDataIsMilitary = legendDataIsMilitary, | |||
seriesDataIsMilitary = seriesDataIsMilitary, | |||
legendDataIsPay = legendDataIsPay, | |||
seriesDataIsPay = seriesDataIsPay, | |||
legendDataIsMug = legendDataIsMug, | |||
seriesDataIsMug = seriesDataIsMug, | |||
legendDataIsTakeCloths = legendDataIsTakeCloths, | |||
seriesDataIsTakeCloths = seriesDataIsTakeCloths, | |||
legendDataIsQuantity = legendDataIsQuantity, | |||
seriesDataIsQuantity = seriesDataIsQuantity, | |||
legendDataIsGetBeddingArticle = legendDataIsGetBeddingArticle, | |||
seriesDataIsGetBeddingArticle = seriesDataIsGetBeddingArticle | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
@@ -0,0 +1,76 @@ | |||
| |||
@{ | |||
ViewBag.Title = "招生统计"; | |||
Layout = "~/Views/Shared/_ReportTemplate.cshtml"; | |||
} | |||
<style> | |||
body{ | |||
overflow-y:auto; | |||
} | |||
</style> | |||
@Html.AppendJsFile("/Views/LR_Content/script/lr-form.js") | |||
<div class="lr-layout ui-report"> | |||
<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="MajorNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></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" learun-authorize="yes"> | |||
<a id="lr-replace" class="btn btn-default"><i class="fa fa-refresh"></i> <span class="lrlt">刷新</span></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-grid" style="overflow:auto;"> | |||
<div class="grid-title"> | |||
<div style="overflow: auto; padding-bottom: 20px; text-align: center; margin-left: auto; margin-right: auto;"> | |||
<div id="mainIsReport" style="float: left; margin:0 20px 20px 0; width: 650px; height: 350px;border: 1px solid #ccc;"> | |||
</div> | |||
<div id="mainIsCheckIn" style="float: left; margin:0 20px 20px 0; width: 650px; height: 350px;border: 1px solid #ccc;"> | |||
</div> | |||
<div id="mainIsSubsidize1" style="float: left; margin:0 20px 20px 0; width: 650px; height: 350px;border: 1px solid #ccc;"> | |||
</div> | |||
<div id="mainIsMilitary" style="float: left; margin:0 20px 20px 0; width: 650px; height: 350px;border: 1px solid #ccc;"> | |||
</div> | |||
<div id="mainIsPay" style="float: left; margin:0 20px 20px 0; width: 650px; height: 350px;border: 1px solid #ccc;"> | |||
</div> | |||
<div id="mainIsMug" style="float: left; margin:0 20px 20px 0; width: 650px; height: 350px;border: 1px solid #ccc;"> | |||
</div> | |||
<div id="mainIsTakeCloths" style="float: left; margin:0 20px 20px 0; width: 650px; height: 350px;border: 1px solid #ccc;"> | |||
</div> | |||
<div id="mainIsQuantity" style="float: left; margin:0 20px 20px 0; width: 650px; height: 350px;border: 1px solid #ccc;"> | |||
</div> | |||
<div id="mainIsGetBeddingArticle" style="float: left; margin:0 20px 20px 0; width: 650px; height: 350px;border: 1px solid #ccc;"> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<script src="~/Content/echarts/echarts.js"></script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnroll/StatisticIndex.js") |
@@ -0,0 +1,397 @@ | |||
| |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.bind(); | |||
page.initChart(); | |||
}, | |||
bind: function () { | |||
// 刷新 | |||
$('#lr-replace').on('click', function () { | |||
location.reload(); | |||
}); | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 250, 400); | |||
$('#DeptNo').lrselect({ | |||
allowSearch: true, | |||
value: "deptno", | |||
text: "deptname", | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||
select: function (item) { | |||
if (item) { | |||
$('#MajorNo').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } | |||
}); | |||
} else { | |||
$('#MajorNo').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: "1=1 AND CheckMark=1" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#MajorNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
value: "majorno", | |||
text: "majorname", | |||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||
select: function (item) { | |||
if (item) { | |||
$('#ClassNo').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } | |||
}); | |||
} else { | |||
$('#ClassNo').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: "1=1 AND CheckMark=1" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#ClassNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||
value: "classno", | |||
text: "classname" | |||
}); | |||
$('#Grade').lrselect({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByClass', | |||
value: "year", | |||
text: "year", | |||
}) | |||
}, | |||
initChart: function (param) { | |||
var myChartIsReport = echarts.init(document.getElementById('mainIsReport')); | |||
var myChartIsCheckIn = echarts.init(document.getElementById('mainIsCheckIn')); | |||
var myChartIsSubsidize1 = echarts.init(document.getElementById('mainIsSubsidize1')); | |||
var myChartIsMilitary = echarts.init(document.getElementById('mainIsMilitary')); | |||
var myChartIsPay = echarts.init(document.getElementById('mainIsPay')); | |||
var myChartIsMug = echarts.init(document.getElementById('mainIsMug')); | |||
var myChartIsTakeCloths = echarts.init(document.getElementById('mainIsTakeCloths')); | |||
var myChartIsQuantity = echarts.init(document.getElementById('mainIsQuantity')); | |||
var myChartIsGetBeddingArticle = echarts.init(document.getElementById('mainIsGetBeddingArticle')); | |||
var queryJson = param || {}; | |||
learun.httpAsyncPost(top.$.rootUrl + "/EducationalAdministration/StuEnroll/GetStatisticData", { queryJson: JSON.stringify(queryJson) }, function (res) { | |||
if (res.code == 200) { | |||
var optionIsReport = { | |||
title: { | |||
text: '新生报到分析图', | |||
x: 'center' | |||
}, | |||
tooltip: { | |||
trigger: 'item', | |||
formatter: "{a} <br/>{b} : {c}人 ({d}%)" | |||
}, | |||
legend: { | |||
orient: 'vertical', | |||
left: 'left', | |||
data: res.data.legendDataIsReport | |||
}, | |||
series: [ | |||
{ | |||
name: '是否报到', | |||
type: 'pie', | |||
radius: '55%', | |||
center: ['50%', '60%'], | |||
data: res.data.seriesDataIsReport, | |||
itemStyle: { | |||
emphasis: { | |||
shadowBlur: 10, | |||
shadowOffsetX: 0, | |||
shadowColor: 'rgba(0, 0, 0, 0.5)' | |||
} | |||
} | |||
} | |||
] | |||
}; | |||
myChartIsReport.setOption(optionIsReport); | |||
var optionIsCheckIn = { | |||
title: { | |||
text: '新生住宿分析图', | |||
x: 'center' | |||
}, | |||
tooltip: { | |||
trigger: 'item', | |||
formatter: "{a} <br/>{b} : {c}人 ({d}%)" | |||
}, | |||
legend: { | |||
orient: 'vertical', | |||
left: 'left', | |||
data: res.data.legendDataIsCheckIn | |||
}, | |||
series: [ | |||
{ | |||
name: '是否住宿', | |||
type: 'pie', | |||
radius: '55%', | |||
center: ['50%', '60%'], | |||
data: res.data.seriesDataIsCheckIn, | |||
itemStyle: { | |||
emphasis: { | |||
shadowBlur: 10, | |||
shadowOffsetX: 0, | |||
shadowColor: 'rgba(0, 0, 0, 0.5)' | |||
} | |||
} | |||
} | |||
] | |||
}; | |||
myChartIsCheckIn.setOption(optionIsCheckIn); | |||
var optionIsSubsidize1 = { | |||
title: { | |||
text: '新生资助分析图', | |||
x: 'center' | |||
}, | |||
tooltip: { | |||
trigger: 'item', | |||
formatter: "{a} <br/>{b} : {c}人 ({d}%)" | |||
}, | |||
legend: { | |||
orient: 'vertical', | |||
left: 'left', | |||
data: res.data.legendDataIsSubsidize1 | |||
}, | |||
series: [ | |||
{ | |||
name: '是否资助', | |||
type: 'pie', | |||
radius: '55%', | |||
center: ['50%', '60%'], | |||
data: res.data.seriesDataIsSubsidize1, | |||
itemStyle: { | |||
emphasis: { | |||
shadowBlur: 10, | |||
shadowOffsetX: 0, | |||
shadowColor: 'rgba(0, 0, 0, 0.5)' | |||
} | |||
} | |||
} | |||
] | |||
}; | |||
myChartIsSubsidize1.setOption(optionIsSubsidize1); | |||
var optionIsMilitary = { | |||
title: { | |||
text: '新生军训分析图', | |||
x: 'center' | |||
}, | |||
tooltip: { | |||
trigger: 'item', | |||
formatter: "{a} <br/>{b} : {c}人 ({d}%)" | |||
}, | |||
legend: { | |||
orient: 'vertical', | |||
left: 'left', | |||
data: res.data.legendDataIsMilitary | |||
}, | |||
series: [ | |||
{ | |||
name: '是否军训', | |||
type: 'pie', | |||
radius: '55%', | |||
center: ['50%', '60%'], | |||
data: res.data.seriesDataIsMilitary, | |||
itemStyle: { | |||
emphasis: { | |||
shadowBlur: 10, | |||
shadowOffsetX: 0, | |||
shadowColor: 'rgba(0, 0, 0, 0.5)' | |||
} | |||
} | |||
} | |||
] | |||
}; | |||
myChartIsMilitary.setOption(optionIsMilitary); | |||
var optionIsPay = { | |||
title: { | |||
text: '新生缴费分析图', | |||
x: 'center' | |||
}, | |||
tooltip: { | |||
trigger: 'item', | |||
formatter: "{a} <br/>{b} : {c}人 ({d}%)" | |||
}, | |||
legend: { | |||
orient: 'vertical', | |||
left: 'left', | |||
data: res.data.legendDataIsPay | |||
}, | |||
series: [ | |||
{ | |||
name: '是否缴费', | |||
type: 'pie', | |||
radius: '55%', | |||
center: ['50%', '60%'], | |||
data: res.data.seriesDataIsPay, | |||
itemStyle: { | |||
emphasis: { | |||
shadowBlur: 10, | |||
shadowOffsetX: 0, | |||
shadowColor: 'rgba(0, 0, 0, 0.5)' | |||
} | |||
} | |||
} | |||
] | |||
}; | |||
myChartIsPay.setOption(optionIsPay); | |||
var optionIsMug = { | |||
title: { | |||
text: '新生拍照分析图', | |||
x: 'center' | |||
}, | |||
tooltip: { | |||
trigger: 'item', | |||
formatter: "{a} <br/>{b} : {c}人 ({d}%)" | |||
}, | |||
legend: { | |||
orient: 'vertical', | |||
left: 'left', | |||
data: res.data.legendDataIsMug | |||
}, | |||
series: [ | |||
{ | |||
name: '是否拍照', | |||
type: 'pie', | |||
radius: '55%', | |||
center: ['50%', '60%'], | |||
data: res.data.seriesDataIsMug, | |||
itemStyle: { | |||
emphasis: { | |||
shadowBlur: 10, | |||
shadowOffsetX: 0, | |||
shadowColor: 'rgba(0, 0, 0, 0.5)' | |||
} | |||
} | |||
} | |||
] | |||
}; | |||
myChartIsMug.setOption(optionIsMug); | |||
var optionIsTakeCloths = { | |||
title: { | |||
text: '新生领取军训服分析图', | |||
x: 'center' | |||
}, | |||
tooltip: { | |||
trigger: 'item', | |||
formatter: "{a} <br/>{b} : {c}人 ({d}%)" | |||
}, | |||
legend: { | |||
orient: 'vertical', | |||
left: 'left', | |||
data: res.data.legendDataIsTakeCloths | |||
}, | |||
series: [ | |||
{ | |||
name: '是否领取军训服', | |||
type: 'pie', | |||
radius: '55%', | |||
center: ['50%', '60%'], | |||
data: res.data.seriesDataIsTakeCloths, | |||
itemStyle: { | |||
emphasis: { | |||
shadowBlur: 10, | |||
shadowOffsetX: 0, | |||
shadowColor: 'rgba(0, 0, 0, 0.5)' | |||
} | |||
} | |||
} | |||
] | |||
}; | |||
myChartIsTakeCloths.setOption(optionIsTakeCloths); | |||
var optionIsQuantity = { | |||
title: { | |||
text: '新生量取校服尺寸分析图', | |||
x: 'center' | |||
}, | |||
tooltip: { | |||
trigger: 'item', | |||
formatter: "{a} <br/>{b} : {c}人 ({d}%)" | |||
}, | |||
legend: { | |||
orient: 'vertical', | |||
left: 'left', | |||
data: res.data.legendDataIsQuantity | |||
}, | |||
series: [ | |||
{ | |||
name: '是否量取校服尺寸', | |||
type: 'pie', | |||
radius: '55%', | |||
center: ['50%', '60%'], | |||
data: res.data.seriesDataIsQuantity, | |||
itemStyle: { | |||
emphasis: { | |||
shadowBlur: 10, | |||
shadowOffsetX: 0, | |||
shadowColor: 'rgba(0, 0, 0, 0.5)' | |||
} | |||
} | |||
} | |||
] | |||
}; | |||
myChartIsQuantity.setOption(optionIsQuantity); | |||
var optionIsGetBeddingArticle = { | |||
title: { | |||
text: '新生领取床上用品分析图', | |||
x: 'center' | |||
}, | |||
tooltip: { | |||
trigger: 'item', | |||
formatter: "{a} <br/>{b} : {c}人 ({d}%)" | |||
}, | |||
legend: { | |||
orient: 'vertical', | |||
left: 'left', | |||
data: res.data.legendDataIsGetBeddingArticle | |||
}, | |||
series: [ | |||
{ | |||
name: '是否领取床上用品', | |||
type: 'pie', | |||
radius: '55%', | |||
center: ['50%', '60%'], | |||
data: res.data.seriesDataIsGetBeddingArticle, | |||
itemStyle: { | |||
emphasis: { | |||
shadowBlur: 10, | |||
shadowOffsetX: 0, | |||
shadowColor: 'rgba(0, 0, 0, 0.5)' | |||
} | |||
} | |||
} | |||
] | |||
}; | |||
myChartIsGetBeddingArticle.setOption(optionIsGetBeddingArticle); | |||
} | |||
}); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
page.initChart(param); | |||
} | |||
}; | |||
page.init(); | |||
} | |||
@@ -971,6 +971,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuConsumption\IndexForTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\AmountForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\Peichart.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\StatisticIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuGrant\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuGrant\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasicChange\Form.js" /> | |||
@@ -7143,6 +7144,7 @@ | |||
<Content Include="Areas\Permission\Views\Perm_FunctionVisit\IndexForCount.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\SchoolCalendar\ScheduleIndex.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\Peichart.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\StatisticIndex.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" /> | |||
@@ -42,6 +42,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<StuEnrollEntity> GetList(string queryJson) | |||
{ | |||
try | |||
{ | |||
return stuEnrollService.GetList(queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public DataTable Execute(string sql) | |||
{ | |||
return stuEnrollService.Execute(sql); | |||
@@ -22,6 +22,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<StuEnrollEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<StuEnrollEntity> GetList(string queryJson); | |||
DataTable Execute(string sql); | |||
IEnumerable<StuEnrollEntity> AllStudent(); | |||
IEnumerable<Acc_DormitoryBuildEntity> GetDormitorys(Pagination pagination, string queryJson); | |||
@@ -342,6 +342,259 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<StuEnrollEntity> GetList( string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT t.* "); | |||
strSql.Append(" FROM StuEnroll t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["IDCard"].IsEmpty()) | |||
{ | |||
dp.Add("IDCard", "%" + queryParam["IDCard"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.IDCard Like @IDCard "); | |||
} | |||
if (!queryParam["Year"].IsEmpty()) | |||
{ | |||
dp.Add("Year", "%" + queryParam["Year"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.ClassNo Like @Year "); | |||
} | |||
//sql条件 | |||
if (!queryParam["SqlParameter"].IsEmpty()) | |||
{ | |||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||
} | |||
if (!queryParam["RegistrationNo"].IsEmpty()) | |||
{ | |||
dp.Add("RegistrationNo", "%" + queryParam["RegistrationNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.RegistrationNo Like @RegistrationNo "); | |||
} | |||
if (!queryParam["Admissions"].IsEmpty()) | |||
{ | |||
dp.Add("Admissions", queryParam["Admissions"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Admissions = @Admissions "); | |||
} | |||
if (!queryParam["DeptNo"].IsEmpty()) | |||
{ | |||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.DeptNo = @DeptNo "); | |||
} | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MajorNo = @MajorNo "); | |||
} | |||
if (!queryParam["Grade"].IsEmpty()) | |||
{ | |||
dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Grade = @Grade "); | |||
} | |||
if (!queryParam["ClassNo"].IsEmpty()) | |||
{ | |||
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ClassNo = @ClassNo "); | |||
} | |||
if (!queryParam["IsAllocation"].IsEmpty()) | |||
{ | |||
var IsAllocation = Convert.ToBoolean(queryParam["IsAllocation"].ToString()); | |||
if (IsAllocation) | |||
{ | |||
strSql.Append(" AND (t.ClassNo IS NOT NULL AND t.ClassNo<>'')"); | |||
} | |||
else | |||
{ | |||
strSql.Append(" AND (t.ClassNo IS NULL OR t.ClassNo='')"); | |||
} | |||
} | |||
if (!queryParam["IsAllocationDormitory"].IsEmpty()) | |||
{ | |||
var IsAllocation = Convert.ToBoolean(queryParam["IsAllocationDormitory"].ToString()); | |||
if (IsAllocation) | |||
{ | |||
strSql.Append(" AND (t.DormitoryNo IS NOT NULL AND t.DormitoryNo<>'')"); | |||
} | |||
else | |||
{ | |||
strSql.Append(" AND (t.DormitoryNo IS NULL OR t.DormitoryNo='')"); | |||
} | |||
} | |||
if (!queryParam["StuName"].IsEmpty()) | |||
{ | |||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.StuName Like @StuName "); | |||
} | |||
if (!queryParam["Status"].IsEmpty()) | |||
{ | |||
dp.Add("Status", queryParam["Status"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Status = @Status "); | |||
} | |||
if (!queryParam["Gender"].IsEmpty()) | |||
{ | |||
dp.Add("Gender", Convert.ToBoolean(queryParam["Gender"].ToString()), DbType.Boolean); | |||
strSql.Append(" AND t.Gender = @Gender "); | |||
} | |||
if (!queryParam["PayList"].IsEmpty()) | |||
{ | |||
strSql.Append(" AND t.Status>=3 AND t.Status<6 "); | |||
} | |||
if (!queryParam["IsCheckIn"].IsEmpty()) | |||
{ | |||
if (queryParam["IsCheckIn"].ToString() == "null") | |||
{ | |||
strSql.Append(" AND t.IsCheckIn is null "); | |||
} | |||
else | |||
{ | |||
dp.Add("IsCheckIn", queryParam["IsCheckIn"].ToString(), DbType.String); | |||
strSql.Append(" AND t.IsCheckIn = @IsCheckIn "); | |||
} | |||
} | |||
if (!queryParam["IsSubsidize1"].IsEmpty()) | |||
{ | |||
if (queryParam["IsSubsidize1"].ToString() == "null") | |||
{ | |||
strSql.Append(" AND t.IsSubsidize1 is null "); | |||
} | |||
else | |||
{ | |||
dp.Add("IsSubsidize1", queryParam["IsSubsidize1"].ToString(), DbType.String); | |||
strSql.Append(" AND t.IsSubsidize1 = @IsSubsidize1 "); | |||
} | |||
} | |||
if (!queryParam["IsMilitary"].IsEmpty()) | |||
{ | |||
if (queryParam["IsMilitary"].ToString() == "null") | |||
{ | |||
strSql.Append(" AND t.IsMilitary is null "); | |||
} | |||
else | |||
{ | |||
dp.Add("IsMilitary", queryParam["IsMilitary"].ToString(), DbType.String); | |||
strSql.Append(" AND t.IsMilitary = @IsMilitary "); | |||
} | |||
} | |||
if (!queryParam["IsPay"].IsEmpty()) | |||
{ | |||
if (queryParam["IsPay"].ToString() == "null") | |||
{ | |||
strSql.Append(" AND t.IsPay is null "); | |||
} | |||
else | |||
{ | |||
dp.Add("IsPay", queryParam["IsPay"].ToString(), DbType.String); | |||
strSql.Append(" AND t.IsPay = @IsPay "); | |||
} | |||
} | |||
if (!queryParam["IsMug"].IsEmpty()) | |||
{ | |||
if (queryParam["IsMug"].ToString() == "null") | |||
{ | |||
strSql.Append(" AND t.IsMug is null "); | |||
} | |||
else | |||
{ | |||
dp.Add("IsMug", queryParam["IsMug"].ToString(), DbType.String); | |||
strSql.Append(" AND t.IsMug = @IsMug "); | |||
} | |||
} | |||
if (!queryParam["IsTakeCloths"].IsEmpty()) | |||
{ | |||
if (queryParam["IsTakeCloths"].ToString() == "null") | |||
{ | |||
strSql.Append(" AND t.IsTakeCloths is null "); | |||
} | |||
else | |||
{ | |||
dp.Add("IsTakeCloths", queryParam["IsTakeCloths"].ToString(), DbType.String); | |||
strSql.Append(" AND t.IsTakeCloths = @IsTakeCloths "); | |||
} | |||
} | |||
if (!queryParam["IsQuantity"].IsEmpty()) | |||
{ | |||
if (queryParam["IsQuantity"].ToString() == "null") | |||
{ | |||
strSql.Append(" AND t.IsQuantity is null "); | |||
} | |||
else | |||
{ | |||
dp.Add("IsQuantity", queryParam["IsQuantity"].ToString(), DbType.String); | |||
strSql.Append(" AND t.IsQuantity = @IsQuantity "); | |||
} | |||
} | |||
if (!queryParam["IsGetBeddingArticle"].IsEmpty()) | |||
{ | |||
if (queryParam["IsGetBeddingArticle"].ToString() == "null") | |||
{ | |||
strSql.Append(" AND t.IsGetBeddingArticle is null "); | |||
} | |||
else | |||
{ | |||
dp.Add("IsGetBeddingArticle", queryParam["IsGetBeddingArticle"].ToString(), DbType.String); | |||
strSql.Append(" AND t.IsGetBeddingArticle = @IsGetBeddingArticle "); | |||
} | |||
} | |||
//获取班主任所带的班级 | |||
var roleid = this.BaseRepository().FindEntity<RoleEntity>(a => a.F_FullName == "班主任")?.F_RoleId; | |||
var userInfo = LoginUserInfo.Get(); | |||
var sqlClasses = ""; | |||
if (!string.IsNullOrEmpty(roleid)) | |||
{ | |||
if (userInfo.roleIds.Contains(roleid)) | |||
{ | |||
var classes = this.BaseRepository("CollegeMIS").FindList<ClassInfoEntity>(a => a.ClassDiredctorNo == userInfo.account).Select(a => a.ClassNo).ToList(); | |||
if (classes != null) | |||
{ | |||
foreach (var item in classes) | |||
{ | |||
sqlClasses += $"'{item}',"; | |||
} | |||
sqlClasses = sqlClasses.TrimEnd(','); | |||
} | |||
} | |||
if (!string.IsNullOrEmpty(sqlClasses)) | |||
{ | |||
strSql.Append($" AND t.ClassNo IN({sqlClasses})"); | |||
} | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<StuEnrollEntity>(strSql.ToString(), dp); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public DataTable Execute(string sql) | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindTable(sql); | |||