Bläddra i källkod

【增加】教务:选修二次补考成绩录入;

新疆体育高职分支
dyy 1 år sedan
förälder
incheckning
a17948c239
9 ändrade filer med 1114 tillägg och 42 borttagningar
  1. +144
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassTwoController.cs
  2. +9
    -9
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexOfElective.js
  3. +9
    -9
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexOfElectiveInTeacher.js
  4. +118
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexOfElective.cshtml
  5. +533
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexOfElective.js
  6. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  7. +69
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoBLL.cs
  8. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoIBLL.cs
  9. +212
    -22
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoService.cs

+ 144
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassTwoController.cs Visa fil

@@ -113,7 +113,47 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
return View();
}
/// <summary>
/// 全院学生二次补考成绩录入(新)【选修课】
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult InputScoreIndexOfElective()
{
//获取“教学工作安排”中“选修重考成绩录入”的记录
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();
}
/// <summary>
/// 全院学生二次补考成绩录入(新)【选修课】
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult InputScoreIndexOfElectiveInTeacher()
{
//获取“教学工作安排”中“选修重考成绩录入”的记录
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();
}

/// <summary>
/// 二次补考成绩查看
/// </summary>
@@ -370,6 +410,91 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers

return Success(data);
}
/// <summary>
/// 选修课程下拉框 带编号【选修课】
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetElectiveLessonNoDataOfAllWithNo()
{
var data = stuScoreNotPassTwoIBLL.GetElectiveLessonNoDataOfAll("", "");
foreach (var item in data)
{
item.text = string.Format("{0}({1})", item.text, item.value);
}

return Success(data);
}
/// <summary>
/// 选修课程下拉框 带编号【选修课】
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetElectiveLessonNoDataWithNo(string AcademicYearShort, string Semester)
{
var loginInfo = LoginUserInfo.Get();
var data = stuScoreNotPassTwoIBLL.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);
}

/// <summary>
/// 教室下拉框信息【选修课】
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetElectiveClassRoomNoDataOfAll(string lessonNo)
{
var data = stuScoreNotPassTwoIBLL.GetElectiveClassRoomNoData("", "", lessonNo);

return Success(data);
}
/// <summary>
/// 教室下拉框信息【选修课】
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetElectiveClassRoomNoData(string lessonNo)
{
var loginInfo = LoginUserInfo.Get();
var data = stuScoreNotPassTwoIBLL.GetElectiveClassRoomNoData(loginInfo.account, loginInfo.Description, lessonNo);

return Success(data);
}

/// <summary>
/// 节次下拉框信息【选修课】
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetElectiveLessonSectionDataOfAll(string classRoomNo)
{
var data = stuScoreNotPassTwoIBLL.GetElectiveLessonSectionData("", "", classRoomNo);

return Success(data);
}
/// <summary>
/// 节次下拉框信息【选修课】
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetElectiveLessonSectionData(string classRoomNo)
{
var loginInfo = LoginUserInfo.Get();
var data = stuScoreNotPassTwoIBLL.GetElectiveLessonSectionData(loginInfo.account, loginInfo.Description, classRoomNo);

return Success(data);
}

