@@ -642,15 +642,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
/// <returns></returns> | /// <returns></returns> | ||||
[HttpPost] | [HttpPost] | ||||
[AjaxOnly] | [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) | |||||
{ | { | ||||
stuScoreNotPassIBLL.SubmitStuScore(AcademicYearNo, Semester, LessonNo, TeachClassNo, EmpNo); | |||||
stuScoreNotPassIBLL.SubmitStuScore(AcademicYearNo, Semester, LessonNo, TeachClassNo, EmpNo, ClassRoomNo, LessonSection, LessonSortNo); | |||||
var userEntity = userIBLL.GetEntityByAccount(EditUserId); | 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("操作成功!"); | return Success("操作成功!"); | ||||
} | } | ||||
@@ -58,6 +58,9 @@ var bootstrap = function ($, learun) { | |||||
LessonNo: $('#gridtable').jfGridValue('LessonNo'), | LessonNo: $('#gridtable').jfGridValue('LessonNo'), | ||||
TeachClassNo: $('#gridtable').jfGridValue('TeachClassNo'), | TeachClassNo: $('#gridtable').jfGridValue('TeachClassNo'), | ||||
EmpNo: $('#gridtable').jfGridValue('EmpNo'), | EmpNo: $('#gridtable').jfGridValue('EmpNo'), | ||||
ClassRoomNo: $('#gridtable').jfGridValue('ClassRoomNo'), | |||||
LessonSection: $('#gridtable').jfGridValue('LessonSection'), | |||||
LessonSortNo: $('#gridtable').jfGridValue('LessonSortNo'), | |||||
EditUserId: $('#gridtable').jfGridValue('EditUserId'), | EditUserId: $('#gridtable').jfGridValue('EditUserId'), | ||||
}, | }, | ||||
function () { | function () { | ||||
@@ -69,7 +72,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
}, | }, | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/GetMonitorList', | url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/GetMonitorList', | ||||
headData: [ | headData: [ | ||||
{ | { | ||||
@@ -78,23 +81,23 @@ var bootstrap = function ($, learun) { | |||||
return cellvalue == "1" ? "<span class=\"label label-success\">未占用</span>" : "<span class=\"label label-danger\">正在录入</span>"; | 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: '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", | label: "班级", name: "TeachClassNo", width: 100, align: "left", | ||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
@@ -122,6 +125,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" }, | ||||
{ | { | ||||
label: '占用教师姓名', name: 'EditUserId', width: 100, align: "left", | label: '占用教师姓名', name: 'EditUserId', width: 100, align: "left", | ||||
@@ -64,7 +64,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 获取补考名单查看列表 | /// 获取补考名单查看列表 | ||||
/// </summary> | /// </summary> | ||||
@@ -547,11 +547,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="LessonNo"></param> | /// <param name="LessonNo"></param> | ||||
/// <param name="TeachClassNo"></param> | /// <param name="TeachClassNo"></param> | ||||
/// <param name="EmpNo"></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 | try | ||||
{ | { | ||||
stuScoreNotPassService.SubmitStuScore(AcademicYearNo, Semester, LessonNo, TeachClassNo, EmpNo); | |||||
stuScoreNotPassService.SubmitStuScore(AcademicYearNo, Semester, LessonNo, TeachClassNo, EmpNo, ClassRoomNo, LessonSection, LessonSortNo); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -160,7 +160,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="LessonNo"></param> | /// <param name="LessonNo"></param> | ||||
/// <param name="TeachClassNo"></param> | /// <param name="TeachClassNo"></param> | ||||
/// <param name="EmpNo"></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> | /// <summary> | ||||
/// 补考成绩导入 | /// 补考成绩导入 | ||||
@@ -288,7 +288,7 @@ and (b.EduSystem is null or b.EduSystem != '6') "); | |||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
//新 | //新 | ||||
strSql.Append(@"select ISNULL(ssnp.Score,0) as BKScore,ssnp.CheckMark as IsSubmit,c.classname,a.*,CONVERT(varchar,a.OrdinaryScore) as OrdinaryScore2,CONVERT(varchar,a.TermEndScore) as TermEndScore2,CONVERT(varchar,a.Score) as Score2,b.MoveType,b.StudyModality,e.EmpName | strSql.Append(@"select ISNULL(ssnp.Score,0) as BKScore,ssnp.CheckMark as IsSubmit,c.classname,a.*,CONVERT(varchar,a.OrdinaryScore) as OrdinaryScore2,CONVERT(varchar,a.TermEndScore) as TermEndScore2,CONVERT(varchar,a.Score) as Score2,b.MoveType,b.StudyModality,e.EmpName | ||||
from StuScore a | from StuScore a | ||||
@@ -463,7 +463,7 @@ and (b.EduSystem is null or b.EduSystem != '6') "); | |||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("select AcademicYearNo,Semester,lessonno,TeachClassNo,EmpNo,IsEditable,EditUserId,BeginModifyDate,ModifyDate from StuScoreNotPass where 1=1 "); | |||||
strSql.Append("select AcademicYearNo,Semester,lessonno,TeachClassNo,EmpNo,LessonSortNo,ClassRoomNo,LessonSection,IsEditable,EditUserId,BeginModifyDate,ModifyDate from StuScoreNotPass where 1=1 "); | |||||
if (!queryParam["AcademicYearNo"].IsEmpty()) | if (!queryParam["AcademicYearNo"].IsEmpty()) | ||||
{ | { | ||||
strSql.Append(" and AcademicYearNo = @AcademicYearNo "); | strSql.Append(" and AcademicYearNo = @AcademicYearNo "); | ||||
@@ -474,7 +474,8 @@ and (b.EduSystem is null or b.EduSystem != '6') "); | |||||
strSql.Append(" and Semester =@Semester "); | strSql.Append(" and Semester =@Semester "); | ||||
dp.Add("Semester", "" + queryParam["Semester"].ToString() + "", DbType.String); | 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 "); | |||||
strSql.Append(" group by AcademicYearNo,Semester,lessonno, TeachClassNo, EmpNo,LessonSortNo,ClassRoomNo,LessonSection, IsEditable, EditUserId, BeginModifyDate, ModifyDate "); | |||||
strSql.Append(" order by IsEditable, BeginModifyDate, edituserid,LessonSortNo,LessonNo,TeachClassNo,ClassRoomNo,LessonSection "); | |||||
return this.BaseRepository("CollegeMIS").FindList<StuScoreNotPassEntity>(strSql.ToString(), dp); | return this.BaseRepository("CollegeMIS").FindList<StuScoreNotPassEntity>(strSql.ToString(), dp); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -655,7 +656,7 @@ order by bb.ScoreId"; | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
var data = this.BaseRepository("CollegeMIS").FindList<WebHelper.YearGrade>("select distinct s.AcademicYearNo as value,s.AcademicYearNo as text from StuScoreNotPass s where s.LessonSortNo='1' "); | |||||
var data = this.BaseRepository("CollegeMIS").FindList<WebHelper.YearGrade>("select distinct s.AcademicYearNo as value,s.AcademicYearNo as text from StuScoreNotPass s where 1=1 "); | |||||
data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value); | data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value); | ||||
return data; | return data; | ||||
} | } | ||||
@@ -1020,7 +1021,7 @@ order by bb.ScoreId"; | |||||
account = name.Split('_')[0], | account = name.Split('_')[0], | ||||
realName = name.Split('_')[1] | realName = name.Split('_')[1] | ||||
}; | }; | ||||
if (!ClassNo.IsEmpty()) | if (!ClassNo.IsEmpty()) | ||||
{ | { | ||||
string classno = ClassNo.ToString(); | string classno = ClassNo.ToString(); | ||||
@@ -1073,7 +1074,7 @@ order by bb.ScoreId"; | |||||
var ClassNo = queryParam["ClassNo"]; | var ClassNo = queryParam["ClassNo"]; | ||||
var LessonSection = queryParam["LessonSection"]; | var LessonSection = queryParam["LessonSection"]; | ||||
var ClassRoomNo = queryParam["ClassRoomNo"]; | var ClassRoomNo = queryParam["ClassRoomNo"]; | ||||
if (!ClassNo.IsEmpty()) | if (!ClassNo.IsEmpty()) | ||||
{ | { | ||||
string classno = ClassNo.ToString(); | string classno = ClassNo.ToString(); | ||||
@@ -1117,14 +1118,24 @@ order by bb.ScoreId"; | |||||
/// <param name="LessonNo"></param> | /// <param name="LessonNo"></param> | ||||
/// <param name="TeachClassNo"></param> | /// <param name="TeachClassNo"></param> | ||||
/// <param name="EmpNo"></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 | try | ||||
{ | { | ||||
this.BaseRepository("CollegeMIS").ExecuteBySql( | |||||
if (LessonSortNo == "1") | |||||
{ | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql( | |||||
@"update StuScoreNotPass set IsEditable=1,EditUserId=null,BeginModifyDate=null | @"update StuScoreNotPass set IsEditable=1,EditUserId=null,BeginModifyDate=null | ||||
where AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + | where AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + | ||||
LessonNo + "' and TeachClassNo='" + TeachClassNo + "' and EmpNo='" + EmpNo + "'"); | |||||
LessonNo + "' and TeachClassNo='" + TeachClassNo + "' and EmpNo='" + EmpNo + "' and LessonSortNo='1' "); | |||||
} | |||||
else if (LessonSortNo == "2") | |||||
{ | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql( | |||||
@"update StuScoreNotPass set IsEditable=1,EditUserId=null,BeginModifyDate=null | |||||
where AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + | |||||
LessonNo + "' and EmpNo='" + EmpNo + "' and ClassRoomNo='" + ClassRoomNo + "' and LessonSection='" + LessonSection + "' and LessonSortNo='2' "); | |||||
} | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||