diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SchoolLevelScholarshipController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SchoolLevelScholarshipController.cs index fb44c0dc5..7a8d65eb4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SchoolLevelScholarshipController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SchoolLevelScholarshipController.cs @@ -3,6 +3,8 @@ using System.Data; using Learun.Application.TwoDevelopment.EducationalAdministration; using System.Web.Mvc; using System.Collections.Generic; +using System; +using System.Linq; namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { @@ -17,6 +19,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { private SchoolLevelScholarshipIBLL schoolLevelScholarshipIBLL = new SchoolLevelScholarshipBLL(); private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); + private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); + private StuScoreIBLL stuScoreIBLL = new StuScoreBLL(); #region 视图功能 @@ -27,7 +31,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Index() { - return View(); + return View(); } /// /// 表单页 @@ -36,8 +40,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Form() { - return View(); + return View(); } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult IndexInStuScore() + { + return View(); + } + + #endregion #region 获取数据 @@ -72,8 +87,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [AjaxOnly] public ActionResult GetFormData(string keyValue) { - var SchoolLevelScholarshipData = schoolLevelScholarshipIBLL.GetSchoolLevelScholarshipEntity( keyValue ); - var jsonData = new { + var SchoolLevelScholarshipData = schoolLevelScholarshipIBLL.GetSchoolLevelScholarshipEntity(keyValue); + var jsonData = new + { SchoolLevelScholarship = SchoolLevelScholarshipData, }; return Success(jsonData); @@ -87,6 +103,71 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers var data = classInfoIBLL.GetListByAccount(account); return Success(data); } + + /// + /// 获取班级成绩列表 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetScoreListByClassNo(string queryJson) + { + var data = stuScoreIBLL.GetScoreListByClassNoForScholarship(queryJson); + + var aa = data.GroupBy(x => new { x.StuNo, x.StuName, x.StuId, x.DepositBank, x.BankCode, x.DeptNo, x.ClassNo, x.IdCard }).Select(x => new + { + StuId = x.Key.StuId, + StuNo = x.Key.StuNo, + StuName = x.Key.StuName, + DeptNo = x.Key.DeptNo, + ClassNo = x.Key.ClassNo, + IdCard = x.Key.IdCard, + DepositBank = x.Key.DepositBank, + BankCode = x.Key.BankCode, + TotalScore = x.Select(y => y.Score).Sum(), + }).OrderByDescending(x => x.TotalScore); + + var result = new List>(); + int num = 1; + foreach (var item in aa) + { + var aaa = new Dictionary(); + aaa.Add("Num", num.ToString()); + aaa.Add("StuNum", aa.Count().ToString()); + aaa.Add("StuId", item.StuId); + aaa.Add("StuNo", item.StuNo); + aaa.Add("StuName", item.StuName); + aaa.Add("DeptNo", item.DeptNo); + aaa.Add("ClassNo", item.ClassNo); + aaa.Add("IdCard", item.IdCard); + aaa.Add("DepositBank", item.DepositBank); + aaa.Add("BankCode", item.BankCode); + aaa.Add("TotalScore", item.TotalScore.ToString()); + + + result.Add(aaa); + num++; + } + + return Success(result); + } + + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetStuInfoBasicEntityByStuNo(string StuNo) + { + var StuInfoBasic = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(StuNo); + var jsonData = new + { + StuInfoBasic = StuInfoBasic, + }; + return Success(jsonData); + } #endregion #region 提交数据 @@ -115,7 +196,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult SaveForm(string keyValue, string strEntity) { SchoolLevelScholarshipEntity entity = strEntity.ToObject(); - schoolLevelScholarshipIBLL.SaveEntity(keyValue,entity); + schoolLevelScholarshipIBLL.SaveEntity(keyValue, entity); if (string.IsNullOrEmpty(keyValue)) { } @@ -123,5 +204,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } #endregion + + } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Form.cshtml index 4001a0ea8..293f3f637 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Form.cshtml @@ -3,21 +3,22 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
+
姓名*
-
+ + 选择
学号*
- +
所属院系*
-
+
所属班级*
-
+
身份证件类型*
@@ -25,15 +26,15 @@
身份证件号*
- +
班级总人数*
- +
成绩排名名次*
- +
资助等级*
@@ -65,11 +66,11 @@
开户银行*
- +
开户行账号*
- +
开户行号
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Form.js index 17d1bfaeb..b6eb89722 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Form.js @@ -5,6 +5,7 @@ * 描 述:校级奖学金 */ var acceptClick; +var bindData; var keyValue = request('keyValue'); var bootstrap = function ($, learun) { "use strict"; @@ -15,69 +16,244 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { - $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); - $('#ClassNo').lrDataSourceSelect({ code: 'bjsj',value: 'classno',text: 'classname' }); + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); $('#FundingLevel').lrDataItemSelect({ code: 'StateStipend' }); $('#ApplyDate').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); //$('#Url').lrUploader(); - $("#StuName").lrlayerselect({ - treeUrl: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/GetClassList', - treeParentId: 'ClassNo', - treeValueId: 'ClassNo', - treeTextId: 'ClassName', - dataUrl: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetList', - dataTreeId: 'ClassNo', - dataValueId: 'AId', - dataTextId: 'AName', - grid: [ - { label: '资产编号', name: 'ACode', width: 200, align: 'left' }, - { label: '资产名称', name: 'AName', width: 200, align: 'left' }, - { label: "英文名称", name: "AEName", width: 200, align: "left" }, - { label: "资产型号", name: "AModel", width: 200, align: "left" }, - { label: "生产厂家", name: "AManufacturer", width: 200, align: "left" }, - { - label: "供应商", name: "ASupplierId", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_SupplierData', - key: value, - keyId: 'sid', - callback: function (_data) { - callback(_data['sname']); - } - }); - } - } - ], - select: function (values, texts) { - if (values && values.length > 0) { - $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetFormData?keyValue=' + values[0], function (data) { - data = data.Ass_AssetsInfo; - console.log(data); - $('#PAIName').val(data.AName);//资产名称 - //$('#AAIUnit').lrselectSet(data.AUnit); - $('#PAIEName').val(data.AEName);//英文名称 - $('#PAIModel').val(data.AModel);//资产型号 - $('#PAITId').val(data.AAssType);//资产类别 - $('#PAIManufacturer').val(data.AManufacturer);//生产厂家 - }); + //选择学生 + $("#lr_select").on('click', function () { + learun.layerForm({ + id: 'StuDentSelect', + title: '选择学生', + url: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/IndexInStuScore', + width: 1200, + height: 800, + callBack: function (id) { + return top[id].acceptClick(bindData); } - }, - unknowselect: function () { - $('#PAIName').val(""); - $('#PAIEName').val(""); - $('#PAITId').lrselectSet(""); - $('#PAIModel').val(""); - $('#PAIManufacturer').val(""); - }, - isMultiple: false + }); }); + //$("#StuName").lrlayerselect({ + // treeUrl: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/GetClassList', + // treeParentId: 'ClassNo', + // treeValueId: 'ClassNo', + // treeTextId: 'ClassName', + // dataUrl: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/GetStuList', + // dataTreeId: 'ClassNo', + // dataValueId: 'StuNo', + // dataTextId: 'StuName', + // grid: [ + // { label: "学号", name: "StuNo", width: 100, align: "left" }, + // //{ label: "学籍号", name: "StuCode", width: 100, align: "left" }, + // //{ label: "考生号", name: "ksh", width: 100, align: "left" }, + // //{ label: "通知书号", name: "NoticeNo", width: 100, align: "left" }, + // { label: "姓名", name: "StuName", width: 100, align: "left" }, + // { + // label: "性别", name: "GenderNo", width: 80, align: "left", + // formatter: function (cellvalue) { + // return cellvalue == true ? "男" : "女"; + // } + // }, + // { label: "出生日期", name: "Birthday", width: 100, align: "left" }, + // { label: "身份证号", name: "IdentityCardNo", width: 100, align: "left" }, + // { + // label: "民族", name: "NationalityNo", width: 100, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'National', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + // } + // }, + // { + // label: "政治面貌", name: "PartyFaceNo", width: 100, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'BCdPartyFace', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + // } + // }, + // { + // label: "系所", name: "DeptNo", width: 100, 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: 100, 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: "ClassNo", width: 100, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + // key: value, + // keyId: 'classno', + // callback: function (_data) { + // callback(_data['classname']); + // } + // }); + // } + // }, + // { label: "年级", name: "Grade", width: 100, align: "left" }, + // { + // label: "学制", name: "EduSystem", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'EduSystem', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + // } + // }, + // { + // label: "学习形式", name: "StudyModality", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'StudyModality', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + // } + // }, + // { label: "报到日期", name: "RegisterDate", width: 100, align: "left" }, + // { label: "入学年月", name: "EntranceDate", width: 100, align: "left" }, + // { label: "通讯地址", name: "MailAddress", width: 100, align: "left" }, + // { label: "联系电话", name: "mobile", width: 100, align: "left" }, + // { label: "户口所在地", name: "FatherUnit", width: 100, align: "left" }, + // { label: "档案所在地", name: "MatherUnit", width: 100, align: "left" }, + // { label: "户籍所在地", name: "Domicile", width: 100, align: "left" }, + // { + // label: "户口分类", name: "ResidenceNo", width: 100, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'ResidenceNo', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + // } + // }, + // { + // label: "籍贯 (省)", name: "F_ProvinceId", width: 100, 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: "F_CityId", width: 100, 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: "F_CountyId", width: 100, 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: "Remark", width: 200, align: "center" }, + // { + // label: "异动状态", name: "MoveStatus", width: 80, align: "center", + // formatter: function (cellvalue) { + // return cellvalue == "1" ? "" : ""; + // } + // }, + // { + // label: "异动类型", name: "MoveType", width: 100, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'StuChangeType', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + // } + // }, + // { + // label: "审核状态", name: "CheckMark", width: 80, align: "center", + // formatter: function (cellvalue) { + // return cellvalue == "1" ? "已审核" : "未审核"; + // } + // } + // ], + // select: function (values, texts) { + // if (values && values.length > 0) { + // console.log('values', values); + // $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/GetStuInfoBasicEntityByStuNo?keyValue=' + values[0], function (data) { + // data = data.StuInfoBasic; + // console.log(data); + // $('#StuNo').val(data.StuNo); + // $('#DeptNo').lrselectSet(data.DeptNo); + // $('#ClassNo').val(data.ClassNo); + // $('#IdCard').val(data.IdCard); + // $('#IdCardType').val('居民身份证'); + // $('#BankCard').val(data.BankCard); + // $('#BankCode').val(data.BankCode); + // }); + // } + // }, + // unknowselect: function () { + // }, + // isMultiple: false + //}); }, initData: function () { if (!!keyValue) { $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/GetFormData?keyValue=' + keyValue, function (data) { for (var id in data) { if (!!data[id].length && data[id].length > 0) { - $('#' + id ).jfGridSet('refreshdata', data[id]); + $('#' + id).jfGridSet('refreshdata', data[id]); } else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); @@ -102,5 +278,16 @@ var bootstrap = function ($, learun) { } }); }; + bindData = function (temprow) { + if (!!temprow) { + $('#StuNo').val(data.StuNo); + $('#DeptNo').lrselectSet(data.DeptNo); + $('#ClassNo').val(data.ClassNo); + $('#IdCard').val(data.IdCard); + $('#IdCardType').val('居民身份证'); + $('#BankCard').val(data.BankCard); + $('#BankCode').val(data.BankCode); + } + }; page.init(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexInStuScore.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexInStuScore.cshtml new file mode 100644 index 000000000..8589c13b2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexInStuScore.cshtml @@ -0,0 +1,115 @@ +@{ ViewBag.Title = "全院班级成绩查看"; Layout = "~/Views/Shared/_Index.cshtml"; } + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  查询 +
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexInStuScore.js") + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexInStuScore.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexInStuScore.js new file mode 100644 index 000000000..efb16d6e3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexInStuScore.js @@ -0,0 +1,132 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-06-14 11:02 + * 描 述:全院班级成绩查看 + */ +var selectedRow; +var refreshGirdData; +var acceptClick; +//课程列 +var LessonTemp = []; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + //page.initGird(); + page.bind(); + page.bindSelect(); + }, + bind: function () { + // 查询 + $('#btn_Search').on('click', function () { + var p = {}; + p.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + p.Semester = $('#Semester').lrselectGet(); + p.ClassNo = $('#ClassNo').lrselectGet(); + if (p.AcademicYearNo == null || p.AcademicYearNo == "") { + learun.alert.warning("请选择学年!"); + return; + } + if (p.Semester == null || p.Semester == "") { + learun.alert.warning("请选择学期!"); + return; + } + if (p.ClassNo == null || p.ClassNo == "") { + learun.alert.warning("请选择班级!"); + return; + } + + $.lrSetFormWithParam(top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoData', p, + function (data) { + var temparr = []; + for (var i = 0; i < data.length; i++) { + var item = {}; + item.label = data[i].text; + item.name = data[i].value; + item.width = 150; + item.align = "left"; + temparr.push(item); + } + LessonTemp = temparr; + + page.initGird(); + page.search(p); + }); + + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + }, + bindSelect: function () { + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetAcademicYearNoData', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); + //班级 + $('#ClassNo').lrselect({ + placeholder: "请选择班级", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/GetClassList', + value: 'ClassNo', + text: 'ClassName' + }); + }, + initGird: function () { + var headDatas = [ + { label: '学号', name: 'StuNo', width: 100, align: "left" }, + { label: '姓名', name: 'StuName', width: 100, align: "left" }, + { label: '总分', name: 'TotalScore', width: 100, align: "left" }, + ]; + //$("#gridtable")[0].dfop = undefined; + $('#gridtable').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/GetScoreListByClassNo', + headData: headDatas, + mainId: 'StuNo', + isPage: false, + sidx: 'TotalScore', + sord: 'desc', + isMultiselect: false + }); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + // 保存数据 + acceptClick = function (callBack) { + var box = $('.perFestivalsBox').find('div.box.active'); + if (box.length <= 0) { + learun.alert.warning("请选择学生!"); + return false; + } + if (box.length > 1) { + learun.alert.warning("只能选择一个学生!"); + return false; + } + var postData = JSON.parse(box.attr('data-val')); + if (!!callBack) { + callBack(postData); + return true; + } + }; + 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 2659777ae..da8705a18 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 @@ -995,6 +995,7 @@ + @@ -8105,6 +8106,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs index d0b957a95..e54ecf800 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs @@ -215,12 +215,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var dp = new DynamicParameters(new { }); if (!queryParam["keyword"].IsEmpty()) { - dp.Add("keyword", queryParam["keyword"].ToString(), DbType.String); - strSql.Append(" AND (t.StuNo = @keyword or t.StuName Like @keyword)"); + dp.Add("keyword", "%" + queryParam["keyword"].ToString() + "%", DbType.String); + strSql.Append(" AND (t.StuNo like @keyword or t.StuName Like @keyword)"); } if (!queryParam["ClassNo"].IsEmpty()) { - dp.Add("ClassNo", "" + queryParam["ClassNo"].ToString() + "", DbType.String); + dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); strSql.Append(" AND t.ClassNo=@ClassNo "); } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs index c41675b8e..c271c4320 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs @@ -720,6 +720,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public IEnumerable GetScoreListByClassNoForScholarship(string queryJson) + { + try + { + return stuScoreService.GetScoreListByClassNoForScholarship(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public IEnumerable GetScoreListByStuNo(string queryJson) { try diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreEntity.cs index 27febe949..d5f6eaac3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreEntity.cs @@ -384,6 +384,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration ///
[NotMapped] public string TempId { get; set; } + [NotMapped] + public string DepositBank { get; set; } + [NotMapped] + public string BankCode { get; set; } + [NotMapped] + public string IdCard { get; set; } /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs index 3cbb782eb..cdcb72e13 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs @@ -178,6 +178,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// IEnumerable GetScoreListByClassNo(string queryJson); + IEnumerable GetScoreListByClassNoForScholarship(string queryJson); /// /// 获取学生成绩 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs index 9a9f740ef..6e21f1564 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs @@ -1461,6 +1461,70 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad } } } + + + /// + /// 获取班级成绩列表(校级奖学金) + /// + /// + public IEnumerable GetScoreListByClassNoForScholarship(string queryJson) + { + try + { + //参考写法 + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + var tableName = "StuScore"; + if (!queryParam["TableName"].IsEmpty()) + { + tableName = queryParam["TableName"].ToString(); + } + var strSql = new StringBuilder(); + strSql.Append(" select bb.AcademicYearNo,bb.Semester,bb.LessonNo,bb.LessonName,bb.StuNo,bb.StuName,bb.DeptNo,bb.ClassNo,bb.IdentityCardNo as IdCard,bb.DepositBank,bb.BankCard as BankCode "); + strSql.Append(" ,case when bb.Score >=60 then bb.Score else (case when sp.Score>= 60 then sp.Score else (case when spt.Score>=60 then spt.Score else bb.Score end) end) end as Score "); + strSql.Append(" ,case when bb.Score >=60 then convert(nvarchar(50),bb.Score) else (case when sp.Score>= 60 then convert(nvarchar(50),sp.Score)+'(补)' else (case when spt.Score>=60 then convert(nvarchar(50),spt.Score)+'(重)' else convert(nvarchar(50),bb.Score) end) end) end as ScoreFormat "); + strSql.Append(" from ( "); + strSql.Append($" select s.AcademicYearNo,s.Semester,s.ClassNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,Max(s.Score) as Score,sb.DeptNo,sb.IdentityCardNo,sb.DepositBank,sb.BankCard from {tableName} s left join StuInfoBasic sb on s.StuNo=sb.StuNo "); + strSql.Append(" where 1=1 and s.LessonSortNo='1' and s.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus =1) "); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + strSql.Append(" and s.AcademicYearNo=@AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" and s.Semester=@Semester "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); + strSql.Append(" and s.ClassNo=@ClassNo "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" and s.StuNo=@StuNo "); + } + strSql.Append(" group by s.AcademicYearNo,s.Semester,s.ClassNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,sb.DeptNo,sb.ClassNo,sb.IdentityCardNo,sb.DepositBank,sb.BankCard ) as bb "); + strSql.Append(" left join StuScoreNotPass sp on bb.AcademicYearNo=sp.AcademicYearNo and bb.Semester=sp.Semester and bb.ClassNo=sp.ClassNo and bb.LessonNo=sp.LessonNo and bb.LessonName=sp.LessonName and bb.StuNo=sp.StuNo "); + strSql.Append(" left join StuScoreNotPassTwo spt on bb.AcademicYearNo=spt.AcademicYearNo and bb.Semester=spt.Semester and bb.ClassNo=spt.ClassNo and bb.LessonNo=spt.LessonNo and bb.LessonName=spt.LessonName and bb.StuNo=spt.StuNo "); + + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } /// /// 获取学生的补考信息 ///