/// <summary>
/// 开始录入:占用成绩
@@ -381,6 +506,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
var loginInfo = LoginUserInfo.Get();
var name = loginInfo.account + "_" + loginInfo.realName + "_二次补考成绩录入";
//判断选修课
var queryParam = queryJson.ToJObject();
if (queryParam["ClassNo"].IsEmpty())
{
name = loginInfo.account + "_" + loginInfo.realName + "_选修二次补考成绩录入";
}
stuScoreNotPassTwoIBLL.StartInputScore(queryJson);
//添加任务
var newDate = DateTime.Now.AddMinutes(30);
@@ -400,6 +531,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
var loginInfo = LoginUserInfo.Get();
var name = loginInfo.account + "_" + loginInfo.realName + "_二次补考成绩录入";
//判断选修课
var queryParam = queryJson.ToJObject();
if (queryParam["ClassNo"].IsEmpty())
{
name = loginInfo.account + "_" + loginInfo.realName + "_选修二次补考成绩录入";
}
//更新任务
var newDate = DateTime.Now.AddMinutes(minutes);
RecurringJob.AddOrUpdate(name,
@@ -433,7 +570,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
var loginInfo = LoginUserInfo.Get();
var name = loginInfo.account + "_" + loginInfo.realName + "_二次补考成绩录入";

//判断选修课
var queryParam = queryJson.ToJObject();
if (queryParam["ClassNo"].IsEmpty())
{
name = loginInfo.account + "_" + loginInfo.realName + "_选修二次补考成绩录入";
}
stuScoreNotPassTwoIBLL.SaveInputScoreStatus(queryJson);
//删除任务
RecurringJob.RemoveIfExists(name);


+ 9
- 9
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexOfElective.js Visa fil

@@ -27,15 +27,15 @@ var bootstrap = function ($, learun) {
}
},
{ label: '学号', name: 'StuNo', width: 100, align: "left" },
{ label: '姓名', name: 'StuName', width: 100, align: "left" },
{ label: '姓名', name: 'StuName', width: 150, align: "left" },
{
label: "性别", name: "GenderNo", width: 60, align: "left",
label: "性别", name: "GenderNo", width: 35, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "男" : "女";
}
},
{
label: "学习形式", name: "StudyModality", width: 55, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
label: "学习形式", name: "StudyModality", width: 75, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'StudyModality',
@@ -84,7 +84,7 @@ var bootstrap = function ($, learun) {
}
},
{
label: "专业", name: "MajorNo", width: 100, align: "left",
label: "专业", name: "MajorNo", width: 120, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
@@ -96,9 +96,9 @@ var bootstrap = function ($, learun) {
});
}
},
{ label: "年级", name: "Grade", width: 100, align: "left" },
{ label: '学年', name: 'AcademicYearNo', width: 100, align: "left" },
{ label: '学期', name: 'Semester', width: 80, align: "left" },
{ label: "年级", name: "Grade", width: 35, align: "left" },
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" },
{ label: '学期', name: 'Semester', width: 35, align: "left" },
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" },
//{
// label: '课程名称', name: 'LessonNo', width: 150, align: "left",
@@ -114,7 +114,7 @@ var bootstrap = function ($, learun) {
// }
//},
{
label: '教室名称', name: 'ClassRoomNo', width: 150, align: "left",
label: '教室名称', name: 'ClassRoomNo', width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ClassRoomInfo',
@@ -126,7 +126,7 @@ var bootstrap = function ($, learun) {
});
}
},
{ label: '节次', name: 'LessonSection', width: 150, align: "left" },
{ label: '节次', name: 'LessonSection', width: 60, align: "left" },
];
headDataEdit = [
{


+ 9
- 9
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexOfElectiveInTeacher.js Visa fil

@@ -27,15 +27,15 @@ var bootstrap = function ($, learun) {
}
},
{ label: '学号', name: 'StuNo', width: 100, align: "left" },
{ label: '姓名', name: 'StuName', width: 100, align: "left" },
{ label: '姓名', name: 'StuName', width: 150, align: "left" },
{
label: "性别", name: "GenderNo", width: 60, align: "left",
label: "性别", name: "GenderNo", width: 35, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "男" : "女";
}
},
{
label: "学习形式", name: "StudyModality", width: 55, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
label: "学习形式", name: "StudyModality", width: 75, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'StudyModality',
@@ -84,7 +84,7 @@ var bootstrap = function ($, learun) {
}
},
{
label: "专业", name: "MajorNo", width: 100, align: "left",
label: "专业", name: "MajorNo", width: 120, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
@@ -96,9 +96,9 @@ var bootstrap = function ($, learun) {
});
}
},
{ label: "年级", name: "Grade", width: 100, align: "left" },
{ label: '学年', name: 'AcademicYearNo', width: 100, align: "left" },
{ label: '学期', name: 'Semester', width: 80, align: "left" },
{ label: "年级", name: "Grade", width: 35, align: "left" },
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" },
{ label: '学期', name: 'Semester', width: 35, align: "left" },
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" },
//{
// label: '课程名称', name: 'LessonNo', width: 150, align: "left",
@@ -114,7 +114,7 @@ var bootstrap = function ($, learun) {
// }
//},
{
label: '教室名称', name: 'ClassRoomNo', width: 150, align: "left",
label: '教室名称', name: 'ClassRoomNo', width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ClassRoomInfo',
@@ -126,7 +126,7 @@ var bootstrap = function ($, learun) {
});
}
},
{ label: '节次', name: 'LessonSection', width: 150, align: "left" },
{ label: '节次', name: 'LessonSection', width: 60, align: "left" },
];
headDataEdit = [
{


+ 118
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexOfElective.cshtml Visa fil

@@ -0,0 +1,118 @@
@{ ViewBag.Title = "全院学生选修二次补考成绩录入(新)"; Layout = "~/Views/Shared/_Index.cshtml"; }
<style>
.lr-select {
width: 150px;
}

#LessonNo {
width: 180px;
}

.lr-selectLittle {
width: 80px;
}

.lr-layout-tool {
height: 80px;
}

.lr-layout-center .lr-layout-wrap.lr-layout-wrap-notitle {
padding-top: 80px;
}

.divRow {
position: absolute;
width: 100%;
height: 55px;
top: 0;
left: 0;
}

.scaleRow {
top: 55px;
padding: 2px 10px;
height: 25px;
}

.scaleRow .timeBox {
float: right;
padding-right: 30px;
}
.scaleRow .tipBox{
display:inline-block;
color:#ff0000;
margin-left:10px;
}

#addMinutesBtn {
display: inline-block;
cursor: pointer;
background-color: blue;
color: #fff;
padding: 1px 5px;
border-radius: 4px;
}
</style>
<div class="lr-layout">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="selectRow divRow">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="F_SchoolId" type="lrselect" class="lr-select"></div>
</div>
<div class="lr-layout-tool-item">
<div id="AcademicYearNo" type="lrselect" class="lr-select lr-selectLittle"></div>
</div>
<div class="lr-layout-tool-item">
<div id="Semester" type="lrselect" class="lr-select lr-selectLittle"></div>
</div>
<div class="lr-layout-tool-item">
<div id="LessonNo" type="lrselect" class="lr-select"></div>
</div>
<div class="lr-layout-tool-item">
<div id="ClassRoomNo" type="lrselect" class="lr-select"></div>
</div>
<div class="lr-layout-tool-item">
<div id="LessonSection" type="lrselect" class="lr-select"></div>
</div>

