@@ -619,14 +619,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Submit(string AcademicYearNo, string Semester, string LessonNo, string TeachClassNo, string EmpNo, string EditUserId) | |||
public ActionResult Submit(string AcademicYearNo, string Semester, string LessonNo, string TeachClassNo, string EmpNo, string ClassRoomNo, string LessonSection, string LessonSortNo, string EditUserId) | |||
{ | |||
stuScoreNotPassTwoIBLL.SubmitStuScore(AcademicYearNo, Semester, LessonNo, TeachClassNo, EmpNo); | |||
stuScoreNotPassTwoIBLL.SubmitStuScore(AcademicYearNo, Semester, LessonNo, TeachClassNo, EmpNo, ClassRoomNo, LessonSection, LessonSortNo); | |||
var userEntity = userIBLL.GetEntityByAccount(EditUserId); | |||
var name = EditUserId + "_" + userEntity?.F_RealName + "_二次补考成绩录入"; | |||
//删除任务 | |||
RecurringJob.RemoveIfExists(name); | |||
if (userEntity != null) | |||
{ | |||
var name = userEntity.F_Account + "_" + userEntity.F_RealName + "_二次补考成绩录入"; | |||
//判断选修课 | |||
if (LessonSortNo == "2") | |||
{ | |||
name = userEntity.F_Account + "_" + userEntity.F_RealName + "_选修二次补考成绩录入"; | |||
} | |||
//删除任务 | |||
RecurringJob.RemoveIfExists(name); | |||
} | |||
return Success("操作成功!"); | |||
} | |||
@@ -18,6 +18,9 @@ | |||
<div class="lr-layout-tool-item"> | |||
<div id="Semester" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="LessonSortNo" 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> 查询</a> | |||
</div> | |||
@@ -32,9 +32,16 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//类型 | |||
$('#LessonSortNo').lrselect({ | |||
width: '150px', | |||
placeholder: "请选择课程类型", | |||
allowSearch: true, | |||
data: [{ id: "1", text: "必修课" }, { id: "2", text: "选修课" }] | |||
}); | |||
// 查询 | |||
$('#btn_Search').on('click', function () { | |||
page.search({ AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet() }); | |||
page.search({ AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonSortNo: $('#LessonSortNo').lrselectGet() }); | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
@@ -58,6 +65,9 @@ var bootstrap = function ($, learun) { | |||
LessonNo: $('#gridtable').jfGridValue('LessonNo'), | |||
TeachClassNo: $('#gridtable').jfGridValue('TeachClassNo'), | |||
EmpNo: $('#gridtable').jfGridValue('EmpNo'), | |||
ClassRoomNo: $('#gridtable').jfGridValue('ClassRoomNo'), | |||
LessonSection: $('#gridtable').jfGridValue('LessonSection'), | |||
LessonSortNo: $('#gridtable').jfGridValue('LessonSortNo'), | |||
EditUserId: $('#gridtable').jfGridValue('EditUserId'), | |||
}, | |||
function () { | |||
@@ -69,7 +79,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
}, | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetMonitorList', | |||
headData: [ | |||
{ | |||
@@ -78,23 +88,23 @@ var bootstrap = function ($, learun) { | |||
return cellvalue == "1" ? "<span class=\"label label-success\">未占用</span>" : "<span class=\"label label-danger\">正在录入</span>"; | |||
} | |||
}, | |||
{ label: '学年', name: 'AcademicYearNo', width: 100, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 80, align: "left" }, | |||
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 40, align: "left" }, | |||
{ label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, | |||
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" }, | |||
//{ | |||
// label: '课程名称', name: 'LessonNo', width: 200, 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: '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: "TeachClassNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -122,6 +132,27 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ label: "上课教室号", name: "ClassRoomNo", width: 80, align: "left" }, | |||
{ | |||
label: "上课教室名称", name: "ClassRoomNo", width: 80, 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: "上课节次(如11代表星期一第一节课)", name: "LessonSection", width: 70, align: "left" }, | |||
{ | |||
label: "类型", name: "LessonSortNo", width: 60, align: "left", | |||
formatter: function (cellvalue, rowObject) { | |||
return cellvalue == 1 ? "<span>必修课</span>" : "<span>选修课</span>"; | |||
} | |||
}, | |||
{ label: '占用教师编号', name: 'EditUserId', width: 100, align: "left" }, | |||
{ | |||
label: '占用教师姓名', name: 'EditUserId', width: 100, align: "left", | |||
@@ -149,6 +180,7 @@ var bootstrap = function ($, learun) { | |||
param = param || {}; | |||
param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
param.Semester = $('#Semester').lrselectGet(); | |||
param.LessonSortNo = $('#LessonSortNo').lrselectGet(); | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -546,11 +546,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="LessonNo"></param> | |||
/// <param name="TeachClassNo"></param> | |||
/// <param name="EmpNo"></param> | |||
public void SubmitStuScore(string AcademicYearNo, string Semester, string LessonNo, string TeachClassNo, string EmpNo) | |||
public void SubmitStuScore(string AcademicYearNo, string Semester, string LessonNo, string TeachClassNo, string EmpNo, string ClassRoomNo, string LessonSection, string LessonSortNo) | |||
{ | |||
try | |||
{ | |||
stuScoreNotPassTwoService.SubmitStuScore(AcademicYearNo, Semester, LessonNo, TeachClassNo, EmpNo); | |||
stuScoreNotPassTwoService.SubmitStuScore(AcademicYearNo, Semester, LessonNo, TeachClassNo, EmpNo, ClassRoomNo, LessonSection, LessonSortNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -155,7 +155,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="LessonNo"></param> | |||
/// <param name="TeachClassNo"></param> | |||
/// <param name="EmpNo"></param> | |||
void SubmitStuScore(string AcademicYearNo, string Semester, string LessonNo, string TeachClassNo, string EmpNo); | |||
void SubmitStuScore(string AcademicYearNo, string Semester, string LessonNo, string TeachClassNo, string EmpNo, string ClassRoomNo, string LessonSection, string LessonSortNo); | |||
/// <summary> | |||
@@ -252,7 +252,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
var strSql = new StringBuilder(); | |||
strSql.Append("select AcademicYearNo,Semester,lessonno,TeachClassNo,EmpNo,IsEditable,EditUserId,BeginModifyDate,ModifyDate from StuScoreNotPassTwo where 1=1 "); | |||
strSql.Append("select AcademicYearNo,Semester,lessonno,TeachClassNo,EmpNo,LessonSortNo,ClassRoomNo,LessonSection,IsEditable,EditUserId,BeginModifyDate,ModifyDate from StuScoreNotPassTwo where 1=1 "); | |||
if (!queryParam["AcademicYearNo"].IsEmpty()) | |||
{ | |||
strSql.Append(" and AcademicYearNo = @AcademicYearNo "); | |||
@@ -263,7 +263,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
strSql.Append(" and Semester =@Semester "); | |||
dp.Add("Semester", "" + queryParam["Semester"].ToString() + "", DbType.String); | |||
} | |||
strSql.Append(" group by AcademicYearNo,Semester,lessonno, TeachClassNo, EmpNo, IsEditable, EditUserId, BeginModifyDate, ModifyDate order by IsEditable, BeginModifyDate, edituserid "); | |||
if (!queryParam["LessonSortNo"].IsEmpty()) | |||
{ | |||
strSql.Append(" and LessonSortNo =@LessonSortNo "); | |||
dp.Add("LessonSortNo", "" + queryParam["LessonSortNo"].ToString() + "", DbType.String); | |||
} | |||
strSql.Append(" group by AcademicYearNo,Semester,lessonno, TeachClassNo, EmpNo,LessonSortNo,ClassRoomNo,LessonSection, IsEditable, EditUserId, BeginModifyDate, ModifyDate "); | |||
strSql.Append(" order by IsEditable, BeginModifyDate, edituserid,AcademicYearNo,Semester,LessonSortNo,LessonNo,TeachClassNo,ClassRoomNo,LessonSection "); | |||
return this.BaseRepository("CollegeMIS").FindList<StuScoreNotPassTwoEntity>(strSql.ToString(), dp); | |||
} | |||
catch (Exception ex) | |||
@@ -1148,14 +1154,24 @@ order by bb.ScoreId"; | |||
/// <param name="LessonNo"></param> | |||
/// <param name="TeachClassNo"></param> | |||
/// <param name="EmpNo"></param> | |||
public void SubmitStuScore(string AcademicYearNo, string Semester, string LessonNo, string TeachClassNo, string EmpNo) | |||
public void SubmitStuScore(string AcademicYearNo, string Semester, string LessonNo, string TeachClassNo, string EmpNo, string ClassRoomNo, string LessonSection, string LessonSortNo) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql( | |||
if (LessonSortNo == "1") | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql( | |||
@"update StuScoreNotPassTwo set IsEditable=1,EditUserId=null,BeginModifyDate=null | |||
where AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + | |||
LessonNo + "' and TeachClassNo='" + TeachClassNo + "' and EmpNo='" + EmpNo + "' and LessonSortNo='1' "); | |||
} | |||
else if (LessonSortNo == "2") | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql( | |||
@"update StuScoreNotPassTwo set IsEditable=1,EditUserId=null,BeginModifyDate=null | |||
where AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + | |||
LessonNo + "' and TeachClassNo='" + TeachClassNo + "' and EmpNo='" + EmpNo + "'"); | |||
LessonNo + "' and EmpNo='" + EmpNo + "' and ClassRoomNo='" + ClassRoomNo + "' and LessonSection='" + LessonSection + "' and LessonSortNo='2' "); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||