@@ -395,15 +395,21 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
} | |||
[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) | |||
{ | |||
stuScoreIBLL.SubmitStuScore(AcademicYearNo, Semester, LessonNo, TeachClassNo, EmpNo); | |||
stuScoreIBLL.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/StuScore/GetMonitorList', | |||
headData: [ | |||
{ | |||
@@ -78,8 +88,8 @@ 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" }, | |||
//{ | |||
@@ -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) }); | |||
} | |||
}; | |||
@@ -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 () { | |||
@@ -173,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) }); | |||
} | |||
}; | |||
@@ -202,11 +202,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
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 | |||
{ | |||
stuScoreService.SubmitStuScore(AcademicYearNo, Semester, LessonNo, TeachClassNo, EmpNo); | |||
stuScoreService.SubmitStuScore(AcademicYearNo, Semester, LessonNo, TeachClassNo, EmpNo, ClassRoomNo, LessonSection, LessonSortNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -359,11 +359,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void UpEmpNos(string xn, string xq, string classNo, string LessonNo, string EmpNo, string HisEmpNo,string Grade) | |||
public void UpEmpNos(string xn, string xq, string classNo, string LessonNo, string EmpNo, string HisEmpNo, string Grade) | |||
{ | |||
try | |||
{ | |||
stuScoreService.UpEmpNos(xn, xq, classNo, LessonNo, EmpNo, HisEmpNo,Grade); | |||
stuScoreService.UpEmpNos(xn, xq, classNo, LessonNo, EmpNo, HisEmpNo, Grade); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -586,11 +586,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// 课程下拉框信息【学生成绩录入可去审核】 | |||
/// </summary> | |||
/// <returns></returns> | |||
public IEnumerable<WebHelper.YearGrade> GetLessonNoDataOfAll(string userAccount, string userType, string AcademicYearNo="", string Semester="") | |||
public IEnumerable<WebHelper.YearGrade> GetLessonNoDataOfAll(string userAccount, string userType, string AcademicYearNo = "", string Semester = "") | |||
{ | |||
try | |||
{ | |||
return stuScoreService.GetLessonNoDataOfAll(userAccount, userType,AcademicYearNo, Semester); | |||
return stuScoreService.GetLessonNoDataOfAll(userAccount, userType, AcademicYearNo, Semester); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -613,7 +613,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
return stuScoreService.GetElectiveLessonNoDataOfAll(userAccount, userType,AcademicYearNo,Semester); | |||
return stuScoreService.GetElectiveLessonNoDataOfAll(userAccount, userType, AcademicYearNo, Semester); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -1141,7 +1141,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
return stuScoreService.ExecuteImportExcel(type,dt, fileGuid, queryJson); | |||
return stuScoreService.ExecuteImportExcel(type, dt, fileGuid, queryJson); | |||
} | |||
catch (Exception ex) | |||
@@ -69,7 +69,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <summary> | |||
/// <returns></returns> | |||
void DeleteEntity(string keyValue); | |||
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> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
@@ -96,7 +96,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
var strSql = new StringBuilder(); | |||
strSql.Append("select AcademicYearNo,Semester,lessonno,LessonName,TeachClassNo,EmpNo,IsEditable,EditUserId,BeginModifyDate,ModifyDate from StuScore where 1=1 "); | |||
strSql.Append("select AcademicYearNo,Semester,lessonno,LessonName,TeachClassNo,EmpNo,LessonSortNo,ClassRoomNo,LessonSection,IsEditable,EditUserId,BeginModifyDate,ModifyDate from StuScore where 1=1 "); | |||
if (!queryParam["AcademicYearNo"].IsEmpty()) | |||
{ | |||
strSql.Append(" and AcademicYearNo = @AcademicYearNo "); | |||
@@ -107,7 +107,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,LessonName, 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,LessonName, 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<StuScoreEntity>(strSql.ToString(), dp); | |||
} | |||
catch (Exception ex) | |||
@@ -502,13 +508,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
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( | |||
@"update StuScore set IsEditable=1,EditUserId='',BeginModifyDate=null | |||
where AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + LessonNo + "' and EmpNo='" + EmpNo + "'" + (!string.IsNullOrEmpty(TeachClassNo) ? " and TeachClassNo='" + TeachClassNo + "'" : "")); | |||
if (LessonSortNo == "1") | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql( | |||
@"update StuScore 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 StuScore 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) | |||
{ | |||
@@ -474,8 +474,13 @@ and (b.EduSystem is null or b.EduSystem != '6') "); | |||
strSql.Append(" and Semester =@Semester "); | |||
dp.Add("Semester", "" + queryParam["Semester"].ToString() + "", DbType.String); | |||
} | |||
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,LessonSortNo,LessonNo,TeachClassNo,ClassRoomNo,LessonSection "); | |||
strSql.Append(" order by IsEditable, BeginModifyDate, edituserid,AcademicYearNo,Semester,LessonSortNo,LessonNo,TeachClassNo,ClassRoomNo,LessonSection "); | |||
return this.BaseRepository("CollegeMIS").FindList<StuScoreNotPassEntity>(strSql.ToString(), dp); | |||
} | |||
catch (Exception ex) | |||