<div class="lr-layout-tool-item">
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>&nbsp;查询</a>
</div>
</div>
<div class="lr-layout-tool-right">
<div class="btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_input" class="btn btn-default"><i class="fa fa-edit">&nbsp;开始录入</i></a>
<a id="lr_save" class="btn btn-default" style="display:none;"><i class="fa fa-edit">&nbsp;提交成绩</i></a>
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock">&nbsp;提交教务处</i></a>
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock">&nbsp;去审核成绩</i></a>
</div>
</div>

</div>
<div class="scaleRow divRow">
<div class="tipBox">提示:录入完成后,请务必点击“提交成绩”按钮,避免成绩丢失!</div>
<div class="timeBox" style="display:none;">
倒计时:
<span id="minutes" data-minutes="30"></span>分钟(<span id="seconds" data-seconds="60"></span>秒)
<div id="addMinutesBtn" data-minutes="30">续时</div>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexOfElective.js")
<script>
var CanInputFlag = "@ViewBag.CanInputFlag";
if (CanInputFlag != "True") {
top.learun.layerConfirm('当前时间不是选修重考成绩录入时间!', function (res) {});
}
</script>

+ 533
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexOfElective.js Visa fil

@@ -0,0 +1,533 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-06-14 11:02
* 描 述:全院学生选修二次补考成绩录入(新)
*/
var selectedRow;
var refreshGirdData;
var refreshGirdData2;
var judgeSelect; //判断下拉框是否选择
var modifyDate; //成绩被占用,且是登录用户时,成绩表中的编辑时间;
var timer; //计时器
var submitScoreTimer; //五分钟提交成绩计时器
var headData; //常规列头
var headDataEdit; //可编辑列头
var headDataNoEdit; //不可编辑列头
var headDataFinally; //最终列头
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
headData = [
{
label: "审核状态", name: "CheckMark", width: 80, align: "center",
formatter: function (cellvalue) {
return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>";
}
},
{ label: '学号', name: 'StuNo', width: 100, align: "left" },
{ label: '姓名', name: 'StuName', width: 150, align: "left" },
{
label: "性别", name: "GenderNo", width: 35, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "男" : "女";
}
},
{
label: "学习形式", name: "StudyModality", width: 75, 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: "MoveType", width: 55, 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: "F_SchoolId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company',
key: value,
keyId: 'f_companyid',
callback: function (_data) {
callback(_data['f_fullname']);
}
});
}
},
{
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: 120, 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: "Grade", width: 35, align: "left" },
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" },
{ label: '学期', name: 'Semester', width: 35, align: "left" },
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" },
//{
// label: '课程名称', name: 'LessonNo', width: 150, align: "left",
// formatterAsync: function (callback, value, row, op, $cell) {
// learun.clientdata.getAsync('custmerData', {
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
// key: value,
// keyId: 'lessonno',
// callback: function (_data) {
// callback(_data['lessonname']);
// }
// });
// }
//},
{
label: '教室名称', name: 'ClassRoomNo', width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ClassRoomInfo',
key: value,
keyId: 'classroomno',
callback: function (_data) {
callback(_data['classroomname']);
}
});
}
},
{ label: '节次', name: 'LessonSection', width: 60, align: "left" },
];
headDataEdit = [
{
label: '补考成绩', name: 'TermEndScore', width: 80, align: "left",
edit: {
type: 'input',
inputType: 'number',
change: function (row, rownum) {
row.Score = (parseFloat(row.TermEndScore || '0') * 1) >= 60 ? 60 : (parseFloat(row.TermEndScore || '0') * 1).toFixed(0);
$('#gridtable').jfGridSet('updateRow', rownum);
},
}
},
{ label: '总成绩', name: 'Score', width: 80, align: "left" },
{
label: '备注', name: 'Remark', width: 100, align: "left",
edit: {
type: 'input',
}
},
];
headDataNoEdit = [
{
label: '期末成绩', name: 'TermEndScore', width: 80, align: "left"
},
{ label: '总成绩', name: 'Score', width: 80, align: "left" },
{
label: '备注', name: 'Remark', width: 100, align: "left"
},
];
headDataFinally = headData.concat(headDataNoEdit);

