-@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResultForTeacher.js")
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResultForTeacher.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResultForTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResultForTeacher.js
index a773bbc7e..6498b18c6 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResultForTeacher.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResultForTeacher.js
@@ -24,7 +24,7 @@ var bootstrap = function ($, learun) {
return;
}
page.search(queryJson);
- }, 300, 400);
+ }, 330, 500);
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
@@ -40,12 +40,58 @@ var bootstrap = function ($, learun) {
value: 'value',
text: 'text'
});
- $('#ElectiveSelectStatus').lrDataItemSelect({ code: 'ElectiveSelectStatus' });
- $('#ElectiveSignUpStatus').lrDataItemSelect({ code: 'ElectiveSignUpStatus' });
+ //数据集不选择线上课程信息,选择选课情况里的课程信息
+ $('#LessonNo').lrselect({
+ allowSearch: true,
+ url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/GetSelectLessonInfo',
+ value: "LessonNo",
+ text: "LessonName"
+ });
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' });
- $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
- $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
- $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
+ $('#DeptNo').lrDataSourceSelect({
+ code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) {
+ if (!!item) {
+ $('#MajorNo').lrselectRefresh({
+ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
+ param: { strWhere: "deptno='" + item.deptno + "' order by majorno " },
+ });
+ } else {
+ $('#MajorNo').lrselectRefresh({
+ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
+ param: { strWhere: "1=1 order by majorno " },
+ });
+ }
+ }
+ });
+ $('#MajorNo').lrselect({
+ allowSearch: true,
+ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
+ param: { strWhere: "1=1 order by majorno " },
+ value: "majorno",
+ text: "majorname",
+ select: function (item) {
+ if (!!item) {
+ $('#ClassNo').lrselectRefresh({
+ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
+ param: { strWhere: "majorno='" + item.majorno + "' order by classno " },
+ });
+ } else {
+ $('#ClassNo').lrselectRefresh({
+ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
+ param: { strWhere: "1=1 order by classno " },
+ });
+ }
+ }
+ });
+ $('#ClassNo').lrselect({
+ allowSearch: true,
+ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
+ param: { strWhere: "1=1 order by classno " },
+ value: "classno",
+ text: "classname"
+ });
+ $('#ElectiveSignUpStatus').lrDataItemSelect({ code: 'ElectiveSignUpStatus' });
+
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
@@ -54,12 +100,22 @@ var bootstrap = function ($, learun) {
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
- url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/GetQueryStuSelectResultList',
+ url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/GetQueryStuSelectResultList',
headData: [
- { label: "学年", name: "AcademicYearNo", width: 80, align: "left" },
- { label: "学期", name: "Semester", width: 60, align: "left" },
+ { label: "学年", name: "AcademicYearNo", width: 50, align: "left" },
+ { label: "学期", name: "Semester", width: 50, align: "left" },
+ { label: "学号", name: "StuNo", width: 120, align: "left" },
+ { label: "姓名", name: "StuName", width: 180, align: "left" },
+ { label: "课程编号", name: "LessonNo", width: 100, align: "left" },
+ {
+ label: "课程名称", name: "LessonName", width: 150, align: "left"
+ },
+ //{ label: "教师编号", name: "EmpNo", width: 100, align: "left" },
+ {
+ label: "建课教师", name: "EmpName", width: 100, align: "left"
+ },
{
- label: "校区", name: "F_SchoolId", width: 200, align: "left",
+ label: "建课学校", name: "F_SchoolId", width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company',
@@ -72,7 +128,7 @@ var bootstrap = function ($, learun) {
}
},
{
- label: "系所", name: "DeptNo", width: 100, align: "left",
+ 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',
@@ -110,24 +166,6 @@ var bootstrap = function ($, learun) {
});
}
},
- { label: "学号", name: "StuNo", 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: "Id", width: 100, align: "left",
- formatter: function (cellvalue, row) {
- if (cellvalue == null || cellvalue == undefined || cellvalue == "") {
- return '
未报名';
- } else {
- return '
已报名';
- }
- }
- },
{
label: "报名状态", name: "Status", width: 100, align: "left",
formatter: function (cellvalue, row) {
@@ -142,62 +180,7 @@ var bootstrap = function ($, learun) {
}
}
},
- { label: "所选课程号", name: "LessonNo", width: 100, align: "left" },
- {
- label: "所选课程名称", name: "LessonName", width: 150, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
- key: row.LessonNo,
- keyId: 'lessonno',
- callback: function (_data) {
- callback(_data['lessonname']);
- }
- });
- }
- },
- { label: "课程学分", name: "StudyScore", width: 100, align: "left" },
- { label: "教师编号", name: "EmpNo", width: 100, align: "left" },
- {
- label: "教师姓名", name: "EmpName", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
- key: row.EmpNo,
- keyId: 'empno',
- callback: function (_data) {
- callback(_data['empname']);
- }
- });
- }
- },
- {
- label: "上课节次", name: "LessonSection", width: 150, align: "left",
- formatter: function (cellvalue, row) {
- if (cellvalue != "" && cellvalue != undefined && cellvalue != null) {
- if (cellvalue.indexOf(',') == -1) {
- return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1) + "节";
- } else {
- return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1, 2) + "、" + cellvalue.slice(4) + "节";
- }
- }
- }
- },
- { label: "上课时间", name: "LessonTime", width: 180, align: "left" },
- {
- label: "教室名称", name: "ClassRoomName", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ClassRoomInfo',
- key: row.ClassRoomNo,
- keyId: 'classroomno',
- callback: function (_data) {
- callback(_data['classroomname']);
- }
- });
- }
- },
- { label: "备注", name: "Remark", width: 100, align: "left" },
+
],
mainId: 'StuId',
isPage: true,
From a1f1444bf37b7014bc2ace34b7b58dd5204eff6c Mon Sep 17 00:00:00 2001
From: dyy <807692433@qq.com>
Date: Mon, 12 Jun 2023 18:01:16 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?=
=?UTF-8?q?=E7=BA=BF=E4=B8=8A=E6=88=90=E7=BB=A9=E7=AE=A1=E7=90=86=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/StuScoreOnlineController.cs | 1244 +++++++++
.../StuScoreOnline/InputScoreIndex.cshtml | 122 +
.../Views/StuScoreOnline/InputScoreIndex.js | 553 ++++
.../Views/StuScoreOnline/Monitor.cshtml | 38 +
.../Views/StuScoreOnline/Monitor.js | 132 +
.../Learun.Application.Web.csproj | 5 +
.../StuScoreOnlineMap.cs | 29 +
.../Learun.Application.Mapping.csproj | 1 +
.../StuScoreOnline/StuScoreOnlineBLL.cs | 1146 ++++++++
.../StuScoreOnline/StuScoreOnlineEntity.cs | 452 +++
.../StuScoreOnline/StuScoreOnlineIBLL.cs | 261 ++
.../StuScoreOnline/StuScoreOnlineService.cs | 2468 +++++++++++++++++
.../Learun.Application.TwoDevelopment.csproj | 4 +
13 files changed, 6455 insertions(+)
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreOnlineController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOnline/InputScoreIndex.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOnline/InputScoreIndex.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOnline/Monitor.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOnline/Monitor.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuScoreOnlineMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOnline/StuScoreOnlineBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOnline/StuScoreOnlineEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOnline/StuScoreOnlineIBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOnline/StuScoreOnlineService.cs
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreOnlineController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreOnlineController.cs
new file mode 100644
index 000000000..9ad9d7fd8
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreOnlineController.cs
@@ -0,0 +1,1244 @@
+using Hangfire;
+using Learun.Application.Base.SystemModule;
+using Learun.Application.Organization;
+using Learun.Application.TwoDevelopment.EducationalAdministration;
+using Learun.Util;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Web.Mvc;
+
+namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
+{
+ ///
+ /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
+ /// Copyright (c) 2013-2018 北京泉江科技有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2019-06-14 11:02
+ /// 描 述:考试成绩同步
+ ///
+ public class StuScoreOnlineController : MvcControllerBase
+ {
+ private StuScoreOnlineIBLL stuScoreOnlineIBLL = new StuScoreOnlineBLL();
+ //暂时注释
+ //private StuScoreOnlineNotPassIBLL stuScoreOnlineNotPassIBLL = new StuScoreOnlineNotPassBLL();
+ //private StuScoreOnlineNotPassTwoIBLL stuScoreOnlineNotPassTwoIBLL = new StuScoreOnlineNotPassTwoBLL();
+ private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
+ private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
+ private CdMajorIBLL cdMajorIBLL = new CdMajorBLL();
+ private UserIBLL userIBLL = new UserBLL();
+ private EADateArrangeIBLL eADateArrangeIBLL = new EADateArrangeBLL();
+ private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL();
+
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ [HttpGet]
+ public ActionResult Monitor()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ ///
+ /// 主页面【班级学生成绩初始化】
+ ///
+ ///
+ [HttpGet]
+ public ActionResult ClassIndex()
+ {
+ return View();
+ }
+ ///
+ /// 班级成绩查看页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult ScoreQueryIndex()
+ {
+ return View();
+ }
+ ///
+ /// 毕业证资格审核
+ ///
+ ///
+ [HttpGet]
+ public ActionResult ScoreQueryAllIndex()
+ {
+ return View();
+ }
+ ///
+ /// 个人成绩查看
+ ///
+ ///
+ [HttpGet]
+ public ActionResult StuScoreOnlineQueryIndex()
+ {
+ var logininfo = LoginUserInfo.Get();
+ ViewBag.StuNo = logininfo.account;
+ return View();
+ }
+ ///
+ /// 毕业证资格审核(班主任)
+ ///
+ ///
+ [HttpGet]
+ public ActionResult ScoreQueryAllIndexTeacher()
+ {
+ return View();
+ }
+ ///
+ /// 全院班级成绩查看页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult AllScoreQueryIndex()
+ {
+ return View();
+ }
+ ///
+ /// 新版成绩录入
+ ///
+ ///
+ [HttpGet]
+ public ActionResult InputScoreIndex()
+ {
+ //获取“教学工作安排”中“线上成绩录入”的记录
+ var entity = eADateArrangeIBLL.GetEADateArrangeEntityByName("线上成绩录入");
+ if (entity != null && entity.CheckMark == "1" && DateTime.Now > entity.MakeDate && DateTime.Now < entity.EndDate)
+ {
+ ViewBag.CanInputFlag = true;//可以录入成绩标识
+ }
+ else
+ {
+ ViewBag.CanInputFlag = false;
+ }
+
+ return View();
+ }
+ ///
+ /// 新版成绩录入
+ ///
+ ///
+ [HttpGet]
+ public ActionResult InputScoreIndexInTeacher()
+ {
+ //获取“教学工作安排”中“线上成绩录入”的记录
+ var entity = eADateArrangeIBLL.GetEADateArrangeEntityByName("线上成绩录入");
+ if (entity != null && entity.CheckMark == "1" && DateTime.Now > entity.MakeDate && DateTime.Now < entity.EndDate)
+ {
+ ViewBag.CanInputFlag = true;//可以录入成绩标识
+ }
+ else
+ {
+ ViewBag.CanInputFlag = false;
+ }
+
+ return View();
+ }
+
+ ///
+ /// 成绩统计分析
+ ///
+ ///
+ [HttpGet]
+ public ActionResult ScoreStatisticAnalysis()
+ {
+ return View();
+ }
+
+ ///
+ /// 毕业学生成绩查看页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult GraduateScoreQueryAllIndex()
+ {
+ return View();
+ }
+
+
+
+ ///
+ /// 学生成绩录入可去审核页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult ScoreInputCancelIndex()
+ {
+ return View();
+ }
+ ///
+ /// 学生成绩录入可去审核页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult ScoreInputCancelForm()
+ {
+ return View();
+ }
+ ///
+ /// 全院学生成绩查看页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult AllStuScoreOnlineQueryIndex()
+ {
+ return View();
+ }
+ ///
+ /// 全院学生成绩打印
+ ///
+ ///
+ [HttpGet]
+ public ActionResult AllStuScoreOnlineQueryPrint()
+ {
+ ViewBag.WebApi = ConfigurationManager.AppSettings["WebApi"];
+ return View();
+ }
+
+
+ ///
+ /// 成绩录入导入
+ ///
+ ///
+ [HttpGet]
+ public ActionResult InputScoreIndexInTeacherImport()
+ {
+ return View();
+ }
+
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取列表数据
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetList(string queryJson)
+ {
+ var data = stuScoreOnlineIBLL.GetList(queryJson).OrderBy(a => a.StuNo);
+ return Success(data);
+ }
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetMonitorList(string queryJson)
+ {
+ var data = stuScoreOnlineIBLL.GetMonitorList(queryJson);
+ return Success(data);
+ }
+ ///
+ /// 获取列表分页数据
+ /// 分页参数
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = stuScoreOnlineIBLL.GetPageList(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ /// 主键
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormData(string keyValue)
+ {
+ var data = stuScoreOnlineIBLL.GetEntity(keyValue);
+ return Success(data);
+ }
+ ///
+ /// 获取列表分页数据
+ /// 分页参数
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetScoreInputCancelPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+
+ var aa = JsonConvert.DeserializeObject(queryJson);
+
+ var data = new List();
+ if (!string.IsNullOrEmpty(aa.AcademicYearNo) || !string.IsNullOrEmpty(aa.Semester) || !string.IsNullOrEmpty(aa.EmpNo) || !string.IsNullOrEmpty(aa.LessonNo) || !string.IsNullOrEmpty(aa.ClassNo) || !string.IsNullOrEmpty(aa.StuNo))
+ {
+ data = stuScoreOnlineIBLL.GetScoreInputCancelPageList(paginationobj, queryJson).ToList();
+ }
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ /// 主键
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetScoreInputCancelFormData(string keyValue)
+ {
+ var data = stuScoreOnlineIBLL.GetEntity(keyValue);
+ var StuSelectLessonListData = stuScoreOnlineIBLL.GetStuSelectLessonListEntity(data);
+ var jsonData = new
+ {
+ StuScoreOnline = data,
+ StuSelectLessonList = StuSelectLessonListData
+ };
+ return Success(jsonData);
+ }
+
+ ///
+ /// 获取列表数据
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetEntityByJson(string queryJson)
+ {
+ var data = stuScoreOnlineIBLL.GetEntityByJson(queryJson);
+ return Success(data);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ /// 主键
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ stuScoreOnlineIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult Submit(string AcademicYearNo, string Semester, string LessonNo, string EmpNo, string EditUserId)
+ {
+ stuScoreOnlineIBLL.SubmitStuScoreOnline(AcademicYearNo, Semester, LessonNo, EmpNo);
+ var userEntity = userIBLL.GetEntityByAccount(EditUserId);
+ if (userEntity != null)
+ {
+ var name = userEntity.F_Account + "_" + userEntity.F_RealName + "_线上成绩录入";
+
+ //删除任务
+ RecurringJob.RemoveIfExists(name);
+ }
+ return Success("操作成功!");
+ }
+
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteList()
+ {
+ stuScoreOnlineIBLL.DeleteList();
+ return Success("清空成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ /// 主键
+ ///
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, StuScoreOnlineEntity entity)
+ {
+ stuScoreOnlineIBLL.SaveEntity(keyValue, entity);
+ return Success("保存成功!");
+ }
+ #endregion
+
+ #region 扩展数据
+
+ ///
+ /// 获取班级成绩初始化分页数据
+ /// 分页参数
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageListAboutClass(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = stuScoreOnlineIBLL.GetPageListAboutClass(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+
+ ///
+ /// 班级学生成绩录入初始化
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DoInitAboutClass(string academicYearNo, string semester, string classNo)
+ {
+ stuScoreOnlineIBLL.DoInitAboutClass(academicYearNo, semester, classNo);
+ return Success("初始化成功!");
+ }
+
+ ///
+ /// 学年下拉框信息【班级成绩查看】
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetAcademicYearNoData()
+ {
+ var data = stuScoreOnlineIBLL.GetAcademicYearNoData();
+
+ return Success(data);
+ }
+ ///
+ /// 学期下拉框信息【班级成绩查看】
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetSemesterData()
+ {
+ var data = WebHelper.GenerateNearBySemeter();
+
+ return Success(data);
+ }
+
+ ///
+ /// 学期下拉框信息【班级成绩查看】
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetSemesterDataTwo()
+ {
+ var data = WebHelper.GenerateNearBySemeterTwo();
+
+ return Success(data);
+ }
+ ///
+ /// 班级下拉框信息【成绩录入新页面】
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetClassNoDataOfAll(string lessonNo)
+ {
+ var data = stuScoreOnlineIBLL.GetClassNoData("", "", lessonNo);
+
+ return Success(data);
+ }
+ ///
+ /// 班级下拉框信息【班级成绩查看】
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetClassNoData(string lessonNo)
+ {
+ var loginInfo = LoginUserInfo.Get();
+ var data = stuScoreOnlineIBLL.GetClassNoData(loginInfo.account, loginInfo.Description, lessonNo);
+
+ return Success(data);
+ }
+
+ ///
+ /// 班级下拉框信息【成绩录入】
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetClassNoDataForInput(string lessonNo, string AcademicYearShort, string Semester)
+ {
+ var loginInfo = LoginUserInfo.Get();
+ // var semesterAndYear = Common.GetSemesterAndYear();
+ var data = stuScoreOnlineIBLL.GetClassNoDataForInput(loginInfo.account, loginInfo.Description, lessonNo, AcademicYearShort, Semester);
+
+ return Success(data);
+ }
+ ///
+ /// 班级下拉框信息【全院班级成绩查看】
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetAllClassNoData()
+ {
+ var data = stuScoreOnlineIBLL.GetClassNoData("", "", "");
+
+ return Success(data);
+ }
+ ///
+ /// 教师下拉框信息
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetEmpNoDataOfAll(string lessonNo)
+ {
+ var data = stuScoreOnlineIBLL.GetEmpNoData("", "", lessonNo);
+
+ return Success(data);
+ }
+ ///
+ /// 教师下拉框信息【学生成绩录入可去审核】
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetEmpNoData(string lessonNo)
+ {
+ var loginInfo = LoginUserInfo.Get();
+ var data = stuScoreOnlineIBLL.GetEmpNoData(loginInfo.account, loginInfo.Description, lessonNo);
+
+ return Success(data);
+ }
+ ///
+ /// 课程下拉框信息【学生成绩录入可去审核】
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetLessonNoDataOfAll()
+ {
+ var loginInfo = LoginUserInfo.Get();
+ var data = stuScoreOnlineIBLL.GetLessonNoDataOfAll(loginInfo.account, loginInfo.Description);
+
+ return Success(data);
+ }
+ ///
+ /// 课程下拉框 带编号
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetLessonNoDataOfAllWithNo()
+ {
+ var data = stuScoreOnlineIBLL.GetLessonNoDataOfAll("", "");
+ foreach (var item in data)
+ {
+ item.text = string.Format("{0}({1})", item.text, item.value);
+ }
+
+ return Success(data);
+ }
+ ///
+ /// 课程下拉框 带编号
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetLessonNoDataWithNo(string AcademicYearShort, string Semester)
+ {
+ var loginInfo = LoginUserInfo.Get();
+ //var semesterAndYear = Common.GetSemesterAndYear();
+ var data = stuScoreOnlineIBLL.GetLessonNoDataOfAll(loginInfo.account, loginInfo.Description, AcademicYearShort, Semester);
+ foreach (var item in data)
+ {
+ item.text = string.Format("{0}({1})", item.text, item.value);
+ }
+
+ return Success(data);
+ }
+ ///
+ /// 选修课程下拉框 带编号【选修课】
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetElectiveLessonNoDataOfAllWithNo()
+ {
+ var data = stuScoreOnlineIBLL.GetElectiveLessonNoDataOfAll("", "");
+ foreach (var item in data)
+ {
+ item.text = string.Format("{0}({1})", item.text, item.value);
+ }
+
+ return Success(data);
+ }
+ ///
+ /// 选修课程下拉框 带编号【选修课】
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetElectiveLessonNoDataWithNo(string AcademicYearShort, string Semester)
+ {
+ var loginInfo = LoginUserInfo.Get();
+ //var semesterAndYear = Common.GetSemesterAndYear();
+ var data = stuScoreOnlineIBLL.GetElectiveLessonNoDataOfAll(loginInfo.account, loginInfo.Description, AcademicYearShort, Semester);
+ foreach (var item in data)
+ {
+ item.text = string.Format("{0}({1})", item.text, item.value);
+ }
+
+ return Success(data);
+ }
+
+ ///
+ /// 教室下拉框信息【选修课】
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetElectiveClassRoomNoDataOfAll(string lessonNo)
+ {
+ var data = stuScoreOnlineIBLL.GetElectiveClassRoomNoData("", "", lessonNo);
+
+ return Success(data);
+ }
+ ///
+ /// 教室下拉框信息【选修课】
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetElectiveClassRoomNoData(string lessonNo)
+ {
+ var loginInfo = LoginUserInfo.Get();
+ var data = stuScoreOnlineIBLL.GetElectiveClassRoomNoData(loginInfo.account, loginInfo.Description, lessonNo);
+
+ return Success(data);
+ }
+
+ ///
+ /// 节次下拉框信息【选修课】
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetElectiveLessonSectionDataOfAll(string classRoomNo)
+ {
+ var data = stuScoreOnlineIBLL.GetElectiveLessonSectionData("", "", classRoomNo);
+
+ return Success(data);
+ }
+ ///
+ /// 节次下拉框信息【选修课】
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetElectiveLessonSectionData(string classRoomNo)
+ {
+ var loginInfo = LoginUserInfo.Get();
+ var data = stuScoreOnlineIBLL.GetElectiveLessonSectionData(loginInfo.account, loginInfo.Description, classRoomNo);
+
+ return Success(data);
+ }
+
+ ///
+ /// 课程信息【班级成绩查看】
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetLessonNoData(string academicYearNo, string semester, string classNo)
+ {
+ var data = stuScoreOnlineIBLL.GetLessonNoData(academicYearNo, semester, classNo).OrderBy(x => x.value);
+
+ return Success(data);
+ }
+
+ ///
+ /// 根据StuNo查询班级课程
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetLessonNoDataFromStuNo(string academicYearNo, string semester, string StuNo)
+ {
+ var data = stuScoreOnlineIBLL.GetLessonNoDataFromStuNo(academicYearNo, semester, StuNo).OrderBy(x => x.value);
+
+ return Success(data);
+ }
+
+ ///
+ /// 获取班级成绩列表
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetScoreListByClassNo(string queryJson)
+ {
+ var data = stuScoreOnlineIBLL.GetScoreListByClassNo(queryJson);
+ var stuData = stuInfoBasicIBLL.GetAllList();
+
+ var aa = data.GroupBy(x => new { x.StuNo, x.StuName, x.StuId }).Select(x => new
+ {
+ StuId = x.Key.StuId,
+ StuNo = x.Key.StuNo,
+ StuName = x.Key.StuName,
+ FinishSchoolMark = stuData.FirstOrDefault(a => a.StuNo == x.Key.StuNo)?.FinishSchoolMark,
+ TotalScore = x.Select(y => y.Score).Sum(),
+ LessonInfo = x.Select(y => new { y.LessonNo, y.LessonName, y.Score, y.ScoreFormat }).OrderBy(y => y.LessonNo)
+ }).OrderByDescending(x => x.TotalScore);
+
+ var result = new List>();
+ foreach (var item in aa)
+ {
+ var aaa = new Dictionary();
+ aaa.Add("StuId", item.StuId);
+ aaa.Add("StuNo", item.StuNo);
+ aaa.Add("StuName", item.StuName);
+ aaa.Add("FinishSchoolMark", item.FinishSchoolMark);
+ aaa.Add("TotalScore", item.TotalScore.ToString());
+ foreach (var lessonInfoItem in item.LessonInfo)
+ {
+ aaa.Add(lessonInfoItem.LessonNo, lessonInfoItem.ScoreFormat);
+ }
+
+ result.Add(aaa);
+ }
+
+ return Success(result);
+ }
+
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetScoreListByStuNo(string queryJson)
+ {
+ var data = stuScoreOnlineIBLL.GetScoreListByStuNo(queryJson);
+ var stuData = stuInfoBasicIBLL.GetAllList();
+
+ var aa = data.GroupBy(x => new { x.StuNo, x.StuName, x.StuId }).Select(x => new
+ {
+ StuId = x.Key.StuId,
+ StuNo = x.Key.StuNo,
+ StuName = x.Key.StuName,
+ FinishSchoolMark = stuData.FirstOrDefault(a => a.StuNo == x.Key.StuNo)?.FinishSchoolMark,
+ TotalScore = x.Where(m => m.LessonSortNo == "1").Select(y => y.Score).Sum(),
+ LessonInfo = x.Select(y => new { y.LessonNo, y.LessonName, y.Score, y.ScoreFormat }).OrderBy(y => y.LessonNo)
+ }).OrderByDescending(x => x.TotalScore);
+
+ var result = new List>();
+ foreach (var item in aa)
+ {
+ var aaa = new Dictionary();
+ aaa.Add("StuId", item.StuId);
+ aaa.Add("StuNo", item.StuNo);
+ aaa.Add("StuName", item.StuName);
+ aaa.Add("FinishSchoolMark", item.FinishSchoolMark);
+ aaa.Add("TotalScore", item.TotalScore.ToString());
+ foreach (var lessonInfoItem in item.LessonInfo)
+ {
+ aaa.Add(lessonInfoItem.LessonNo, lessonInfoItem.ScoreFormat);
+ }
+
+ result.Add(aaa);
+ }
+
+ return Success(result);
+ }
+
+ ///
+ /// 全院学生成绩查看
+ ///
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetScoreListByStuInfo(string queryJson)
+ {
+ var data = stuScoreOnlineIBLL.GetScoreListByStuInfo(queryJson);
+ if (data.Any())
+ {
+ data = data.OrderByDescending(x => x.AcademicYearNo).ThenByDescending(x => x.Semester).ThenBy(x => x.LessonSortNo).ThenBy(x => x.LessonNo);
+ }
+
+ return Success(data);
+ }
+
+ public ActionResult GetScoreCharts(string AcademicYearNo, string Semester, string ClassNo, string LessonNo)
+ {
+ var data = stuScoreOnlineIBLL.GetScoreCharts(AcademicYearNo, Semester, ClassNo, LessonNo);
+ return Success(data);
+ }
+
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetScoreInfo(string queryJson)
+ {
+ var data = stuScoreOnlineIBLL.GetScoreInfo(queryJson);
+ return JsonResult(data);
+ }
+
+ ///
+ /// 导出班级成绩列表
+ ///
+ ///
+ //[HttpGet]
+ //[AjaxOnly]
+ [HttpPost, ValidateInput(false)]
+ public ActionResult ExportScoreListByClassNo(string queryJson)
+ {
+ var queryModel = JsonConvert.DeserializeObject(queryJson);
+ var className = string.Empty;
+ if (!string.IsNullOrEmpty(queryModel.ClassNo))
+ {
+ var classInfoEntity = classInfoIBLL.GetClassInfoEntityByClassNo(queryModel.ClassNo);
+ className = classInfoEntity != null ? classInfoEntity.ClassName : string.Empty;
+ }
+
+ var data = stuScoreOnlineIBLL.GetScoreListByClassNo(queryJson);
+ var aa = data.GroupBy(x => new { x.StuNo, x.StuName }).Select(x => new
+ {
+ StuNo = x.Key.StuNo,
+ StuName = x.Key.StuName,
+ TotalScore = x.Select(y => y.Score).Sum(),
+ LessonInfo = x.Select(y => new { y.LessonNo, y.LessonName, y.Score, y.ScoreFormat }).OrderBy(y => y.LessonNo)
+ }).OrderByDescending(x => x.TotalScore);
+ var result = new List>();
+ foreach (var item in aa)
+ {
+ var aaa = new Dictionary();
+ aaa.Add("StuNo", item.StuNo);
+ aaa.Add("StuName", item.StuName);
+ aaa.Add("TotalScore", item.TotalScore.ToString());
+ foreach (var lessonInfoItem in item.LessonInfo)
+ {
+ aaa.Add(lessonInfoItem.LessonNo, lessonInfoItem.ScoreFormat);
+ }
+
+ result.Add(aaa);
+ }
+ var resultStr = JsonConvert.SerializeObject(result);
+
+ //班级成绩源
+ var exportTable = resultStr.ToTable();
+ //设置导出格式
+ ExcelConfig excelconfig = new ExcelConfig();
+ excelconfig.Title = className + " 班级成绩列表";
+ excelconfig.TitleFont = "微软雅黑";
+ excelconfig.TitlePoint = 20;
+ excelconfig.FileName = className + " 班级成绩导出.xls";
+ excelconfig.IsAllSizeColumn = true;
+ //每一列的设置,没有设置的列信息,系统将按datatable中的列名导出
+ excelconfig.ColumnEntity = new List();
+ excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "StuNo", ExcelColumn = "学号" });
+ excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "StuName", ExcelColumn = "姓名" });
+ excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "TotalScore", ExcelColumn = "总分" });
+
+ //课程动态列
+ var lessonTemp = stuScoreOnlineIBLL.GetLessonNoData(queryModel.AcademicYearNo, queryModel.Semester, queryModel.ClassNo).OrderBy(x => x.value);
+ foreach (var lessonTempItem in lessonTemp)
+ {
+ excelconfig.ColumnEntity.Add(new ColumnModel() { Column = lessonTempItem.value, ExcelColumn = lessonTempItem.text });
+ }
+
+ //调用导出方法
+ ExcelHelper.ExcelDownload(exportTable, excelconfig);
+
+ return Success("导出成功!");
+ }
+ ///
+ /// 查询条件模型【班级成绩查看】
+ ///
+ public class QueryModel
+ {
+ public string AcademicYearNo { get; set; }
+ public string Semester { get; set; }
+ public string ClassNo { get; set; }
+ }
+
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetStuGraduateInfo(string queryJson)
+ {
+ var data = stuScoreOnlineIBLL.GetStuGraduateInfo(queryJson);
+ return JsonResult(data);
+ }
+
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPassInfo(string queryJson)
+ {
+ var data = stuScoreOnlineIBLL.GetPassInfo(queryJson);
+ return JsonResult(data);
+ }
+
+
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetClassOfMy()
+ {
+ var data = stuScoreOnlineIBLL.GetClassOfMy();
+ return JsonResult(data);
+ }
+
+
+
+ ///
+ /// 获取打印成绩单数据
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetScoreListByStuNoList(string stuNoList)
+ {
+ var dataList = new List