diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Controllers/EnrollmentMajorPlanController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Controllers/EnrollmentMajorPlanController.cs index c9e32938a..40ebec5c8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Controllers/EnrollmentMajorPlanController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Controllers/EnrollmentMajorPlanController.cs @@ -43,6 +43,10 @@ namespace Learun.Application.Web.Areas.AdmissionsPlatform.Controllers { return View(); } + public ActionResult SourceIndex() + { + return View(); + } #region 获取数据 /// @@ -79,7 +83,20 @@ namespace Learun.Application.Web.Areas.AdmissionsPlatform.Controllers var data = enrollmentMajorPlanIBLL.GetPageList(queryJson); return Success(data); } - + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetLists(string queryJson) + { + var data = enrollmentMajorPlanIBLL.GetPageLists(queryJson); + return Success(data); + } + /// /// 获取表单数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Views/EnrollmentMajorPlan/SourceIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Views/EnrollmentMajorPlan/SourceIndex.cshtml new file mode 100644 index 000000000..c76d1b413 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Views/EnrollmentMajorPlan/SourceIndex.cshtml @@ -0,0 +1,55 @@ +@{ + ViewBag.Title = "EnrollmentMajorPlan"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
系部
+
+
+
+
专业
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/AdmissionsPlatform/Views/EnrollmentMajorPlan/SourceIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Views/EnrollmentMajorPlan/SourceIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Views/EnrollmentMajorPlan/SourceIndex.js new file mode 100644 index 000000000..6a46c6976 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Views/EnrollmentMajorPlan/SourceIndex.js @@ -0,0 +1,159 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-09-11 14:55 + * 描 述:EnrollmentMajorPlan + */ +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); + }, 240, 400); + $('#Year').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GenerateNearByYear', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); + $('#ProvinceNo').lrDataSourceSelect({ + code: 'DIC_PROVINCE', value: 'pcode', text: 'pname', + select: function (item) { + if (!!item) { + $('#CityNo').lrselectRefresh({ + url: "/DIC_CITY/GetListByProvinceCode", + param: { ProvinceCode: item.pcode }, + value: 'CCODE', + text: 'CNAME' + }); + $('#RegionNo').lrselectRefresh({ + url: "", + data: [] + }); + } + } + }); + $('#CityNo').lrselect({ + select: function (item) { + if (!!item) { + $('#AreaNo').lrselectRefresh({ + url: top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", + param: { cityCode: item.CCODE }, + value: 'ACODE', + text: 'ANAME' + }); + } + } + }); + $('#AreaNo').lrselect(); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/AdmissionsPlatform/EnrollmentMajorPlan/GetLists', + headData: [ + { label: "学年", name: "Year", width: 100, align: "left" }, + { label: "学期", name: "Semester", width: 100, align: "left" }, + { + 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: 'ProvinceNo', width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_PROVINCE', + key: value, + keyId: 'pcode', + callback: function (_data) { + callback(_data['pname']); + } + }); + } + }, + { + label: '市', name: 'CityNo', width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY', + key: value, + keyId: 'ccode', + callback: function (_data) { + callback(_data['cname']); + } + }); + } + }, + { + label: '县', name: 'AreaNo', width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_AREA', + key: value, + keyId: 'acode', + callback: function (_data) { + callback(_data['aname']); + } + }); + } + }, + + { label: '人数', name: 'RecruitNum', width: 200, align: "left" }, + ], + mainId: 'ID', + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} 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 f841b27ad..9d286f7a4 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 @@ -908,6 +908,7 @@ + @@ -8303,6 +8304,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AdmissionsPlatform/EnrollmentMajorPlan/EnrollmentMajorPlanBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AdmissionsPlatform/EnrollmentMajorPlan/EnrollmentMajorPlanBLL.cs index d8290e905..94582e28c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AdmissionsPlatform/EnrollmentMajorPlan/EnrollmentMajorPlanBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AdmissionsPlatform/EnrollmentMajorPlan/EnrollmentMajorPlanBLL.cs @@ -66,6 +66,24 @@ namespace Learun.Application.TwoDevelopment.AdmissionsPlatform } } } + public IEnumerable GetPageLists(string queryJson) + { + try + { + return enrollmentMajorPlanService.GetPageLists(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 获取EnrollmentMajorPlan表实体数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AdmissionsPlatform/EnrollmentMajorPlan/EnrollmentMajorPlanEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AdmissionsPlatform/EnrollmentMajorPlan/EnrollmentMajorPlanEntity.cs index 1c3e2657f..0ea648395 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AdmissionsPlatform/EnrollmentMajorPlan/EnrollmentMajorPlanEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AdmissionsPlatform/EnrollmentMajorPlan/EnrollmentMajorPlanEntity.cs @@ -113,6 +113,12 @@ namespace Learun.Application.TwoDevelopment.AdmissionsPlatform } #endregion #region 扩展字段 + [NotMapped] + public string ProvinceNo { get; set; } + [NotMapped] + public string CityNo { get; set; } + [NotMapped] + public string AreaNo { get; set; } #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AdmissionsPlatform/EnrollmentMajorPlan/EnrollmentMajorPlanIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AdmissionsPlatform/EnrollmentMajorPlan/EnrollmentMajorPlanIBLL.cs index 22e47ea55..31248b52a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AdmissionsPlatform/EnrollmentMajorPlan/EnrollmentMajorPlanIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AdmissionsPlatform/EnrollmentMajorPlan/EnrollmentMajorPlanIBLL.cs @@ -22,6 +22,7 @@ namespace Learun.Application.TwoDevelopment.AdmissionsPlatform /// IEnumerable GetPageList(Pagination pagination, string queryJson); IEnumerable GetPageList(string queryJson); + IEnumerable GetPageLists(string queryJson); /// /// 获取EnrollmentMajorPlan表实体数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AdmissionsPlatform/EnrollmentMajorPlan/EnrollmentMajorPlanService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AdmissionsPlatform/EnrollmentMajorPlan/EnrollmentMajorPlanService.cs index 993353903..605f7406e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AdmissionsPlatform/EnrollmentMajorPlan/EnrollmentMajorPlanService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AdmissionsPlatform/EnrollmentMajorPlan/EnrollmentMajorPlanService.cs @@ -148,6 +148,85 @@ namespace Learun.Application.TwoDevelopment.AdmissionsPlatform } } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageLists(string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append(@"select t.Year,t.Semester,t.Majorno,t.deptno,s.ProvinceNo,s.CityNo,s.AreaNo,s.num as RecruitNum from EnrollmentMajorPlan t +left join(select MajorPlanId, ProvinceNo,CityNo,AreaNo,sum(num) as num from EnrollmentMajorPlanSource Group by ProvinceNo,CityNo,AreaNo,MajorPlanId) s on t.id = s.MajorPlanId "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["Year"].IsEmpty()) + { + dp.Add("Year", queryParam["Year"].ToString(), DbType.String); + strSql.Append(" AND t.Year = @Year "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" AND t.Semester = @Semester "); + } + 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["SubjectNo"].IsEmpty()) + { + dp.Add("SubjectNo", queryParam["SubjectNo"].ToString(), DbType.String); + strSql.Append(" AND t.SubjectNo = @SubjectNo "); + } + if (!queryParam["RecruitType"].IsEmpty()) + { + dp.Add("RecruitType", queryParam["RecruitType"].ToString(), DbType.String); + strSql.Append(" AND t.RecruitType = @RecruitType "); + } + if (!queryParam["ProvinceNo"].IsEmpty()) + { + dp.Add("ProvinceNo", queryParam["ProvinceNo"].ToString(), DbType.String); + strSql.Append(" AND s.ProvinceNo = @ProvinceNo "); + } + if (!queryParam["CityNo"].IsEmpty()) + { + dp.Add("CityNo", queryParam["CityNo"].ToString(), DbType.String); + strSql.Append(" AND s.CityNo = @CityNo "); + } + if (!queryParam["AreaNo"].IsEmpty()) + { + dp.Add("AreaNo", queryParam["AreaNo"].ToString(), DbType.String); + strSql.Append(" AND s.AreaNo = @AreaNo "); + } + strSql.Append(" Group by t.Year,t.Semester,t.Majorno, t.deptno,s.ProvinceNo,s.CityNo,s.AreaNo,s.num "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// /// 获取EnrollmentMajorPlan表实体数据 ///