page.initGird();
page.bind();
page.bindSelect();
},
bind: function () {
//多条件选择
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 500);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
//查询
$('#btn_Search').on('click', function () {
refreshGirdData2();
});
// 开始录入
$('#lr_input').on('click', function () {
//提示弹框
learun.layerConfirm('录入完成后,请务必点击“提交成绩”按钮,避免成绩丢失!', function (res) {
if (res) {

var query = judgeSelect();
if (query) {
//判断是否已审核;判断是否被其他教师占用
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) {
if (data != null) {
if (data.CheckMark == 1) {
learun.alert.warning("学生成绩已审核!");
return false;
}
if (data.IsEditable == 0) {
if (data.EditUserId == learun.clientdata.get(['userinfo']).account) {
modifyDate = data.ModifyDate;
} else {
learun.alert.warning("当前班级成绩由账号为" + data.EditUserId + "的教师在使用!");
return false;
}
} else {
//占用成绩
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/StartInputScore', { queryJson: JSON.stringify(query) }, function (res) { });
}
//显示可编辑列头
headDataFinally = headData.concat(headDataEdit);
$("#gridtable")[0].dfop = undefined;
page.initGird();
page.search(query);
//显示“提交成绩”按钮
$('#lr_save').show();
//隐藏“开始录入”按钮
$('#lr_input').hide();
//显示“倒计时”
$('.timeBox').show();
$('#minutes').html($('#minutes').attr('data-minutes'));
//开始倒计时
page.countDown();
//五分钟提交成绩
page.submitScore();
} else {
learun.alert.warning("学生成绩不存在!");
return false;
}
});
}

}
});
});
//提交成绩
$('#lr_save').on('click', function () {
var query = judgeSelect();
if (query) {
//成绩被占用,且是登录用户时,根据编辑时间判断是否是本人;
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) {
if (data != null) {
if (data.CheckMark == 1) {
learun.alert.warning("学生成绩已审核!");
return false;
}
if (data.IsEditable == 0) {
if (data.EditUserId == learun.clientdata.get(['userinfo']).account) {
if (modifyDate != null && modifyDate != data.ModifyDate) {
learun.alert.warning("当前班级成绩被修改,请重新获取!");
return false;
}
} else {
learun.alert.warning("当前班级成绩由账号为" + data.EditUserId + "的教师在使用!");
return false;
}
} else if (data.IsEditable == 1) {
learun.alert.warning("学生成绩已提交!");
return false;
}
//提交成绩
var rowdatas = $('#gridtable').jfGridGet('rowdatas');
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/SaveInputScore', { data: JSON.stringify(rowdatas) }, function (res) {
if (res.code == 200) {
//提交成绩:取消占用
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/SaveInputScoreStatus', { queryJson: JSON.stringify(query) }, function (res) {
if (res.code == 200) {
refreshGirdData2();
modifyDate = null;
//隐藏“提交成绩”按钮
$('#lr_save').hide();
//显示“开始录入”按钮
$('#lr_input').show();
//隐藏“倒计时”
$('.timeBox').hide();
//停止倒计时
clearInterval(timer);
//停止五分钟提交成绩
clearInterval(submitScoreTimer);
} else {
learun.alert.warning("提交成绩:取消占用失败!");
return false;
}
});
} else {
learun.alert.warning("提交成绩失败!");
return false;
}
});

} else {
learun.alert.warning("学生成绩不存在!");
return false;
}
});
}
});
// 审核
$('#lr_check').on('click', function () {
var query = judgeSelect();
if (query) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) {
if (data != null) {
if (data.CheckMark == 1) {
learun.alert.warning("学生成绩已审核!");
return false;
}
learun.layerConfirm('是否确认审核当前班级的学生成绩!', function (res) {
if (res) {
//审核成绩
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/DoCheckScore', { queryJson: JSON.stringify(query), checkMark: 1 }, function (res) {
if (res.code == 200) {
refreshGirdData2();
} else {
learun.alert.warning("审核成绩失败!");
return false;
}
});
}
});
} else {
learun.alert.warning("学生成绩不存在!");
return false;
}
});
}
});
// 去审核
$('#lr_uncheck').on('click', function () {
var query = judgeSelect();
if (query) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) {
if (data != null) {
if (data.CheckMark != 1) {
learun.alert.warning("学生成绩未审核!");
return false;
}
learun.layerConfirm('是否确认去审核当前班级的学生成绩!', function (res) {
if (res) {
//去审核成绩
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/DoCheckScore', { queryJson: JSON.stringify(query), checkMark: 0 }, function (res) {
if (res.code == 200) {
refreshGirdData2();
} else {
learun.alert.warning("去审核成绩失败!");
return false;
}
});
}
});
} else {
learun.alert.warning("学生成绩不存在!");
return false;
}
});
}
});
//续时
$('#addMinutesBtn').on('click', function () {
var query = judgeSelect();
if (query) {
clearInterval(timer);
var addMinutes = $('#addMinutesBtn').attr('data-minutes');
var newMinutes = addMinutes;
var minutes = $('#minutes').html();
if (minutes > 0) {
newMinutes = Number(newMinutes) + Number(minutes);
}
$('#minutes').html(newMinutes);
page.countDown();
//修改服务时间
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/AddMinutes', { queryJson: JSON.stringify(query), minutes: newMinutes }, function (res) { });
}
});
},
bindSelect: function () {
//校区
$('#F_SchoolId').lrDataSourceSelect({
code: 'company', value: 'f_companyid', text: 'f_fullname', select: function (item) { }
});
$('#F_SchoolId').lrselectSet(learun.clientdata.get(['userinfo']).companyId);
//学年
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetAcademicYearNoData',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData',
value: 'value',
text: 'text'
});
//课程
$('#LessonNo').lrselect({
placeholder: "请选择课程",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetElectiveLessonNoDataOfAllWithNo',
value: 'value',
text: 'text',
select: function (item) {
if (!!item) {
$("#ClassRoomNo").lrselectRefresh({
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetElectiveClassRoomNoDataOfAll?lessonNo=' + item.value,
});
}
}
});
//教室
$('#ClassRoomNo').lrselect({
placeholder: "请选择教室",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetElectiveClassRoomNoDataOfAll',
value: 'value',
text: 'text',
select: function (item) {
if (!!item) {
$("#LessonSection").lrselectRefresh({
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetElectiveLessonSectionDataOfAll?classRoomNo=' + item.value,
});
}
}
});
//节次
$('#LessonSection').lrselect({
placeholder: "请选择节次",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetElectiveLessonSectionDataOfAll',
value: 'value',
text: 'text'
});
//绑定学年、学期
$.get('/Home/GetYearAndSemesteResult', function (ref) {
if (ref.code == "200") {
$('#AcademicYearNo').lrselectSet(ref.data.Item1);
$('#Semester').lrselectSet(ref.data.Item3);
}
}.bind(this), "json");
},
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetList',
headData: headDataFinally,
mainId: 'ScoreId',
isPage: false,
sidx: 'StuNo',
sord: 'asc'
});
//page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
},
countDown: function () {
var minutes = $('#minutes').html();
var minutesTemp = minutes;
var seconds = $('#seconds').attr('data-seconds');
$('#seconds').html(seconds);
var secondsTemp = seconds;
timer = setInterval(function () {
secondsTemp--;
$('#seconds').html(secondsTemp);
if (secondsTemp == 0) {
secondsTemp = seconds;
minutesTemp--;
$('#minutes').html(minutesTemp);
if (minutesTemp == 0) {
//停止倒计时
clearInterval(timer);
//自动提交成绩
$('#lr_save').trigger("click");
}
}
}, 1000);
},
submitScore: function () {
submitScoreTimer = setInterval(function () {
var rowdatas = $('#gridtable').jfGridGet('rowdatas');
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/SaveInputScore', { data: JSON.stringify(rowdatas) }, function (res) {
});
}, 300000);
},
};
refreshGirdData = function () {
page.search();
};
refreshGirdData2 = function () {
var query = judgeSelect();
if (query) {
//显示不可编辑列头
headDataFinally = headData.concat(headDataNoEdit);
$("#gridtable")[0].dfop = undefined;
page.initGird();

page.search(query);
}
};
judgeSelect = function () {
if (CanInputFlag != "True") {
top.learun.layerConfirm('当前时间不是选修重考成绩录入时间!', function (res) { });
return false;
}

var $content = $('body').find('.lr-layout-tool-left');
var query = $content.lrGetFormData();
if (query.F_SchoolId == null || query.F_SchoolId == "") {
learun.alert.warning("请选择校区!");
return false;
}
if (query.AcademicYearNo == null || query.AcademicYearNo == "") {
learun.alert.warning("请选择学年!");
return false;
}
if (query.Semester == null || query.Semester == "") {
learun.alert.warning("请选择学期!");
return false;
}
if (query.LessonNo == null || query.LessonNo == "") {
learun.alert.warning("请选择课程!");
return false;
}
if (query.ClassRoomNo == null || query.ClassRoomNo == "") {
learun.alert.warning("请选择教室!");
return false;
}
if (query.LessonSection == null || query.LessonSection == "") {
learun.alert.warning("请选择节次!");
return false;
}
return query;
};
page.init();
}

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Visa fil

