@@ -17,6 +17,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public class StuInfoBasicChangeController : MvcControllerBase | public class StuInfoBasicChangeController : MvcControllerBase | ||||
{ | { | ||||
private StuInfoBasicChangeIBLL stuInfoBasicChangeIBLL = new StuInfoBasicChangeBLL(); | private StuInfoBasicChangeIBLL stuInfoBasicChangeIBLL = new StuInfoBasicChangeBLL(); | ||||
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); | |||||
#region 视图功能 | #region 视图功能 | ||||
@@ -80,6 +81,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public ActionResult GetFormData(string keyValue) | public ActionResult GetFormData(string keyValue) | ||||
{ | { | ||||
var StuInfoBasicChangeData = stuInfoBasicChangeIBLL.GetStuInfoBasicChangeEntity(keyValue); | var StuInfoBasicChangeData = stuInfoBasicChangeIBLL.GetStuInfoBasicChangeEntity(keyValue); | ||||
StuInfoBasicChangeData.Grade = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(StuInfoBasicChangeData.StuNo)?.Grade; | |||||
var jsonData = new | var jsonData = new | ||||
{ | { | ||||
StuInfoBasicChange = StuInfoBasicChangeData, | StuInfoBasicChange = StuInfoBasicChangeData, | ||||
@@ -122,7 +124,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
stuInfoBasicChangeIBLL.SaveEntity(keyValue, entity); | stuInfoBasicChangeIBLL.SaveEntity(keyValue, entity); | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 审核实体数据 | /// 审核实体数据 | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
@@ -23,6 +23,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public class StuScoreController : MvcControllerBase | public class StuScoreController : MvcControllerBase | ||||
{ | { | ||||
private StuScoreIBLL stuScoreIBLL = new StuScoreBLL(); | private StuScoreIBLL stuScoreIBLL = new StuScoreBLL(); | ||||
private StuScoreNotPassIBLL stuScoreNotPassIBLL = new StuScoreNotPassBLL(); | |||||
private StuScoreNotPassTwoIBLL stuScoreNotPassTwoIBLL = new StuScoreNotPassTwoBLL(); | |||||
private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); | private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); | ||||
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); | private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); | ||||
private CdMajorIBLL cdMajorIBLL = new CdMajorBLL(); | private CdMajorIBLL cdMajorIBLL = new CdMajorBLL(); | ||||
@@ -544,7 +546,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
var loginInfo = LoginUserInfo.Get(); | var loginInfo = LoginUserInfo.Get(); | ||||
var semesterAndYear = Common.GetSemesterAndYear(); | var semesterAndYear = Common.GetSemesterAndYear(); | ||||
var data = stuScoreIBLL.GetClassNoDataForInput(loginInfo.account, loginInfo.Description, lessonNo, semesterAndYear.AcademicYearShort, semesterAndYear.Semester); | var data = stuScoreIBLL.GetClassNoDataForInput(loginInfo.account, loginInfo.Description, lessonNo, semesterAndYear.AcademicYearShort, semesterAndYear.Semester); | ||||
return Success(data); | return Success(data); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -1219,6 +1221,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
/// <summary> | /// <summary> | ||||
/// 成绩导入 | /// 成绩导入 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="type">1必修;2选修;3补考成绩;4二次补考成绩</param> | |||||
/// <param name="fileGuid"></param> | |||||
/// <param name="chunks"></param> | |||||
/// <param name="queryJson"></param> | |||||
/// <returns></returns> | /// <returns></returns> | ||||
[HttpPost] | [HttpPost] | ||||
[ValidateAntiForgeryToken] | [ValidateAntiForgeryToken] | ||||
@@ -1228,8 +1234,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
if (!string.IsNullOrEmpty(path)) | if (!string.IsNullOrEmpty(path)) | ||||
{ | { | ||||
DataTable dt = ExcelHelper.ExcelImport(path); | DataTable dt = ExcelHelper.ExcelImport(path); | ||||
var res = stuScoreIBLL.ExecuteImportExcel(type, dt, fileGuid, queryJson); | |||||
(DataTable failDt, int snum, int fnum) res; | |||||
if (type == 1 || type == 2) | |||||
{ | |||||
//必修选修 | |||||
res = stuScoreIBLL.ExecuteImportExcel(type, dt, fileGuid, queryJson); | |||||
} | |||||
else if (type == 3) | |||||
{ | |||||
//补考 | |||||
res = stuScoreNotPassIBLL.ExecuteImportExcelForNotPass(dt, fileGuid, queryJson); | |||||
} | |||||
else | |||||
{ | |||||
//二次补考 | |||||
res = stuScoreNotPassTwoIBLL.ExecuteImportExcelForNotPassTwo(dt, fileGuid, queryJson); | |||||
} | |||||
var data = new | var data = new | ||||
{ | { | ||||
Success = res.snum, | Success = res.snum, | ||||
@@ -5,6 +5,7 @@ | |||||
* 描 述:学籍异动 | * 描 述:学籍异动 | ||||
*/ | */ | ||||
var acceptClick; | var acceptClick; | ||||
var Grade; | |||||
var keyValue = request('keyValue'); | var keyValue = request('keyValue'); | ||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
@@ -65,29 +66,36 @@ var bootstrap = function ($, learun) { | |||||
param: { strWhere: "deptno='" + item.deptno + "' AND CheckMark=1 order by majorno" } | param: { strWhere: "deptno='" + item.deptno + "' AND CheckMark=1 order by majorno" } | ||||
}); | }); | ||||
} else { | } else { | ||||
$('#NewMajorNo').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: "CheckMark=1 order by majorno" } | |||||
}); | |||||
//$('#NewMajorNo').lrselectRefresh({ | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
// param: { strWhere: "CheckMark=1 order by majorno" } | |||||
//}); | |||||
} | } | ||||
} | } | ||||
}); | }); | ||||
$('#NewMajorNo').lrDataSourceSelect({ | $('#NewMajorNo').lrDataSourceSelect({ | ||||
code: 'CdMajorInfo', value: 'majorno', text: 'majorname', select: function (item) { | code: 'CdMajorInfo', value: 'majorno', text: 'majorname', select: function (item) { | ||||
if (item != null && item != undefined) { | if (item != null && item != undefined) { | ||||
var gradeWhere = ''; | |||||
if (!!Grade) { | |||||
gradeWhere = " and Grade='" + Grade + "'"; | |||||
} | |||||
$('#NewClassNo').lrselectRefresh({ | $('#NewClassNo').lrselectRefresh({ | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | ||||
param: { strWhere: "MajorNo='" + item.majorno + "' AND CheckMark=1 order by classno" } | |||||
param: { strWhere: "MajorNo='" + item.majorno + "' AND CheckMark=1" + gradeWhere+" order by classno" } | |||||
}); | }); | ||||
} else { | } else { | ||||
$('#NewClassNo').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "CheckMark=1 order by classno" } | |||||
}); | |||||
//$('#NewClassNo').lrselectRefresh({ | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
// param: { strWhere: "CheckMark=1 order by classno" } | |||||
//}); | |||||
} | } | ||||
} | } | ||||
}); | }); | ||||
$('#NewClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||||
$('#NewClassNo').lrselect({ | |||||
value: 'classno', text: 'classname' | |||||
}); | |||||
//$('#NewClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||||
//监听学号 | //监听学号 | ||||
$("#StuNo").on('blur', function () { | $("#StuNo").on('blur', function () { | ||||
var StuNo = $(this).val(); | var StuNo = $(this).val(); | ||||
@@ -99,6 +107,7 @@ var bootstrap = function ($, learun) { | |||||
$("#DeptNo").lrselectSet(data.DeptNo); | $("#DeptNo").lrselectSet(data.DeptNo); | ||||
$("#MajorNo").lrselectSet(data.MajorNo); | $("#MajorNo").lrselectSet(data.MajorNo); | ||||
$("#ClassNo").lrselectSet(data.ClassNo); | $("#ClassNo").lrselectSet(data.ClassNo); | ||||
Grade = data.Grade; | |||||
} else { | } else { | ||||
learun.alert.warning("学生不存在!"); | learun.alert.warning("学生不存在!"); | ||||
//return false; | //return false; | ||||
@@ -117,6 +126,7 @@ var bootstrap = function ($, learun) { | |||||
$("#DeptNo").lrselectSet(data.DeptNo); | $("#DeptNo").lrselectSet(data.DeptNo); | ||||
$("#MajorNo").lrselectSet(data.MajorNo); | $("#MajorNo").lrselectSet(data.MajorNo); | ||||
$("#ClassNo").lrselectSet(data.ClassNo); | $("#ClassNo").lrselectSet(data.ClassNo); | ||||
Grade = data.Grade; | |||||
} else { | } else { | ||||
learun.alert.warning("学生不存在!"); | learun.alert.warning("学生不存在!"); | ||||
return false; | return false; | ||||
@@ -139,7 +149,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
else { | else { | ||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | $('[data-table="' + id + '"]').lrSetFormData(data[id]); | ||||
Grade = data[id].Grade; | |||||
$(".NewContainer").find('.contentDiv').attr("isvalid", "yes"); | $(".NewContainer").find('.contentDiv').attr("isvalid", "yes"); | ||||
$(".NewContainer").find('.contentDiv').attr("checkexpession", "NotNull"); | $(".NewContainer").find('.contentDiv').attr("checkexpession", "NotNull"); | ||||
$(".NewContainer").find('.contentDiv').attr('readonly', 'readonly'); | $(".NewContainer").find('.contentDiv').attr('readonly', 'readonly'); | ||||
@@ -140,6 +140,9 @@ var bootstrap = function ($, learun) { | |||||
type: 'input', | type: 'input', | ||||
inputType: 'number', | inputType: 'number', | ||||
change: function (row, rownum) { | change: function (row, rownum) { | ||||
if (row.OrdinaryScore < 0) { | |||||
row.OrdinaryScore = '0'; | |||||
} | |||||
row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); | row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); | ||||
$('#gridtable').jfGridSet('updateRow', rownum); | $('#gridtable').jfGridSet('updateRow', rownum); | ||||
}, | }, | ||||
@@ -151,6 +154,9 @@ var bootstrap = function ($, learun) { | |||||
type: 'input', | type: 'input', | ||||
inputType: 'number', | inputType: 'number', | ||||
change: function (row, rownum) { | change: function (row, rownum) { | ||||
if (row.TermInScore < 0) { | |||||
row.TermInScore = '0'; | |||||
} | |||||
row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); | row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); | ||||
$('#gridtable').jfGridSet('updateRow', rownum); | $('#gridtable').jfGridSet('updateRow', rownum); | ||||
}, | }, | ||||
@@ -162,6 +168,9 @@ var bootstrap = function ($, learun) { | |||||
type: 'input', | type: 'input', | ||||
inputType: 'number', | inputType: 'number', | ||||
change: function (row, rownum) { | change: function (row, rownum) { | ||||
if (row.TermEndScore < 0) { | |||||
row.TermEndScore = '0'; | |||||
} | |||||
row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); | row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); | ||||
$('#gridtable').jfGridSet('updateRow', rownum); | $('#gridtable').jfGridSet('updateRow', rownum); | ||||
}, | }, | ||||
@@ -173,6 +182,9 @@ var bootstrap = function ($, learun) { | |||||
type: 'input', | type: 'input', | ||||
inputType: 'number', | inputType: 'number', | ||||
change: function (row, rownum) { | change: function (row, rownum) { | ||||
if (row.OtherScore < 0) { | |||||
row.OtherScore = '0'; | |||||
} | |||||
row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); | row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); | ||||
$('#gridtable').jfGridSet('updateRow', rownum); | $('#gridtable').jfGridSet('updateRow', rownum); | ||||
}, | }, | ||||
@@ -315,6 +327,10 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_save').show(); | $('#lr_save').show(); | ||||
//隐藏“开始录入”按钮 | //隐藏“开始录入”按钮 | ||||
$('#lr_input').hide(); | $('#lr_input').hide(); | ||||
//隐藏“提交教务处”、“去审核成绩”、“设置成绩比例”按钮 | |||||
$('#lr_check').hide(); | |||||
$('#lr_uncheck').hide(); | |||||
$('#lr_setScale').hide(); | |||||
//显示“倒计时” | //显示“倒计时” | ||||
$('.timeBox').show(); | $('.timeBox').show(); | ||||
$('#minutes').html($('#minutes').attr('data-minutes')); | $('#minutes').html($('#minutes').attr('data-minutes')); | ||||
@@ -371,6 +387,10 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_save').hide(); | $('#lr_save').hide(); | ||||
//显示“开始录入”按钮 | //显示“开始录入”按钮 | ||||
$('#lr_input').show(); | $('#lr_input').show(); | ||||
//显示“提交教务处”、“去审核成绩”、“设置成绩比例”按钮 | |||||
$('#lr_check').show(); | |||||
$('#lr_uncheck').show(); | |||||
$('#lr_setScale').show(); | |||||
//隐藏“倒计时” | //隐藏“倒计时” | ||||
$('.timeBox').hide(); | $('.timeBox').hide(); | ||||
//停止倒计时 | //停止倒计时 | ||||
@@ -83,9 +83,15 @@ var bootstrap = function ($, learun) { | |||||
columnJson = JSON.stringify(columnJson.filter(item => item.name !== 'CheckMark')); | columnJson = JSON.stringify(columnJson.filter(item => item.name !== 'CheckMark')); | ||||
var rowJson = JSON.stringify(learun.frameTab.currentIframe().rowJson); | var rowJson = JSON.stringify(learun.frameTab.currentIframe().rowJson); | ||||
var fileName = "成绩录入数据"; | var fileName = "成绩录入数据"; | ||||
if (type == '2') | |||||
if (type == '2') { | |||||
fileName = "选修成绩录入数据"; | fileName = "选修成绩录入数据"; | ||||
} | |||||
else if (type == '3') { | |||||
fileName = "补考成绩录入"; | |||||
} | |||||
else if (type == '4') { | |||||
fileName = "二次补考成绩录入"; | |||||
} | |||||
learun.download({ | learun.download({ | ||||
method: "POST", | method: "POST", | ||||
url: '/EducationalAdministration/StuScore/ExportExcel', | url: '/EducationalAdministration/StuScore/ExportExcel', | ||||
@@ -138,6 +138,9 @@ var bootstrap = function ($, learun) { | |||||
type: 'input', | type: 'input', | ||||
inputType: 'number', | inputType: 'number', | ||||
change: function (row, rownum) { | change: function (row, rownum) { | ||||
if (row.OrdinaryScore < 0) { | |||||
row.OrdinaryScore = '0'; | |||||
} | |||||
row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); | row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); | ||||
$('#gridtable').jfGridSet('updateRow', rownum); | $('#gridtable').jfGridSet('updateRow', rownum); | ||||
}, | }, | ||||
@@ -149,6 +152,9 @@ var bootstrap = function ($, learun) { | |||||
type: 'input', | type: 'input', | ||||
inputType: 'number', | inputType: 'number', | ||||
change: function (row, rownum) { | change: function (row, rownum) { | ||||
if (row.TermInScore < 0) { | |||||
row.TermInScore = '0'; | |||||
} | |||||
row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); | row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); | ||||
$('#gridtable').jfGridSet('updateRow', rownum); | $('#gridtable').jfGridSet('updateRow', rownum); | ||||
}, | }, | ||||
@@ -160,6 +166,9 @@ var bootstrap = function ($, learun) { | |||||
type: 'input', | type: 'input', | ||||
inputType: 'number', | inputType: 'number', | ||||
change: function (row, rownum) { | change: function (row, rownum) { | ||||
if (row.TermEndScore < 0) { | |||||
row.TermEndScore = '0'; | |||||
} | |||||
row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); | row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); | ||||
$('#gridtable').jfGridSet('updateRow', rownum); | $('#gridtable').jfGridSet('updateRow', rownum); | ||||
}, | }, | ||||
@@ -171,6 +180,9 @@ var bootstrap = function ($, learun) { | |||||
type: 'input', | type: 'input', | ||||
inputType: 'number', | inputType: 'number', | ||||
change: function (row, rownum) { | change: function (row, rownum) { | ||||
if (row.OtherScore < 0) { | |||||
row.OtherScore = '0'; | |||||
} | |||||
row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); | row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); | ||||
$('#gridtable').jfGridSet('updateRow', rownum); | $('#gridtable').jfGridSet('updateRow', rownum); | ||||
}, | }, | ||||
@@ -313,6 +325,10 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_save').show(); | $('#lr_save').show(); | ||||
//隐藏“开始录入”按钮 | //隐藏“开始录入”按钮 | ||||
$('#lr_input').hide(); | $('#lr_input').hide(); | ||||
//隐藏“提交教务处”、“去审核成绩”按钮 | |||||
$('#lr_check').hide(); | |||||
$('#lr_uncheck').hide(); | |||||
$('#lr_setScale').hide(); | |||||
//显示“倒计时” | //显示“倒计时” | ||||
$('.timeBox').show(); | $('.timeBox').show(); | ||||
$('#minutes').html($('#minutes').attr('data-minutes')); | $('#minutes').html($('#minutes').attr('data-minutes')); | ||||
@@ -369,6 +385,10 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_save').hide(); | $('#lr_save').hide(); | ||||
//显示“开始录入”按钮 | //显示“开始录入”按钮 | ||||
$('#lr_input').show(); | $('#lr_input').show(); | ||||
//显示“提交教务处”、“去审核成绩”、“设置成绩比例”按钮 | |||||
$('#lr_check').show(); | |||||
$('#lr_uncheck').show(); | |||||
$('#lr_setScale').show(); | |||||
//隐藏“倒计时” | //隐藏“倒计时” | ||||
$('.timeBox').hide(); | $('.timeBox').hide(); | ||||
//停止倒计时 | //停止倒计时 | ||||
@@ -522,7 +542,7 @@ var bootstrap = function ($, learun) { | |||||
refreshGirdData2(); | refreshGirdData2(); | ||||
} | } | ||||
}); | }); | ||||
} else { | } else { | ||||
learun.alert.warning("学生成绩不存在!"); | learun.alert.warning("学生成绩不存在!"); | ||||
return false; | return false; | ||||
@@ -89,6 +89,7 @@ | |||||
<a id="lr_save" class="btn btn-default" style="display:none;"><i class="fa fa-edit"> 提交成绩</i></a> | <a id="lr_save" class="btn btn-default" style="display:none;"><i class="fa fa-edit"> 提交成绩</i></a> | ||||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 提交教务处</i></a> | <a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 提交教务处</i></a> | ||||
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock"> 去审核成绩</i></a> | <a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock"> 去审核成绩</i></a> | ||||
<a id="lr_importScore" class="btn btn-default"><i class="fa fa-edit"> 导入</i></a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -17,6 +17,9 @@ var headData; //常规列头 | |||||
var headDataEdit; //可编辑列头 | var headDataEdit; //可编辑列头 | ||||
var headDataNoEdit; //不可编辑列头 | var headDataNoEdit; //不可编辑列头 | ||||
var headDataFinally; //最终列头 | var headDataFinally; //最终列头 | ||||
var rowJson; | |||||
var columnJson; | |||||
var queryJson; | |||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var page = { | var page = { | ||||
@@ -131,11 +134,14 @@ var bootstrap = function ($, learun) { | |||||
]; | ]; | ||||
headDataEdit = [ | headDataEdit = [ | ||||
{ | { | ||||
label: '补考成绩', name: 'TermEndScore', width: 80, align: "left", | |||||
label: '期末成绩', name: 'TermEndScore', width: 80, align: "left", | |||||
edit: { | edit: { | ||||
type: 'input', | type: 'input', | ||||
inputType: 'number', | inputType: 'number', | ||||
change: function (row, rownum) { | change: function (row, rownum) { | ||||
if (row.TermEndScore < 0) { | |||||
row.TermEndScore = '0'; | |||||
} | |||||
row.Score = (parseFloat(row.TermEndScore || '0') * 1).toFixed(0); | row.Score = (parseFloat(row.TermEndScore || '0') * 1).toFixed(0); | ||||
$('#gridtable').jfGridSet('updateRow', rownum); | $('#gridtable').jfGridSet('updateRow', rownum); | ||||
}, | }, | ||||
@@ -212,6 +218,9 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_save').show(); | $('#lr_save').show(); | ||||
//隐藏“开始录入”按钮 | //隐藏“开始录入”按钮 | ||||
$('#lr_input').hide(); | $('#lr_input').hide(); | ||||
//隐藏“提交教务处”、“去审核成绩”按钮 | |||||
$('#lr_check').hide(); | |||||
$('#lr_uncheck').hide(); | |||||
//显示“倒计时” | //显示“倒计时” | ||||
$('.timeBox').show(); | $('.timeBox').show(); | ||||
$('#minutes').html($('#minutes').attr('data-minutes')); | $('#minutes').html($('#minutes').attr('data-minutes')); | ||||
@@ -267,6 +276,9 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_save').hide(); | $('#lr_save').hide(); | ||||
//显示“开始录入”按钮 | //显示“开始录入”按钮 | ||||
$('#lr_input').show(); | $('#lr_input').show(); | ||||
//显示“提交教务处”、“去审核成绩”按钮 | |||||
$('#lr_check').show(); | |||||
$('#lr_uncheck').show(); | |||||
//隐藏“倒计时” | //隐藏“倒计时” | ||||
$('.timeBox').hide(); | $('.timeBox').hide(); | ||||
//停止倒计时 | //停止倒计时 | ||||
@@ -368,6 +380,57 @@ var bootstrap = function ($, learun) { | |||||
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/AddMinutes', { queryJson: JSON.stringify(query), minutes: newMinutes }, function (res) { }); | learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/AddMinutes', { queryJson: JSON.stringify(query), minutes: newMinutes }, function (res) { }); | ||||
} | } | ||||
}); | }); | ||||
//导入 | |||||
$('#lr_importScore').on('click', function () { | |||||
var query = judgeSelect(); | |||||
if (query) { | |||||
//成绩被占用,且是登录用户时,根据编辑时间判断是否是本人; | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/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; | |||||
} | |||||
} | |||||
rowJson = $('#gridtable').jfGridGet('showData'); | |||||
columnJson = $('#gridtable').jfGridGet('settingInfo').headData; | |||||
//条件 | |||||
var $content = $('body').find('.lr-layout-tool-left'); | |||||
queryJson = $content.lrGetFormData(); | |||||
learun.layerForm({ | |||||
id: 'indexImport', | |||||
title: "导入补考成绩", | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/InputScoreIndexInTeacherImport?type=3', | |||||
width: 600, | |||||
height: 400, | |||||
maxmin: true, | |||||
btn: null, | |||||
end: function () { | |||||
refreshGirdData2(); | |||||
} | |||||
}); | |||||
} else { | |||||
learun.alert.warning("学生成绩不存在!"); | |||||
return false; | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | }, | ||||
bindSelect: function () { | bindSelect: function () { | ||||
//校区 | //校区 | ||||
@@ -89,6 +89,7 @@ | |||||
<a id="lr_save" class="btn btn-default" style="display:none;"><i class="fa fa-edit"> 提交成绩</i></a> | <a id="lr_save" class="btn btn-default" style="display:none;"><i class="fa fa-edit"> 提交成绩</i></a> | ||||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 提交教务处</i></a> | <a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 提交教务处</i></a> | ||||
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock"> 去审核成绩</i></a> | <a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock"> 去审核成绩</i></a> | ||||
<a id="lr_importScore" class="btn btn-default"><i class="fa fa-edit"> 导入</i></a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -17,6 +17,9 @@ var headData; //常规列头 | |||||
var headDataEdit; //可编辑列头 | var headDataEdit; //可编辑列头 | ||||
var headDataNoEdit; //不可编辑列头 | var headDataNoEdit; //不可编辑列头 | ||||
var headDataFinally; //最终列头 | var headDataFinally; //最终列头 | ||||
var rowJson; | |||||
var columnJson; | |||||
var queryJson; | |||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var page = { | var page = { | ||||
@@ -131,11 +134,14 @@ var bootstrap = function ($, learun) { | |||||
]; | ]; | ||||
headDataEdit = [ | headDataEdit = [ | ||||
{ | { | ||||
label: '补考成绩', name: 'TermEndScore', width: 80, align: "left", | |||||
label: '期末成绩', name: 'TermEndScore', width: 80, align: "left", | |||||
edit: { | edit: { | ||||
type: 'input', | type: 'input', | ||||
inputType: 'number', | inputType: 'number', | ||||
change: function (row, rownum) { | change: function (row, rownum) { | ||||
if (row.TermEndScore < 0) { | |||||
row.TermEndScore = '0'; | |||||
} | |||||
row.Score = (parseFloat(row.TermEndScore || '0') * 1).toFixed(0); | row.Score = (parseFloat(row.TermEndScore || '0') * 1).toFixed(0); | ||||
$('#gridtable').jfGridSet('updateRow', rownum); | $('#gridtable').jfGridSet('updateRow', rownum); | ||||
}, | }, | ||||
@@ -212,6 +218,9 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_save').show(); | $('#lr_save').show(); | ||||
//隐藏“开始录入”按钮 | //隐藏“开始录入”按钮 | ||||
$('#lr_input').hide(); | $('#lr_input').hide(); | ||||
//隐藏“提交教务处”、“去审核成绩”按钮 | |||||
$('#lr_check').hide(); | |||||
$('#lr_uncheck').hide(); | |||||
//显示“倒计时” | //显示“倒计时” | ||||
$('.timeBox').show(); | $('.timeBox').show(); | ||||
$('#minutes').html($('#minutes').attr('data-minutes')); | $('#minutes').html($('#minutes').attr('data-minutes')); | ||||
@@ -267,6 +276,9 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_save').hide(); | $('#lr_save').hide(); | ||||
//显示“开始录入”按钮 | //显示“开始录入”按钮 | ||||
$('#lr_input').show(); | $('#lr_input').show(); | ||||
//显示“提交教务处”、“去审核成绩”按钮 | |||||
$('#lr_check').show(); | |||||
$('#lr_uncheck').show(); | |||||
//隐藏“倒计时” | //隐藏“倒计时” | ||||
$('.timeBox').hide(); | $('.timeBox').hide(); | ||||
//停止倒计时 | //停止倒计时 | ||||
@@ -368,6 +380,56 @@ var bootstrap = function ($, learun) { | |||||
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/AddMinutes', { queryJson: JSON.stringify(query), minutes: newMinutes }, function (res) { }); | learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/AddMinutes', { queryJson: JSON.stringify(query), minutes: newMinutes }, function (res) { }); | ||||
} | } | ||||
}); | }); | ||||
//导入 | |||||
$('#lr_importScore').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; | |||||
} | |||||
} | |||||
rowJson = $('#gridtable').jfGridGet('showData'); | |||||
columnJson = $('#gridtable').jfGridGet('settingInfo').headData; | |||||
//条件 | |||||
var $content = $('body').find('.lr-layout-tool-left'); | |||||
queryJson = $content.lrGetFormData(); | |||||
learun.layerForm({ | |||||
id: 'indexImport', | |||||
title: "导入二次补考成绩", | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/InputScoreIndexInTeacherImport?type=4', | |||||
width: 600, | |||||
height: 400, | |||||
maxmin: true, | |||||
btn: null, | |||||
end: function () { | |||||
refreshGirdData2(); | |||||
} | |||||
}); | |||||
} else { | |||||
learun.alert.warning("学生成绩不存在!"); | |||||
return false; | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | }, | ||||
bindSelect: function () { | bindSelect: function () { | ||||
//校区 | //校区 | ||||
@@ -40,10 +40,56 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
}); | }); | ||||
function debounce(fn, delay) { | |||||
let time = null; | |||||
return function () { | |||||
if (time !== null) { | |||||
clearTimeout(time); | |||||
} | |||||
time = setTimeout(() => { | |||||
fn.call(this); | |||||
}, delay) | |||||
} | |||||
} | |||||
//$('#btn_finish').on('click', debounce(function () { | |||||
// console.log('123456') | |||||
// var datapair = $sigdiv.jsignature("getdata"); | |||||
// top.flowauditfn(datapair,stampurl); | |||||
// learun.layerclose(window.name); | |||||
//},500)) | |||||
function debounce(fn, delay) { | |||||
let time = null; | |||||
return function () { | |||||
if (time !== null) { | |||||
clearTimeout(time); | |||||
} | |||||
time = setTimeout(() => { | |||||
fn.call(this); | |||||
}, delay) | |||||
} | |||||
} | |||||
//$('#btn_finish').on('click', debounce(function () { | |||||
// console.log('123456') | |||||
// var datapair = $sigdiv.jsignature("getdata"); | |||||
// top.flowauditfn(datapair,stampurl); | |||||
// learun.layerclose(window.name); | |||||
//},500)) | |||||
$('#btn_finish').on('click', function () { | $('#btn_finish').on('click', function () { | ||||
var datapair = $sigdiv.jSignature("getData"); | |||||
top.flowAuditfn(datapair,stampUrl); | |||||
learun.layerClose(window.name); | |||||
learun.loading(true, '正在提交'); | |||||
var datapair = $sigdiv.jSignature("getData"); | |||||
top.flowAuditfn(datapair,stampUrl); | |||||
learun.layerClose(window.name); | |||||
setTimeout(function () { | |||||
learun.loading(false); | |||||
}); | |||||
}); | }); | ||||
} | } | ||||
@@ -45,7 +45,7 @@ var bootstrap = function ($, learun) { | |||||
title: '编辑功能', | title: '编辑功能', | ||||
url: top.$.rootUrl + '/LR_SystemModule/Module/Form?keyValue=' + keyValue, | url: top.$.rootUrl + '/LR_SystemModule/Module/Form?keyValue=' + keyValue, | ||||
height: 430, | height: 430, | ||||
width: 700, | |||||
width: 755, | |||||
btn: null | btn: null | ||||
}); | }); | ||||
} | } | ||||
@@ -204,18 +204,18 @@ | |||||
if (dfop.isShowNum) { | if (dfop.isShowNum) { | ||||
var $num = $('<div class="jfgrid-border-cell jfgrid-border-num"></div>'); | var $num = $('<div class="jfgrid-border-cell jfgrid-border-num"></div>'); | ||||
$border.prepend($num); | $border.prepend($num); | ||||
_width += 30; | |||||
_width += 60; | |||||
} | } | ||||
if (dfop.isMultiselect) { | if (dfop.isMultiselect) { | ||||
var $cb = $('<div class="jfgrid-border-cell jfgrid-border-cb"><input role="checkbox" id="jfgrid_all_cb_' + dfop.id + '" type="checkbox"></div>') | var $cb = $('<div class="jfgrid-border-cell jfgrid-border-cb"><input role="checkbox" id="jfgrid_all_cb_' + dfop.id + '" type="checkbox"></div>') | ||||
.css('left', _width + 'px').css('line-height', (dfop._headHeight - 1) + 'px'); | .css('left', _width + 'px').css('line-height', (dfop._headHeight - 1) + 'px'); | ||||
$border.prepend($cb); | $border.prepend($cb); | ||||
_width += 30; | |||||
_width += 60; | |||||
} | } | ||||
if (dfop.isSubGrid) { | if (dfop.isSubGrid) { | ||||
var $sub = $('<div class="jfgrid-border-cell jfgrid-border-sub"></div>').css('left', _width + 'px'); | var $sub = $('<div class="jfgrid-border-cell jfgrid-border-sub"></div>').css('left', _width + 'px'); | ||||
$border.prepend($sub); | $border.prepend($sub); | ||||
_width += 30; | |||||
_width += 60; | |||||
} | } | ||||
dfop._borderLeftPadding = _width; | dfop._borderLeftPadding = _width; | ||||
@@ -8086,8 +8086,36 @@ | |||||
<Content Include="wsbsdt\layui\font\iconfont.eot" /> | <Content Include="wsbsdt\layui\font\iconfont.eot" /> | ||||
<Content Include="wsbsdt\layui\font\iconfont.ttf" /> | <Content Include="wsbsdt\layui\font\iconfont.ttf" /> | ||||
<Content Include="wsbsdt\layui\font\iconfont.woff" /> | <Content Include="wsbsdt\layui\font\iconfont.woff" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile10.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile11.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile12.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile13.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile14.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile15.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile16.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile17.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile18.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile19.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile2.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile2.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile20.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile21.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile22.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile23.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile24.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile25.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile26.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile27.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile28.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile29.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile3.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile3.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile30.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile31.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile32.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile33.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile34.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile35.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile36.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile37.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile4.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile4.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile5.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile5.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile6.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile6.pubxml" /> | ||||
@@ -157,6 +157,10 @@ | |||||
} else { | } else { | ||||
} | } | ||||
break; | break; | ||||
case 'open':// 窗口 | |||||
var newWin = window.open(o.F_UrlAddress); | |||||
newWin.location.replace(o.F_UrlAddress); | |||||
break; | |||||
case "expand": | case "expand": | ||||
var n = m.next(); | var n = m.next(); | ||||
if (n.is(":visible")) { | if (n.is(":visible")) { | ||||
@@ -127,6 +127,10 @@ | |||||
h.frameTab.open(q) | h.frameTab.open(q) | ||||
} else { } | } else { } | ||||
break; | break; | ||||
case "open":// 窗口 | |||||
var newWin = window.open(q.F_UrlAddress); | |||||
newWin.location.replace(q.F_UrlAddress); | |||||
break; | |||||
case "expand": | case "expand": | ||||
if (!o.hasClass("active")) { | if (!o.hasClass("active")) { | ||||
// console.log(11) | // console.log(11) | ||||
@@ -152,6 +156,10 @@ | |||||
h.frameTab.open(q) | h.frameTab.open(q) | ||||
} else { } | } else { } | ||||
break; | break; | ||||
case "open":// 窗口 | |||||
var newWin = window.open(q.F_UrlAddress); | |||||
newWin.location.replace(q.F_UrlAddress); | |||||
break; | |||||
case "expand": | case "expand": | ||||
var p = o.next(); | var p = o.next(); | ||||
if (p.is(":visible")) { | if (p.is(":visible")) { | ||||
@@ -47,7 +47,7 @@ | |||||
position: absolute; | position: absolute; | ||||
top: 0; | top: 0; | ||||
left: 0; | left: 0; | ||||
width: 30px; | |||||
width: 60px; | |||||
height: 100%; | height: 100%; | ||||
border-right: 1px solid #ccc; | border-right: 1px solid #ccc; | ||||
} | } | ||||
@@ -165,7 +165,7 @@ | |||||
left: 0; | left: 0; | ||||
font-size: 12px; | font-size: 12px; | ||||
color: #333; | color: #333; | ||||
width: 30px; | |||||
width: 60px; | |||||
line-height: 27px; | line-height: 27px; | ||||
border-bottom: 1px solid #ccc; | border-bottom: 1px solid #ccc; | ||||
border-right: 1px solid #ccc; | border-right: 1px solid #ccc; | ||||
@@ -154,7 +154,7 @@ | |||||
op.running.statisticData[item.name] = op.running.statisticData[item.name] || 0; | op.running.statisticData[item.name] = op.running.statisticData[item.name] || 0; | ||||
op.running.statisticData[item.name] += (parseFloat(text || 0) - rowItem.statisticsNum); | op.running.statisticData[item.name] += (parseFloat(text || 0) - rowItem.statisticsNum); | ||||
rowItem.statisticsNum = parseFloat(text || 0); | rowItem.statisticsNum = parseFloat(text || 0); | ||||
$('#jfgrid_statistic_' + op.id + ' [name="' + item.name + '"]').text(op.running.statisticData[item.name]); | |||||
$('#jfgrid_statistic_' + op.id + ' [name="' + item.name + '"]').text(op.running.statisticData[item.name].toFixed(2)); | |||||
} | } | ||||
$expend = null; | $expend = null; | ||||
@@ -174,7 +174,7 @@ | |||||
op.running.statisticData[item.name] = op.running.statisticData[item.name] || 0; | op.running.statisticData[item.name] = op.running.statisticData[item.name] || 0; | ||||
op.running.statisticData[item.name] += (parseFloat(text || 0) - rowItem.statisticsNum); | op.running.statisticData[item.name] += (parseFloat(text || 0) - rowItem.statisticsNum); | ||||
rowItem.statisticsNum = parseFloat(text || 0); | rowItem.statisticsNum = parseFloat(text || 0); | ||||
$('#jfgrid_statistic_' + op.id + ' [name="' + item.name + '"]').text(op.running.statisticData[item.name]); | |||||
$('#jfgrid_statistic_' + op.id + ' [name="' + item.name + '"]').text(op.running.statisticData[item.name].toFixed(2)); | |||||
} | } | ||||
}, value, row, op, rowItem.$cell); | }, value, row, op, rowItem.$cell); | ||||
@@ -449,7 +449,7 @@ | |||||
op.running.statisticData[item.name] += (parseFloat(rowItem.text || 0) - rowItem.statisticsNum); | op.running.statisticData[item.name] += (parseFloat(rowItem.text || 0) - rowItem.statisticsNum); | ||||
rowItem.statisticsNum = parseFloat(rowItem.text || 0); | rowItem.statisticsNum = parseFloat(rowItem.text || 0); | ||||
$('#jfgrid_statistic_' + op.id + ' [name="' + item.name + '"]').text(op.running.statisticData[item.name]); | |||||
$('#jfgrid_statistic_' + op.id + ' [name="' + item.name + '"]').text(op.running.statisticData[item.name].toFixed(2)); | |||||
} | } | ||||
$expend = null; | $expend = null; | ||||
@@ -998,20 +998,20 @@ | |||||
// 判断是否有序号列 | // 判断是否有序号列 | ||||
if (op.isShowNum) { | if (op.isShowNum) { | ||||
$border.append('<div class="jfgrid-border-cell jfgrid-border-num"></div>'); | $border.append('<div class="jfgrid-border-cell jfgrid-border-num"></div>'); | ||||
op.running.leftWidth += 30; | |||||
op.running.leftWidth += 60; | |||||
} | } | ||||
// 判断是否允许多选 | // 判断是否允许多选 | ||||
if (op.isMultiselect) { | if (op.isMultiselect) { | ||||
var $cb = $('<div class="jfgrid-border-cell jfgrid-border-cb"><img id="jfgrid_all_cb_' + op.id + '" src="' + imageurl + cb[0] + '" /></div>') | var $cb = $('<div class="jfgrid-border-cell jfgrid-border-cb"><img id="jfgrid_all_cb_' + op.id + '" src="' + imageurl + cb[0] + '" /></div>') | ||||
.css({ 'left': op.running.leftWidth, 'line-height': (op.running.headHeight - 1) + 'px' }); | .css({ 'left': op.running.leftWidth, 'line-height': (op.running.headHeight - 1) + 'px' }); | ||||
$border.append($cb); | $border.append($cb); | ||||
op.running.leftWidth += 30; | |||||
op.running.leftWidth += 60; | |||||
} | } | ||||
// 是否有展开 | // 是否有展开 | ||||
if (op.isSubGrid) { | if (op.isSubGrid) { | ||||
var $sub = $('<div class="jfgrid-border-cell jfgrid-border-sub"></div>').css('left', op.running.leftWidth); | var $sub = $('<div class="jfgrid-border-cell jfgrid-border-sub"></div>').css('left', op.running.leftWidth); | ||||
$border.append($sub); | $border.append($sub); | ||||
op.running.leftWidth += 30; | |||||
op.running.leftWidth += 60; | |||||
} | } | ||||
op.running.leftWidth += op.running.frozenleft; | op.running.leftWidth += op.running.frozenleft; | ||||
$self.css({ 'padding-top': op.running.headHeight }); | $self.css({ 'padding-top': op.running.headHeight }); | ||||
@@ -1281,7 +1281,7 @@ | |||||
row['jfcheck'].$cell.css({ 'top': row['jfcheck'].top, 'left': row['jfcheck'].left, 'text-align': 'center', 'height': op.rowHeight, 'line-height': (op.rowHeight - 1) + 'px' }); | row['jfcheck'].$cell.css({ 'top': row['jfcheck'].top, 'left': row['jfcheck'].left, 'text-align': 'center', 'height': op.rowHeight, 'line-height': (op.rowHeight - 1) + 'px' }); | ||||
$left.append(row['jfcheck'].$cell); | $left.append(row['jfcheck'].$cell); | ||||
_left += 30; | |||||
_left += 60; | |||||
} | } | ||||
// 是否有子表选项 | // 是否有子表选项 | ||||
if (op.isSubGrid) { | if (op.isSubGrid) { | ||||
@@ -1293,7 +1293,7 @@ | |||||
}; | }; | ||||
row['jfsubGrid'].$cell.css({ 'top': row['jfsubGrid'].top, 'left': row['jfsubGrid'].left, 'text-align': 'center', 'height': op.rowHeight, 'line-height': (op.rowHeight - 1) + 'px' }); | row['jfsubGrid'].$cell.css({ 'top': row['jfsubGrid'].top, 'left': row['jfsubGrid'].left, 'text-align': 'center', 'height': op.rowHeight, 'line-height': (op.rowHeight - 1) + 'px' }); | ||||
$left.append(row['jfsubGrid'].$cell); | $left.append(row['jfsubGrid'].$cell); | ||||
_left += 30; | |||||
_left += 60; | |||||
} | } | ||||
// 加载固定列数据 | // 加载固定列数据 | ||||
@@ -2153,7 +2153,7 @@ | |||||
isAutoHeight: false, // 自动适应表格高度 | isAutoHeight: false, // 自动适应表格高度 | ||||
height: 0, | height: 0, | ||||
rowHeight: 28, // 行高 | rowHeight: 28, // 行高 | ||||
numRowWitdh: 30 // 序号列宽度 | |||||
numRowWitdh: 60 // 序号列宽度 | |||||
}; | }; | ||||
@@ -32,7 +32,14 @@ var bootstrap = function ($, learun) { | |||||
parent.layer.close(index); //再执行关闭 | parent.layer.close(index); //再执行关闭 | ||||
return; | return; | ||||
} | } | ||||
learun.frameTab.currentIframe().$('#' + gridId).jfGridSet('reloadall'); | |||||
let tableisPage = learun.frameTab.currentIframe().$('#' + gridId).jfGridGet('settingInfo').isPage; | |||||
if (tableisPage) { | |||||
learun.frameTab.currentIframe().$('#' + gridId).jfGridSet('reloadall'); | |||||
} | |||||
//learun.frameTab.currentIframe().$('#' + gridId).jfGridSet('reloadall'); | |||||
columnModel = learun.frameTab.currentIframe().$('#' + gridId).jfGridGet('settingInfo').headData; | columnModel = learun.frameTab.currentIframe().$('#' + gridId).jfGridGet('settingInfo').headData; | ||||
} | } | ||||
@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// 日 期:2019-10-28 11:48 | /// 日 期:2019-10-28 11:48 | ||||
/// 描 述:学籍异动 | /// 描 述:学籍异动 | ||||
/// </summary> | /// </summary> | ||||
public class StuInfoBasicChangeEntity | |||||
public class StuInfoBasicChangeEntity | |||||
{ | { | ||||
#region 实体成员 | #region 实体成员 | ||||
/// <summary> | /// <summary> | ||||
@@ -119,6 +119,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
#endregion | #endregion | ||||
#region 扩展字段 | #region 扩展字段 | ||||
[NotMapped] | |||||
public string Grade { get; set; } | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } | ||||
@@ -2303,7 +2303,20 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad | |||||
num++; | num++; | ||||
if (!academicYearNo_dr.Equals(AcademicYearNo) || !semester_dr.Equals(Semester)) | if (!academicYearNo_dr.Equals(AcademicYearNo) || !semester_dr.Equals(Semester)) | ||||
{ | { | ||||
dr["导入错误"] = "学年学期与查询条件不符!"; | |||||
dr["导入错误"] = "学年学期与查询条件不匹配!"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
if (!classinfo_dr.Equals(classInfoEntity.ClassName)) | |||||
{ | |||||
dr["导入错误"] = "班级与查询条件班级(" + classInfoEntity.ClassName + ")不匹配!"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
if (!lessoninfo_dr.Equals(lessonInfoEntity.LessonName)) | |||||
{ | |||||
dr["导入错误"] = "课程与查询条件课程(" + lessonInfoEntity.LessonName + ")不匹配!"; | |||||
failDt.Rows.Add(dr.ItemArray); | failDt.Rows.Add(dr.ItemArray); | ||||
continue; | continue; | ||||
} | } | ||||
@@ -2319,6 +2332,12 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad | |||||
var TermInScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["期中成绩"].ToString().Trim()) ? "0" : dr["期中成绩"].ToString().Trim()); | var TermInScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["期中成绩"].ToString().Trim()) ? "0" : dr["期中成绩"].ToString().Trim()); | ||||
var TermEndScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["期末成绩"].ToString().Trim()) ? "0" : dr["期末成绩"].ToString().Trim()); | var TermEndScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["期末成绩"].ToString().Trim()) ? "0" : dr["期末成绩"].ToString().Trim()); | ||||
var OtherScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["其他成绩"].ToString().Trim()) ? "0" : dr["其他成绩"].ToString().Trim()); | var OtherScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["其他成绩"].ToString().Trim()) ? "0" : dr["其他成绩"].ToString().Trim()); | ||||
if (OrdinaryScore < 0 || TermInScore < 0 || TermEndScore < 0 || OtherScore < 0) | |||||
{ | |||||
dr["导入错误"] = "成绩必须大于0!"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
var Score = Math.Round(Convert.ToDouble(OrdinaryScore * (stuSelectLessonListEntity.OrdinaryScoreScale / 100) + | var Score = Math.Round(Convert.ToDouble(OrdinaryScore * (stuSelectLessonListEntity.OrdinaryScoreScale / 100) + | ||||
TermInScore * (stuSelectLessonListEntity.TermInScoreScale / 100) + | TermInScore * (stuSelectLessonListEntity.TermInScoreScale / 100) + | ||||
TermEndScore * (stuSelectLessonListEntity.TermEndScoreScale / 100) + | TermEndScore * (stuSelectLessonListEntity.TermEndScoreScale / 100) + | ||||
@@ -2427,7 +2446,6 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad | |||||
var lessoninfo_dr = dr["课程名称"].ToString().Trim(); | var lessoninfo_dr = dr["课程名称"].ToString().Trim(); | ||||
var classRoominfo_dr = dr["教室名称"].ToString().Trim(); | var classRoominfo_dr = dr["教室名称"].ToString().Trim(); | ||||
var lessonSection_dr = dr["节次"].ToString().Trim(); | var lessonSection_dr = dr["节次"].ToString().Trim(); | ||||
//var lessonNo_dr = lessonInfoList.FirstOrDefault(x => x.LessonName == lessoninfo_dr)?.LessonNo; | //var lessonNo_dr = lessonInfoList.FirstOrDefault(x => x.LessonName == lessoninfo_dr)?.LessonNo; | ||||
//var classRoomNo_dr = classRoomList.FirstOrDefault(x => x.ClassroomName == classRoominfo_dr)?.ClassroomNo; | //var classRoomNo_dr = classRoomList.FirstOrDefault(x => x.ClassroomName == classRoominfo_dr)?.ClassroomNo; | ||||
if (!string.IsNullOrEmpty(stuno)) | if (!string.IsNullOrEmpty(stuno)) | ||||
@@ -2436,12 +2454,30 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad | |||||
var item = list.Find(x => x.StuNo == stuno && x.LessonNo == LessonNo && x.ClassRoomNo == ClassRoomNo && x.LessonSection == LessonSection); | var item = list.Find(x => x.StuNo == stuno && x.LessonNo == LessonNo && x.ClassRoomNo == ClassRoomNo && x.LessonSection == LessonSection); | ||||
if (!academicYearNo_dr.Equals(AcademicYearNo) || !semester_dr.Equals(semester_dr)) | if (!academicYearNo_dr.Equals(AcademicYearNo) || !semester_dr.Equals(semester_dr)) | ||||
{ | { | ||||
dr["导入错误"] = "学年学期与查询条件不符!"; | |||||
dr["导入错误"] = "学年学期与查询条件不匹配!"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
if (!lessoninfo_dr.Equals(lessonInfoEntity.LessonName)) | |||||
{ | |||||
dr["导入错误"] = "课程与查询条件课程(" + lessonInfoEntity.LessonName + ")不匹配!"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
if (!classRoominfo_dr.Equals(classRoomEntity.ClassroomName)) | |||||
{ | |||||
dr["导入错误"] = "教室与查询条件教室(" + classRoomEntity.ClassroomName + ")不匹配!"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
if (!lessonSection_dr.Equals(LessonSection)) | |||||
{ | |||||
dr["导入错误"] = "节次与查询条件节次(" + LessonSection + ")不匹配!"; | |||||
failDt.Rows.Add(dr.ItemArray); | failDt.Rows.Add(dr.ItemArray); | ||||
continue; | continue; | ||||
} | } | ||||
if (!lessoninfo_dr.Equals(lessonInfoEntity.LessonName) || !classRoominfo_dr.Equals(classRoomEntity.ClassroomName) || !lessonSection_dr.Equals(LessonSection)) | |||||
//if (item == null) | |||||
if (item == null) | |||||
{ | { | ||||
dr["导入错误"] = "课程:" + lessonInfoEntity.LessonName + "在" + LessonSection + "节次找不到学号为" + stuno + "的学生"; | dr["导入错误"] = "课程:" + lessonInfoEntity.LessonName + "在" + LessonSection + "节次找不到学号为" + stuno + "的学生"; | ||||
failDt.Rows.Add(dr.ItemArray); | failDt.Rows.Add(dr.ItemArray); | ||||
@@ -2451,6 +2487,13 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad | |||||
var TermInScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["期中成绩"].ToString().Trim()) ? "0" : dr["期中成绩"].ToString().Trim()); | var TermInScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["期中成绩"].ToString().Trim()) ? "0" : dr["期中成绩"].ToString().Trim()); | ||||
var TermEndScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["期末成绩"].ToString().Trim()) ? "0" : dr["期末成绩"].ToString().Trim()); | var TermEndScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["期末成绩"].ToString().Trim()) ? "0" : dr["期末成绩"].ToString().Trim()); | ||||
var OtherScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["其他成绩"].ToString().Trim()) ? "0" : dr["其他成绩"].ToString().Trim()); | var OtherScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["其他成绩"].ToString().Trim()) ? "0" : dr["其他成绩"].ToString().Trim()); | ||||
if (OrdinaryScore < 0 || TermInScore < 0 || TermEndScore < 0 || OtherScore < 0) | |||||
{ | |||||
dr["导入错误"] = "成绩必须大于0!"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
var Score = Math.Round(Convert.ToDouble(OrdinaryScore * (stuSelectLessonListOfElectiveEntity.OrdinaryScoreScale / 100) + | var Score = Math.Round(Convert.ToDouble(OrdinaryScore * (stuSelectLessonListOfElectiveEntity.OrdinaryScoreScale / 100) + | ||||
TermInScore * (stuSelectLessonListOfElectiveEntity.TermInScoreScale / 100) + | TermInScore * (stuSelectLessonListOfElectiveEntity.TermInScoreScale / 100) + | ||||
TermEndScore * (stuSelectLessonListOfElectiveEntity.TermEndScoreScale / 100) + | TermEndScore * (stuSelectLessonListOfElectiveEntity.TermEndScoreScale / 100) + | ||||
@@ -441,6 +441,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public (DataTable failDt, int snum, int fnum) ExecuteImportExcelForNotPass(DataTable dt, string fileGuid, | |||||
string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return stuScoreNotPassService.ExecuteImportExcelForNotPass(dt, fileGuid, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } |
@@ -123,6 +123,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <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); | ||||
/// <summary> | |||||
/// 补考成绩导入 | |||||
/// </summary> | |||||
/// <param name="dt"></param> | |||||
/// <param name="fileGuid"></param> | |||||
/// <param name="queryJson"></param> | |||||
/// <returns></returns> | |||||
(DataTable failDt, int snum, int fnum) ExecuteImportExcelForNotPass(DataTable dt, string fileGuid, | |||||
string queryJson); | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } |
@@ -1,4 +1,6 @@ | |||||
using Dapper; | using Dapper; | ||||
using Learun.Cache.Base; | |||||
using Learun.Cache.Factory; | |||||
using Learun.DataBase.Repository; | using Learun.DataBase.Repository; | ||||
using Learun.Util; | using Learun.Util; | ||||
using System; | using System; | ||||
@@ -76,6 +78,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
#endregion | #endregion | ||||
#region 缓存定义 | |||||
private ICache cache = CacheFactory.CaChe(); | |||||
private string cacheKey = "Learun_adms_excelError_"; | |||||
#endregion | |||||
#region 获取数据 | #region 获取数据 | ||||
/// <summary> | /// <summary> | ||||
@@ -186,7 +192,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
// @" left join StuScoreNotPass ssnp on ssnp.StuNo = a.StuNo and ssnp.lessonno = a.lessonno "); | // @" left join StuScoreNotPass ssnp on ssnp.StuNo = a.StuNo and ssnp.lessonno = a.lessonno "); | ||||
// strSql.Append(@" where 1=1 and ( ssnp.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus=1) and a.LessonSortNo='1' ) | // strSql.Append(@" where 1=1 and ( ssnp.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus=1) and a.LessonSortNo='1' ) | ||||
// and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) "); | // and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) "); | ||||
//新 | //新 | ||||
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 | 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 | ||||
from StuScore a | from StuScore a | ||||
@@ -793,6 +799,140 @@ order by bb.ScoreId"; | |||||
} | } | ||||
/// <summary> | |||||
/// 导入学生成绩--补考成绩 | |||||
/// </summary> | |||||
/// <param name="dt"></param> | |||||
/// <returns></returns> | |||||
public (DataTable failDt, int snum, int fnum) ExecuteImportExcelForNotPass(DataTable dt, string fileGuid, string queryJson) | |||||
{ | |||||
//成功记录数 | |||||
int snum = 0; | |||||
//总记录数 | |||||
int num = 0; | |||||
var db = this.BaseRepository("CollegeMIS"); | |||||
var msg = ""; | |||||
try | |||||
{ | |||||
db.BeginTrans(); | |||||
// 创建一个datatable容器用于保存导入失败的数据 | |||||
DataTable failDt = new DataTable(); | |||||
var queryParam = queryJson.ToJObject(); | |||||
var F_SchoolId = queryParam["F_SchoolId"].ToString(); | |||||
var AcademicYearNo = queryParam["AcademicYearNo"].ToString(); | |||||
var Semester = queryParam["Semester"].ToString(); | |||||
var LessonNo = queryParam["LessonNo"].ToString(); | |||||
var ClassNo = queryParam["ClassNo"].ToString(); | |||||
var classInfoList = db.FindList<ClassInfoEntity>(); | |||||
var lessonInfoList = db.FindList<LessonInfoEntity>(); | |||||
var classInfoEntity = classInfoList.FirstOrDefault(x => x.ClassNo == ClassNo); | |||||
var lessonInfoEntity = lessonInfoList.FirstOrDefault(x => x.LessonNo == LessonNo && x.CheckMark == true); | |||||
if (classInfoEntity != null && lessonInfoEntity != null) | |||||
{ | |||||
//当前班级学生成绩 | |||||
var list = GetList(queryJson).ToList(); | |||||
foreach (DataColumn dc in dt.Columns) | |||||
{ | |||||
failDt.Columns.Add(dc.ColumnName, dc.DataType); | |||||
} | |||||
failDt.Columns.Add("导入错误", typeof(string)); | |||||
dt.Columns.Add("导入错误", typeof(string)); | |||||
foreach (DataRow dr in dt.Rows) | |||||
{ | |||||
try | |||||
{ | |||||
var stuno = dr["学号"].ToString().Trim(); | |||||
var academicYearNo_dr = dr["学年"].ToString().Trim(); | |||||
var semester_dr = dr["学期"].ToString().Trim(); | |||||
var lessoninfo_dr = dr["课程名称"].ToString().Trim(); | |||||
var classinfo_dr = dr["班级"].ToString().Trim(); | |||||
if (!string.IsNullOrEmpty(stuno)) | |||||
{ | |||||
num++; | |||||
if (!academicYearNo_dr.Equals(AcademicYearNo) || !semester_dr.Equals(Semester)) | |||||
{ | |||||
dr["导入错误"] = "学年学期与查询条件不符!"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
if (!classinfo_dr.Equals(classInfoEntity.ClassName)) | |||||
{ | |||||
dr["导入错误"] = "班级与查询条件班级(" + classInfoEntity.ClassName + ")不匹配!"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
if (!lessoninfo_dr.Equals(lessonInfoEntity.LessonName)) | |||||
{ | |||||
dr["导入错误"] = "课程与查询条件课程(" + lessonInfoEntity.LessonName + ")不匹配!"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
var item = list.Find(x => x.StuNo == stuno && x.LessonNo == LessonNo && x.ClassNo == ClassNo); | |||||
if (item == null) | |||||
{ | |||||
dr["导入错误"] = "课程:" + lessonInfoEntity.LessonName + ",班级:" + classInfoEntity.ClassName + "找不到学号为" + stuno + "的学生"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
var TermEndScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["期末成绩"].ToString().Trim()) ? "0" : dr["期末成绩"].ToString().Trim()); | |||||
if (TermEndScore < 0) | |||||
{ | |||||
dr["导入错误"] = "成绩必须大于0!"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
var Score = Math.Round(TermEndScore, MidpointRounding.AwayFromZero); | |||||
var remark = dr["备注"].ToString().Trim(); | |||||
db.ExecuteBySql($"update StuScoreNotPass set TermEndScore={TermEndScore},Score={Score},Remark='{remark}' where ScoreId='{item.ScoreId}' "); | |||||
} | |||||
else | |||||
{ | |||||
break; | |||||
} | |||||
} | |||||
catch (Exception e) | |||||
{ | |||||
dr["导入错误"] = "出现异常:" + e.Message; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
} | |||||
db.Commit(); | |||||
// 写入缓存如果有未导入的数据 | |||||
if (failDt.Rows.Count > 0) | |||||
{ | |||||
string errordt = failDt.ToJson(); | |||||
cache.Write<string>(cacheKey + fileGuid, errordt, CacheId.excel); | |||||
} | |||||
snum = (num - failDt.Rows.Count) > 0 ? num - failDt.Rows.Count : 0; | |||||
} | |||||
return (failDt, snum, failDt.Rows.Count); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -449,6 +449,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
public (DataTable failDt, int snum, int fnum) ExecuteImportExcelForNotPassTwo(DataTable dt, string fileGuid, | |||||
string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return stuScoreNotPassTwoService.ExecuteImportExcelForNotPassTwo(dt, fileGuid, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } |
@@ -126,6 +126,15 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
void SubmitStuScore(string AcademicYearNo, string Semester, string LessonNo, string TeachClassNo, string EmpNo); | void SubmitStuScore(string AcademicYearNo, string Semester, string LessonNo, string TeachClassNo, string EmpNo); | ||||
/// <summary> | |||||
/// 补考成绩导入 | |||||
/// </summary> | |||||
/// <param name="dt"></param> | |||||
/// <param name="fileGuid"></param> | |||||
/// <param name="queryJson"></param> | |||||
/// <returns></returns> | |||||
(DataTable failDt, int snum, int fnum) ExecuteImportExcelForNotPassTwo(DataTable dt, string fileGuid, | |||||
string queryJson); | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } |
@@ -1,4 +1,6 @@ | |||||
using Dapper; | using Dapper; | ||||
using Learun.Cache.Base; | |||||
using Learun.Cache.Factory; | |||||
using Learun.DataBase.Repository; | using Learun.DataBase.Repository; | ||||
using Learun.Util; | using Learun.Util; | ||||
using System; | using System; | ||||
@@ -18,6 +20,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
public class StuScoreNotPassTwoService : RepositoryFactory | public class StuScoreNotPassTwoService : RepositoryFactory | ||||
{ | { | ||||
#region 缓存定义 | |||||
private ICache cache = CacheFactory.CaChe(); | |||||
private string cacheKey = "Learun_adms_excelError_"; | |||||
#endregion | |||||
#region 获取数据 | #region 获取数据 | ||||
/// <summary> | /// <summary> | ||||
@@ -839,6 +847,140 @@ order by bb.ScoreId"; | |||||
} | } | ||||
/// <summary> | |||||
/// 导入学生成绩--补考成绩 | |||||
/// </summary> | |||||
/// <param name="dt"></param> | |||||
/// <returns></returns> | |||||
public (DataTable failDt, int snum, int fnum) ExecuteImportExcelForNotPassTwo(DataTable dt, string fileGuid, string queryJson) | |||||
{ | |||||
//成功记录数 | |||||
int snum = 0; | |||||
//总记录数 | |||||
int num = 0; | |||||
var db = this.BaseRepository("CollegeMIS"); | |||||
var msg = ""; | |||||
try | |||||
{ | |||||
db.BeginTrans(); | |||||
// 创建一个datatable容器用于保存导入失败的数据 | |||||
DataTable failDt = new DataTable(); | |||||
var queryParam = queryJson.ToJObject(); | |||||
var F_SchoolId = queryParam["F_SchoolId"].ToString(); | |||||
var AcademicYearNo = queryParam["AcademicYearNo"].ToString(); | |||||
var Semester = queryParam["Semester"].ToString(); | |||||
var LessonNo = queryParam["LessonNo"].ToString(); | |||||
var ClassNo = queryParam["ClassNo"].ToString(); | |||||
var classInfoList = db.FindList<ClassInfoEntity>(); | |||||
var lessonInfoList = db.FindList<LessonInfoEntity>(); | |||||
var classInfoEntity = classInfoList.FirstOrDefault(x => x.ClassNo == ClassNo); | |||||
var lessonInfoEntity = lessonInfoList.FirstOrDefault(x => x.LessonNo == LessonNo && x.CheckMark == true); | |||||
if (classInfoEntity != null && lessonInfoEntity != null) | |||||
{ | |||||
//当前班级学生成绩 | |||||
var list = GetList(queryJson).ToList(); | |||||
foreach (DataColumn dc in dt.Columns) | |||||
{ | |||||
failDt.Columns.Add(dc.ColumnName, dc.DataType); | |||||
} | |||||
failDt.Columns.Add("导入错误", typeof(string)); | |||||
dt.Columns.Add("导入错误", typeof(string)); | |||||
foreach (DataRow dr in dt.Rows) | |||||
{ | |||||
try | |||||
{ | |||||
var stuno = dr["学号"].ToString().Trim(); | |||||
var academicYearNo_dr = dr["学年"].ToString().Trim(); | |||||
var semester_dr = dr["学期"].ToString().Trim(); | |||||
var lessoninfo_dr = dr["课程名称"].ToString().Trim(); | |||||
var classinfo_dr = dr["班级"].ToString().Trim(); | |||||
if (!string.IsNullOrEmpty(stuno)) | |||||
{ | |||||
num++; | |||||
if (!academicYearNo_dr.Equals(AcademicYearNo) || !semester_dr.Equals(Semester)) | |||||
{ | |||||
dr["导入错误"] = "学年学期与查询条件不匹配!"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
if (!classinfo_dr.Equals(classInfoEntity.ClassName)) | |||||
{ | |||||
dr["导入错误"] = "班级与查询条件班级(" + classInfoEntity.ClassName + ")不匹配!"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
if (!lessoninfo_dr.Equals(lessonInfoEntity.LessonName)) | |||||
{ | |||||
dr["导入错误"] = "课程与查询条件课程(" + lessonInfoEntity.LessonName + ")不匹配!"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
var item = list.Find(x => x.StuNo == stuno && x.LessonNo == LessonNo && x.ClassNo == ClassNo); | |||||
if (item == null) | |||||
{ | |||||
dr["导入错误"] = "课程:" + lessonInfoEntity.LessonName + ",班级:" + classInfoEntity.ClassName + "找不到学号为" + stuno + "的学生"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
var TermEndScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["期末成绩"].ToString().Trim()) ? "0" : dr["期末成绩"].ToString().Trim()); | |||||
if (TermEndScore < 0) | |||||
{ | |||||
dr["导入错误"] = "成绩必须大于0!"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
var Score = Math.Round(TermEndScore, MidpointRounding.AwayFromZero); | |||||
var remark = dr["备注"].ToString().Trim(); | |||||
db.ExecuteBySql($"update StuScoreNotPassTwo set TermEndScore={TermEndScore},Score={Score},Remark='{remark}' where ScoreId='{item.ScoreId}' "); | |||||
} | |||||
else | |||||
{ | |||||
break; | |||||
} | |||||
} | |||||
catch (Exception e) | |||||
{ | |||||
dr["导入错误"] = "出现异常:" + e.Message; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
} | |||||
db.Commit(); | |||||
// 写入缓存如果有未导入的数据 | |||||
if (failDt.Rows.Count > 0) | |||||
{ | |||||
string errordt = failDt.ToJson(); | |||||
cache.Write<string>(cacheKey + fileGuid, errordt, CacheId.excel); | |||||
} | |||||
snum = (num - failDt.Rows.Count) > 0 ? num - failDt.Rows.Count : 0; | |||||
} | |||||
return (failDt, snum, failDt.Rows.Count); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } |
@@ -591,7 +591,8 @@ namespace Learun.Application.WorkFlow | |||||
p.F_ParentProcessId, | p.F_ParentProcessId, | ||||
p.F_CreateUserId, | p.F_CreateUserId, | ||||
p.F_CreateUserName, | p.F_CreateUserName, | ||||
p.F_IsStart | |||||
p.F_IsStart, | |||||
d.F_DepartmentId,d.F_FullName | |||||
FROM | FROM | ||||
( | ( | ||||
SELECT | SELECT | ||||
@@ -617,6 +618,9 @@ namespace Learun.Application.WorkFlow | |||||
) r | ) r | ||||
LEFT JOIN LR_NWF_Task t ON t.F_Id = r.F_TaskId | LEFT JOIN LR_NWF_Task t ON t.F_Id = r.F_TaskId | ||||
LEFT JOIN LR_NWF_Process p ON p.F_Id = t.F_ProcessId | LEFT JOIN LR_NWF_Process p ON p.F_Id = t.F_ProcessId | ||||
LEFT JOIN( | |||||
SELECT t.F_DepartmentId,t.F_FullName,u.F_RealName,u.F_UserId | |||||
FROM LR_Base_Department t left join LR_BASE_USER u on t.F_DepartmentId = u.F_DepartmentId) d ON d.F_UserId=t.F_CreateUserId | |||||
WHERE | WHERE | ||||
t.F_IsFinished = 0 AND (p.F_IsFinished = 0 OR t.F_Type = 2 OR t.F_Type = 4 OR t.F_Type = 6)"); | t.F_IsFinished = 0 AND (p.F_IsFinished = 0 OR t.F_Type = 2 OR t.F_Type = 4 OR t.F_Type = 6)"); | ||||
@@ -633,7 +637,7 @@ namespace Learun.Application.WorkFlow | |||||
if (!queryParam["keyword"].IsEmpty()) | if (!queryParam["keyword"].IsEmpty()) | ||||
{ | { | ||||
keyword = "%" + queryParam["keyword"].ToString() + "%"; | keyword = "%" + queryParam["keyword"].ToString() + "%"; | ||||
strSql.Append(" AND ( p.F_Title like @keyword OR p.F_SchemeName like @keyword ) "); | |||||
strSql.Append(" AND ( p.F_Title like @keyword OR p.F_SchemeName like @keyword OR p.F_CreateUserName like @keyword OR d.F_FullName like @keyword ) "); | |||||
} | } | ||||
if (!string.IsNullOrEmpty(schemeCode)) | if (!string.IsNullOrEmpty(schemeCode)) | ||||
@@ -646,16 +650,16 @@ namespace Learun.Application.WorkFlow | |||||
strSql.Append(" AND t.F_IsBatchAudit = 1 "); | strSql.Append(" AND t.F_IsBatchAudit = 1 "); | ||||
} | } | ||||
var data = this.BaseRepository().FindList<NWFProcessEntity>(strSql.ToString(), new { userId, startTime, endTime, keyword, schemeCode }, pagination); | var data = this.BaseRepository().FindList<NWFProcessEntity>(strSql.ToString(), new { userId, startTime, endTime, keyword, schemeCode }, pagination); | ||||
if (data.Count() > 0) | |||||
{ | |||||
foreach (var item in data) | |||||
{ | |||||
if (!string.IsNullOrEmpty(item.F_CreateUserName)) | |||||
{ | |||||
item.F_DepartmentId = this.BaseRepository().FindEntity<UserEntity>(x => x.F_UserId == item.F_CreateUserId)?.F_DepartmentId; | |||||
} | |||||
} | |||||
} | |||||
//if (data.Count() > 0) | |||||
//{ | |||||
// foreach (var item in data) | |||||
// { | |||||
// if (!string.IsNullOrEmpty(item.F_CreateUserName)) | |||||
// { | |||||
// item.F_DepartmentId = this.BaseRepository().FindEntity<UserEntity>(x => x.F_UserId == item.F_CreateUserId)?.F_DepartmentId; | |||||
// } | |||||
// } | |||||
//} | |||||
return data; | return data; | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -806,11 +810,17 @@ namespace Learun.Application.WorkFlow | |||||
p.F_CreateUserId, | p.F_CreateUserId, | ||||
p.F_CreateUserName, | p.F_CreateUserName, | ||||
p.F_IsStart, | p.F_IsStart, | ||||
t.F_NodeId | |||||
t.F_NodeId, | |||||
d.F_DepartmentId,d.F_FullName | |||||
FROM | FROM | ||||
LR_NWF_Task t | LR_NWF_Task t | ||||
LEFT JOIN LR_NWF_TaskRelation r on r.F_TaskId = t.F_Id | LEFT JOIN LR_NWF_TaskRelation r on r.F_TaskId = t.F_Id | ||||
LEFT JOIN LR_NWF_Process p ON t.F_ProcessId = p.F_Id | LEFT JOIN LR_NWF_Process p ON t.F_ProcessId = p.F_Id | ||||
LEFT JOIN( | |||||
SELECT t.F_DepartmentId,t.F_FullName,u.F_RealName,u.F_UserId | |||||
FROM LR_Base_Department t | |||||
left join LR_BASE_USER u on t.F_DepartmentId = u.F_DepartmentId | |||||
) d ON d.F_UserId=t.F_CreateUserId | |||||
WHERE | WHERE | ||||
(r.F_Result = 1 OR r.F_Result = 2 OR r.F_Result = 4) AND r.F_UserId = @userId | (r.F_Result = 1 OR r.F_Result = 2 OR r.F_Result = 4) AND r.F_UserId = @userId | ||||
"); | "); | ||||
@@ -829,7 +839,7 @@ namespace Learun.Application.WorkFlow | |||||
if (!queryParam["keyword"].IsEmpty()) | if (!queryParam["keyword"].IsEmpty()) | ||||
{ | { | ||||
keyword = "%" + queryParam["keyword"].ToString() + "%"; | keyword = "%" + queryParam["keyword"].ToString() + "%"; | ||||
strSql.Append(" AND ( p.F_ProcessName like @keyword OR p.F_SchemeName like @keyword ) "); | |||||
strSql.Append(" AND ( p.F_Title like @keyword OR p.F_SchemeName like @keyword OR p.F_CreateUserName like @keyword OR p.F_CreateUserName like @keyword OR d.F_FullName like @keyword) "); | |||||
} | } | ||||
if (!string.IsNullOrEmpty(schemeCode)) | if (!string.IsNullOrEmpty(schemeCode)) | ||||
{ | { | ||||
@@ -845,10 +855,10 @@ namespace Learun.Application.WorkFlow | |||||
{ | { | ||||
item.NextNodeIsAudited = true; | item.NextNodeIsAudited = true; | ||||
} | } | ||||
if (!string.IsNullOrEmpty(item.F_CreateUserName)) | |||||
{ | |||||
item.F_DepartmentId = this.BaseRepository().FindEntity<UserEntity>(x => x.F_UserId == item.F_CreateUserId)?.F_DepartmentId; | |||||
} | |||||
//if (!string.IsNullOrEmpty(item.F_CreateUserName)) | |||||
//{ | |||||
// item.F_DepartmentId = this.BaseRepository().FindEntity<UserEntity>(x => x.F_UserId == item.F_CreateUserId)?.F_DepartmentId; | |||||
//} | |||||
} | } | ||||
return data; | return data; | ||||
} | } | ||||
@@ -118,7 +118,12 @@ export default { | |||||
this.submitPostData.auditors = JSON.stringify({[this.reviewerListId]:this.reviewer.toString()}) | this.submitPostData.auditors = JSON.stringify({[this.reviewerListId]:this.reviewer.toString()}) | ||||
delete this.submitPostData.formreq | delete this.submitPostData.formreq | ||||
// this.submitPostData.auditors[this.reviewerListId] = this.reviewer | // this.submitPostData.auditors[this.reviewerListId] = this.reviewer | ||||
console.log(this.submitPostData) | |||||
// console.log(this.submitPostData) | |||||
uni.showLoading({ | |||||
title: '提交中...' | |||||
}); | |||||
const success = await this.HTTP_POST( | const success = await this.HTTP_POST( | ||||
this.type === 'sign' ? 'learun/adms/newwf/sign' : 'learun/adms/newwf/auditors', | this.type === 'sign' ? 'learun/adms/newwf/sign' : 'learun/adms/newwf/auditors', | ||||
this.submitPostData, | this.submitPostData, | ||||
@@ -126,11 +131,13 @@ export default { | |||||
) | ) | ||||
if (!success) { | if (!success) { | ||||
return | |||||
uni.hideLoading(); | |||||
return | |||||
} | } | ||||
this.EMIT('task-list-change') | this.EMIT('task-list-change') | ||||
this.NAV_BACK(2) | this.NAV_BACK(2) | ||||
uni.hideLoading(); | |||||
this.TOAST(`已成功提交${this.typeText}`, 'success') | this.TOAST(`已成功提交${this.typeText}`, 'success') | ||||
}, | }, | ||||