diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollController.cs index aca79df42..97764b3fd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollController.cs @@ -5,8 +5,11 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Web.Mvc; +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 { @@ -61,6 +64,116 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + [HttpGet] + /// + /// 是否饼状图 + /// + /// + public ActionResult Peichart() + { + //是否报道 + string sql = $"SELECT COUNT(CASE WHEN IsReport=1 THEN 1 END) AS num1, COUNT(CASE WHEN IsReport = 0 THEN 1 END) AS num2 FROM StuEnroll"; + var data = stuEnrollIBLL.Execute(sql); + List list2 = new List(); + list2.Add(new + { + name = "报道人数", + value = data.Rows[0]["num1"].ToString() + + }); + list2.Add(new + { + name = "未报道人数", + value = data.Rows[0]["num2"].ToString() + + }); + var jsonData = new + { + rows = list2 + }; + //是否住宿 + string sql1 = $"SELECT COUNT(CASE WHEN IsCheckIn=1 THEN 1 END) AS num1, COUNT(CASE WHEN IsCheckIn = 0 THEN 1 END) AS num2 FROM StuEnroll"; + var data1 = stuEnrollIBLL.Execute(sql); + List list3 = new List(); + list3.Add(new + { + name = "住宿人数", + value = data.Rows[0]["num1"].ToString() + + }); + list3.Add(new + { + name = "未住宿人数", + value = data.Rows[0]["num2"].ToString() + + }); + var jsonData1 = new + { + rows = list3 + }; + ///是否资助 + string sql2 = $"SELECT COUNT(CASE WHEN IsSubsidize1=1 THEN 1 END) AS num1, COUNT(CASE WHEN IsSubsidize1 = 0 THEN 1 END) AS num2 FROM StuEnroll"; + var data2 = stuEnrollIBLL.Execute(sql); + List list4 = new List(); + list4.Add(new + { + name = "资助人数", + value = data.Rows[0]["num1"].ToString() + + }); + list4.Add(new + { + name = "未资助人数", + value = data.Rows[0]["num2"].ToString() + + }); + var jsonData2 = new + { + rows = list4 + }; + //是否军训 + string sql3 = $"SELECT COUNT(CASE WHEN IsMilitary=1 THEN 1 END) AS num1, COUNT(CASE WHEN IsMilitary = 0 THEN 1 END) AS num2 FROM StuEnroll"; + var data3 = stuEnrollIBLL.Execute(sql); + List list5 = new List(); + list5.Add(new + { + name = "军训人数", + value = data.Rows[0]["num1"].ToString() + + }); + list5.Add(new + { + name = "未军训人数", + value = data.Rows[0]["num2"].ToString() + + }); + var jsonData3 = new + { + rows = list5 + }; + //是否缴费 + string sql4 = $"SELECT COUNT(CASE WHEN IsPay=1 THEN 1 END) AS num1, COUNT(CASE WHEN IsPay = 0 THEN 1 END) AS num2 FROM StuEnroll"; + var data4 = stuEnrollIBLL.Execute(sql); + List list6 = new List(); + list6.Add(new + { + name = "缴费人数", + value = data.Rows[0]["num1"].ToString() + + }); + list6.Add(new + { + name = "未缴费人数", + value = data.Rows[0]["num2"].ToString() + + }); + var jsonData4 = new + { + rows = list6 + }; + return JsonResult(jsonData); + } + /// @@ -209,6 +322,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 招生统计 + /// + /// + public ActionResult StatisticIndex() + { + return View(); + } #endregion @@ -314,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(); } @@ -344,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 list=new List(); + var result = classList.GroupBy(a => a.Grade).Select(m => m.Key).ToList(); + List list = new List(); foreach (var item in result) { - list.Add(new{year=item}); + list.Add(new { year = item }); } return Success(list); @@ -847,6 +968,193 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers + /// + /// 招生统计数据 + /// + /// + /// + 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(); + var seriesDataIsReport = new List(); + 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(); + var seriesDataIsCheckIn = new List(); + 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(); + var seriesDataIsSubsidize1 = new List(); + 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(); + var seriesDataIsMilitary = new List(); + 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(); + var seriesDataIsPay = new List(); + 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(); + var seriesDataIsMug = new List(); + 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(); + var seriesDataIsTakeCloths = new List(); + 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(); + var seriesDataIsQuantity = new List(); + 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(); + var seriesDataIsGetBeddingArticle = new List(); + 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 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Shared/_Layout.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Shared/_Layout.cshtml new file mode 100644 index 000000000..ad42acf45 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Shared/_Layout.cshtml @@ -0,0 +1,40 @@ + + + + + + @ViewBag.Title - My ASP.NET Application + + + + + + + +
+ @RenderBody() +
+
+

© @DateTime.Now.Year - My ASP.NET Application

+
+
+ + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/Peichart.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/Peichart.cshtml new file mode 100644 index 000000000..003d1ad39 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/Peichart.cshtml @@ -0,0 +1,42 @@ + +@{ + ViewBag.Title = "资产新增报表"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + + + + + + + Peichart + + +
+
+
+ @*
+
+
+
+
+  刷新 +
+
+
*@ +
+
+
+
+
+
+
+
+
+
+
+
+ + + +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnroll/Peichart.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/Peichart.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/Peichart.js new file mode 100644 index 000000000..98bcee8ed --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/Peichart.js @@ -0,0 +1,73 @@ +var bootstrap = function ($, learun) { + "use strict"; + var year = ""; + var page = { + init: function () { + page.bind(); + page.initGrid(); + page.initChart(); + }, + bind: function () { + //当前年 + var now = learun.formatDate(new Date(), 'yyyy'); + $('#year').val(now); + year = now; + // 刷新 + $('#lr-replace').on('click', function () { + location.reload(); + }); + //查询 + $('#btn_Search').on('click', function () { + year = $('#year').val(); + page.search(); + }); + }, + initGrid: function () { + //$(".lr-layout-grid").height($(window).height() - 110); + //$('#gridtable').lrAuthorizeJfGridLei({ + // url: top.$.rootUrl + '/AssetManagementSystem/AssReport/AssAddReportList', + // headData: [ + // { name: "name", label: "年份", width: 100, align: "center" }, + // { name: "value", label: "金额", width: 150, align: "center" } + + // ] + //}); + //page.search(); + }, + initChart: function () { + var myChart1 = echarts.init(document.getElementById('main')); + //var myChart2 = echarts.init(document.getElementById('main1')); + var queryJson = { year: year }; + learun.httpAsyncPost(top.$.rootUrl + "/EducationalAdministration/StuEnroll/Peichart", { queryJson: JSON.stringify(queryJson) }, function (res) { + if (res.code == 200) { + var option = { + xAxis: { + type: 'category', + data: res.data.name + }, + yAxis: { + type: 'value' + }, + series: [{ + data: res.data.value, + type: 'bar' + }] + }; + + myChart1.setOption(option); + + } + }); + + }, + search: function (param) { + param = param || {}; + param.year = year; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + page.initChart(); + } + }; + page.init(); +} + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/StatisticIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/StatisticIndex.cshtml new file mode 100644 index 000000000..9e5789ae3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/StatisticIndex.cshtml @@ -0,0 +1,76 @@ + +@{ + ViewBag.Title = "招生统计"; + Layout = "~/Views/Shared/_ReportTemplate.cshtml"; +} + +@Html.AppendJsFile("/Views/LR_Content/script/lr-form.js") +
+
+
+
+
+
+
+
+
+
+
+
+
+
专业
+
+
+
+
班级
+
+
+
+
学年
+
+
+ +
+
+
+
+
+
+  刷新 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+ +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnroll/StatisticIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/StatisticIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/StatisticIndex.js new file mode 100644 index 000000000..bc69a1882 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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}
{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}
{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}
{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}
{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}
{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}
{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}
{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}
{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}
{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(); +} + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/_ViewStart.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/_ViewStart.cshtml new file mode 100644 index 000000000..334424cae --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "~/Areas/EducationalAdministration/Views/Shared/_Layout.cshtml"; +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.cshtml index a750e59dd..d47a63578 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.cshtml @@ -20,11 +20,71 @@  编辑  删除*@  打印 + + +
+
+
+
您有新的未读消息x
+
+
+ +
-@Html.AppendJsFile("/Areas/LR_Desktop/Views/MessageRind/Index.js") +@Html.AppendJsFile("/Areas/LR_Desktop/Views/MessageRind/Index.js"); + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.js index 38a843803..eab7de93b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.js @@ -94,6 +94,8 @@ var bootstrap = function ($, learun) { }); }, + + // 初始化列表 initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/Site.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/Site.css new file mode 100644 index 000000000..c631428c6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/Site.css @@ -0,0 +1,18 @@ +body { + padding-top: 50px; + padding-bottom: 20px; +} + +/* Set padding to keep content from hitting the edges */ +.body-content { + padding-left: 15px; + padding-right: 15px; +} + +/* Set width on the form input elements since they're 100% wide by default */ +input, +select, +textarea { + max-width: 280px; +} + 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 63426a1f6..d5a5bc467 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 @@ -970,6 +970,8 @@ + + @@ -3220,6 +3222,7 @@ + @@ -7141,6 +7144,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollBLL.cs index b3804b800..eaea15193 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollBLL.cs @@ -42,6 +42,35 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable 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); + } public IEnumerable AllStudent() { try diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollIBLL.cs index 42af973d2..7009b7375 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollIBLL.cs @@ -22,6 +22,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetList(string queryJson); + DataTable Execute(string sql); IEnumerable AllStudent(); IEnumerable GetDormitorys(Pagination pagination, string queryJson); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollService.cs index 94c5ef896..fbbd1cc37 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollService.cs @@ -342,7 +342,263 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable 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(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(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(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); + } public IEnumerable AllStudent() {