@@ -1004,6 +1004,7 @@
<Content Include="Areas\EducationalAdministration\Views\StuFellowship\IndexOfTwo.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\SoonGraduateIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexUnpassTwoOfElective.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\InputScoreIndexOfElective.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPass\IndexUnpassOfElective.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPass\InputScoreIndexOfElectiveInTeacher.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPass\InputScoreIndexOfElective.js" />
@@ -8144,6 +8145,7 @@
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPass\InputScoreIndexOfElective.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPass\InputScoreIndexOfElectiveInTeacher.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexUnpassTwoOfElective.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\InputScoreIndexOfElective.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 69
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoBLL.cs Visa fil

@@ -354,6 +354,75 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 课程下拉框信息【选修课】
/// </summary>
/// <returns></returns>
public IEnumerable<WebHelper.YearGrade> GetElectiveLessonNoDataOfAll(string userAccount, string userType, string AcademicYearNo = "", string Semester = "")
{
try
{
return stuScoreNotPassTwoService.GetElectiveLessonNoDataOfAll(userAccount, userType, AcademicYearNo, Semester);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 教室下拉框信息【选修课】
/// </summary>
/// <returns></returns>
public IEnumerable<WebHelper.YearGrade> GetElectiveClassRoomNoData(string userAccount, string userType, string lessonNo)
{
try
{
return stuScoreNotPassTwoService.GetElectiveClassRoomNoData(userAccount, userType, lessonNo);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 节次下拉框信息【选修课】
/// </summary>
/// <returns></returns>
public IEnumerable<WebHelper.YearGrade> GetElectiveLessonSectionData(string userAccount, string userType, string classRoomNo)
{
try
{
return stuScoreNotPassTwoService.GetElectiveLessonSectionData(userAccount, userType, classRoomNo);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 开始录入:占用成绩
/// <summary>


+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoIBLL.cs Visa fil

@@ -101,6 +101,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <returns></returns>
IEnumerable<WebHelper.YearGrade> GetClassNoData(string userAccount, string userType, string lessonNo);

/// <summary>
/// 课程下拉框信息【选修课】
/// </summary>
/// <returns></returns>
IEnumerable<WebHelper.YearGrade> GetElectiveLessonNoDataOfAll(string userAccount, string userType, string AcademicYearNo = "", string Semester = "");

/// <summary>
/// 教室下拉框信息【选修课】
/// </summary>
/// <returns></returns>
IEnumerable<WebHelper.YearGrade> GetElectiveClassRoomNoData(string userAccount, string userType, string lessonNo);

/// <summary>
/// 节次下拉框信息【选修课】
/// </summary>
/// <returns></returns>
IEnumerable<WebHelper.YearGrade> GetElectiveLessonSectionData(string userAccount, string userType, string classRoomNo);

/// <summary>
/// 开始录入:占用成绩
/// <summary>


+ 212
- 22
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoService.cs Visa fil

@@ -71,6 +71,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
strSql.Append(" and t.ClassNo=@ClassNo ");
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String);
}
if (!queryParam["ClassRoomNo"].IsEmpty())
{
strSql.Append(" and t.ClassRoomNo=@ClassRoomNo ");
dp.Add("ClassRoomNo", queryParam["ClassRoomNo"].ToString(), DbType.String);
}
if (!queryParam["LessonSection"].IsEmpty())
{
strSql.Append(" and t.LessonSection=@LessonSection ");
dp.Add("LessonSection", queryParam["LessonSection"].ToString(), DbType.String);
}

return this.BaseRepository("CollegeMIS").FindList<StuScoreNotPassTwoEntity>(strSql.ToString(), dp);
}
@@ -202,6 +212,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
strSql.Append(" and t.ClassNo=@ClassNo ");
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String);
}
if (!queryParam["LessonSection"].IsEmpty())
{
strSql.Append(" and t.LessonSection=@LessonSection ");
dp.Add("LessonSection", queryParam["LessonSection"].ToString(), DbType.String);
}
if (!queryParam["ClassRoomNo"].IsEmpty())
{
strSql.Append(" and t.ClassRoomNo=@ClassRoomNo ");
dp.Add("ClassRoomNo", queryParam["ClassRoomNo"].ToString(), DbType.String);
}

return this.BaseRepository("CollegeMIS").FindEntity<StuScoreNotPassTwoEntity>(strSql.ToString(), dp);
}
@@ -677,7 +697,7 @@ order by bb.ScoreId";
{
try
{
var data = this.BaseRepository("CollegeMIS").FindList<WebHelper.YearGrade>("select distinct s.AcademicYearNo as value,s.AcademicYearNo as text from StuScoreNotPassTwo s where s.LessonSortNo='1' ");
var data = this.BaseRepository("CollegeMIS").FindList<WebHelper.YearGrade>("select distinct s.AcademicYearNo as value,s.AcademicYearNo as text from StuScoreNotPassTwo s where 1=1 ");
data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value);
return data;
}
@@ -762,6 +782,111 @@ order by bb.ScoreId";
}
}

/// <summary>
/// 课程下拉框信息【选修课】
/// </summary>
/// <returns></returns>
public IEnumerable<WebHelper.YearGrade> GetElectiveLessonNoDataOfAll(string userAccount, string userType, string AcademicYearNo = "", string Semester = "")
{
try
{
var strSql = new StringBuilder();
strSql.Append("select distinct s.LessonNo as value,l.LessonName as text from StuScoreNotPassTwo s left join LessonInfo l on s.LessonNo=l.LessonNo where s.LessonSortNo='2' ");
if (userType == "教师")
{
strSql.Append(" and s.EmpNo='" + userAccount + "' ");
}
if (!string.IsNullOrEmpty(AcademicYearNo))
{
strSql.Append(" and s.AcademicYearNo='" + AcademicYearNo + "' and s.Semester='" + Semester + "' ");
}
var data = this.BaseRepository("CollegeMIS").FindList<WebHelper.YearGrade>(strSql.ToString());
data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value);
return data;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 教室下拉框信息【选修课】
/// </summary>
/// <returns></returns>
public IEnumerable<WebHelper.YearGrade> GetElectiveClassRoomNoData(string userAccount, string userType, string lessonNo)
{
try
{
var strSql = new StringBuilder();
strSql.Append("select distinct s.ClassRoomNo as value,c.ClassroomName as text from StuScoreNotPassTwo s inner join ClassroomInfo c on s.ClassRoomNo=c.ClassroomNo where s.LessonSortNo='2' ");
if (userType == "教师")
{
strSql.Append(" and s.EmpNo='" + userAccount + "' ");
}
if (!string.IsNullOrEmpty(lessonNo))
{
strSql.Append(" and s.LessonNo='" + lessonNo + "' ");
}
var data = this.BaseRepository("CollegeMIS").FindList<WebHelper.YearGrade>(strSql.ToString());
data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value);
return data;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 节次下拉框信息【选修课】
/// </summary>
/// <returns></returns>
public IEnumerable<WebHelper.YearGrade> GetElectiveLessonSectionData(string userAccount, string userType, string classRoomNo)
{
try
{
var strSql = new StringBuilder();
strSql.Append("select distinct s.LessonSection as value,s.LessonSection as text from StuScoreNotPassTwo s where s.LessonSortNo='2' ");
if (userType == "教师")
{
strSql.Append(" and s.EmpNo='" + userAccount + "' ");
}
if (!string.IsNullOrEmpty(classRoomNo))
{
strSql.Append(" and s.ClassRoomNo='" + classRoomNo + "' ");
}
var data = this.BaseRepository("CollegeMIS").FindList<WebHelper.YearGrade>(strSql.ToString());
data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value);
return data;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 开始录入:占用成绩
/// <summary>
@@ -775,16 +900,32 @@ order by bb.ScoreId";
var AcademicYearNo = queryParam["AcademicYearNo"].ToString();
var Semester = queryParam["Semester"].ToString();
var LessonNo = queryParam["LessonNo"].ToString();
var ClassNo = queryParam["ClassNo"].ToString();
var ClassNo = queryParam["ClassNo"];
var LessonSection = queryParam["LessonSection"];
var ClassRoomNo = queryParam["ClassRoomNo"];

var now = DateTime.Now;
var loginUserInfo = LoginUserInfo.Get();

var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassInfoEntity>(x => x.ClassNo == ClassNo);
if (classInfoEntity != null)
if (!ClassNo.IsEmpty())
{
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuScoreNotPassTwo set IsEditable='0',EditUserId='" + loginUserInfo.account + "',BeginModifyDate='" + now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and OpenLessonDeptNo='" + classInfoEntity.DeptNo + "' and OpenLessonMajorNo='" + classInfoEntity.MajorNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='1' and ClassNo='" + ClassNo + "' ");
string classno = ClassNo.ToString();
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassInfoEntity>(x => x.ClassNo == classno);
if (classInfoEntity != null)
{
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuScoreNotPassTwo set IsEditable='0',EditUserId='" + loginUserInfo.account + "',BeginModifyDate='" + now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and OpenLessonDeptNo='" + classInfoEntity.DeptNo + "' and OpenLessonMajorNo='" + classInfoEntity.MajorNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='1' and ClassNo='" + classno + "' ");
}
}
else
{
string classroomno = ClassRoomNo.ToString();
string lessonsection = LessonSection.ToString();
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassroomInfoEntity>(x => x.ClassroomNo == classroomno);
if (classInfoEntity != null)
{
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuScoreNotPassTwo set IsEditable='0',EditUserId='" + loginUserInfo.account + "',BeginModifyDate='" + now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and ClassRoomNo='" + classInfoEntity.ClassroomNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='2' and LessonSection='" + lessonsection + "' ");
}
}

}
catch (Exception ex)
{
@@ -850,16 +991,32 @@ order by bb.ScoreId";
var AcademicYearNo = queryParam["AcademicYearNo"].ToString();
var Semester = queryParam["Semester"].ToString();
var LessonNo = queryParam["LessonNo"].ToString();
var ClassNo = queryParam["ClassNo"].ToString();
var ClassNo = queryParam["ClassNo"];
var LessonSection = queryParam["LessonSection"];
var ClassRoomNo = queryParam["ClassRoomNo"];

var now = DateTime.Now;
var loginUserInfo = LoginUserInfo.Get();

var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassInfoEntity>(x => x.ClassNo == ClassNo);
if (classInfoEntity != null)
if (!ClassNo.IsEmpty())
{
string classno = ClassNo.ToString();
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassInfoEntity>(x => x.ClassNo == classno);
if (classInfoEntity != null)
{
this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuScoreNotPassTwo set IsEditable='1',EditUserId=null,BeginModifyDate=null,ModifyDate='{now}',ModifyUserId='{loginUserInfo.account}',ModifyUserName='{loginUserInfo.realName}' where F_SchoolId='{F_SchoolId}' and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and OpenLessonDeptNo='{classInfoEntity.DeptNo}' and OpenLessonMajorNo='{classInfoEntity.MajorNo}' and LessonNo='{LessonNo}' and LessonSortNo='1' and ClassNo='{classno}' ");
}
}
else
{
this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuScoreNotPassTwo set IsEditable='1',EditUserId=null,BeginModifyDate=null,ModifyDate='{now}',ModifyUserId='{loginUserInfo.account}',ModifyUserName='{loginUserInfo.realName}' where F_SchoolId='{F_SchoolId}' and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and OpenLessonDeptNo='{classInfoEntity.DeptNo}' and OpenLessonMajorNo='{classInfoEntity.MajorNo}' and LessonNo='{LessonNo}' and LessonSortNo='1' and ClassNo='{ClassNo}' ");
string classroomno = ClassRoomNo.ToString();
string lessonsection = LessonSection.ToString();
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassroomInfoEntity>(x => x.ClassroomNo == classroomno);
if (classInfoEntity != null)
{
this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuScoreNotPassTwo set IsEditable='1',EditUserId=null,BeginModifyDate=null,ModifyDate='{now}',ModifyUserId='{loginUserInfo.account}',ModifyUserName='{loginUserInfo.realName}' where F_SchoolId='{F_SchoolId}' and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ClassRoomNo='{classInfoEntity.ClassroomNo}' and LessonNo='{LessonNo}' and LessonSortNo='2' and LessonSection='{lessonsection}' ");
}
}

}
catch (Exception ex)
{
@@ -886,21 +1043,37 @@ order by bb.ScoreId";
var AcademicYearNo = queryParam["AcademicYearNo"].ToString();
var Semester = queryParam["Semester"].ToString();
var LessonNo = queryParam["LessonNo"].ToString();
var ClassNo = queryParam["ClassNo"].ToString();
var ClassNo = queryParam["ClassNo"];
var LessonSection = queryParam["LessonSection"];
var ClassRoomNo = queryParam["ClassRoomNo"];

var now = DateTime.Now;
//var loginUserInfo = LoginUserInfo.Get();
var loginUserInfo = new
{
account = name.Split('_')[0],
realName = name.Split('_')[1]
};

var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassInfoEntity>(x => x.ClassNo == ClassNo);
if (classInfoEntity != null)
if (!ClassNo.IsEmpty())
{
this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuScoreNotPassTwo set IsEditable='1',EditUserId=null,BeginModifyDate=null,ModifyDate='{now}',ModifyUserId='{loginUserInfo.account}',ModifyUserName='{loginUserInfo.realName}' where F_SchoolId='{F_SchoolId}' and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and OpenLessonDeptNo='{classInfoEntity.DeptNo}' and OpenLessonMajorNo='{classInfoEntity.MajorNo}' and LessonNo='{LessonNo}' and LessonSortNo='1' and ClassNo='{ClassNo}' ");
string classno = ClassNo.ToString();
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassInfoEntity>(x => x.ClassNo == classno);
if (classInfoEntity != null)
{
this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuScoreNotPassTwo set IsEditable='1',EditUserId=null,BeginModifyDate=null,ModifyDate='{now}',ModifyUserId='{loginUserInfo.account}',ModifyUserName='{loginUserInfo.realName}' where F_SchoolId='{F_SchoolId}' and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and OpenLessonDeptNo='{classInfoEntity.DeptNo}' and OpenLessonMajorNo='{classInfoEntity.MajorNo}' and LessonNo='{LessonNo}' and LessonSortNo='1' and ClassNo='{classno}' ");
}
}
else
{
string classroomno = ClassRoomNo.ToString();
string lessonsection = LessonSection.ToString();
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassroomInfoEntity>(x => x.ClassroomNo == classroomno);
if (classInfoEntity != null)
{
this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuScoreNotPassTwo set IsEditable='1',EditUserId=null,BeginModifyDate=null,ModifyDate='{now}',ModifyUserId='{loginUserInfo.account}',ModifyUserName='{loginUserInfo.realName}' where F_SchoolId='{F_SchoolId}' and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ClassRoomNo='{classInfoEntity.ClassroomNo}' and LessonNo='{LessonNo}' and LessonSortNo='2' and LessonSection='{lessonsection}' ");
}
}

}
catch (Exception ex)
{
@@ -929,13 +1102,30 @@ order by bb.ScoreId";
var AcademicYearNo = queryParam["AcademicYearNo"].ToString();
var Semester = queryParam["Semester"].ToString();
var LessonNo = queryParam["LessonNo"].ToString();
var ClassNo = queryParam["ClassNo"].ToString();

var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassInfoEntity>(x => x.ClassNo == ClassNo);
if (classInfoEntity != null)
var ClassNo = queryParam["ClassNo"];
var LessonSection = queryParam["LessonSection"];
var ClassRoomNo = queryParam["ClassRoomNo"];
if (!ClassNo.IsEmpty())
{
string classno = ClassNo.ToString();
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassInfoEntity>(x => x.ClassNo == classno);
if (classInfoEntity != null)
{
this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuScoreNotPassTwo set CheckMark='{checkMark}' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and OpenLessonDeptNo='" + classInfoEntity.DeptNo + "' and OpenLessonMajorNo='" + classInfoEntity.MajorNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='1' and ClassNo='" + classno + "' ");
}
}
else
{
this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuScoreNotPassTwo set CheckMark='{checkMark}' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and OpenLessonDeptNo='" + classInfoEntity.DeptNo + "' and OpenLessonMajorNo='" + classInfoEntity.MajorNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='1' and ClassNo='" + ClassNo + "' ");
string classroomno = ClassRoomNo.ToString();
string lessonsection = LessonSection.ToString();
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassroomInfoEntity>(x => x.ClassroomNo == classroomno);
if (classInfoEntity != null)
{
this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuScoreNotPassTwo set CheckMark='{checkMark}' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and ClassRoomNo='" + classInfoEntity.ClassroomNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='2' and LessonSection='" + lessonsection + "' ");
}
}

}
catch (Exception ex)
{


Laddar…
Avbryt
Spara