@@ -46,7 +46,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 设置考试时长 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormExamTime() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -111,9 +119,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Import(string AcademicYearNo, string Semester) | |||
public ActionResult Import(string AcademicYearNo, string Semester,string ExamTime) | |||
{ | |||
int res = exam_ExamLessonIBLL.Import(AcademicYearNo, Semester); | |||
int res = exam_ExamLessonIBLL.Import(AcademicYearNo, Semester, ExamTime); | |||
return Success("导入" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
@@ -140,7 +148,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
Exam_ExamLessonEntity entity = strEntity.ToObject<Exam_ExamLessonEntity>(); | |||
//判断课程编号有无重复 | |||
var model = exam_ExamLessonIBLL.GetEntityByLessonNo(entity.LessonNo,entity.AcademicYearNo,entity.Semester); | |||
var model = exam_ExamLessonIBLL.GetEntityByLessonNo(entity.LessonNo, entity.AcademicYearNo, entity.Semester); | |||
if (model != null && string.IsNullOrEmpty(keyValue)) | |||
{ | |||
return Fail("课程编号重复!"); | |||
@@ -157,6 +165,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 设置考试时长 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult SaveExamTime(string keyValue, int ExamTime) | |||
{ | |||
exam_ExamLessonIBLL.SaveExamTime(keyValue, ExamTime); | |||
return Success("设置成功!"); | |||
} | |||
/// <summary> | |||
/// 启用/停用 | |||
/// </summary> | |||
@@ -45,7 +45,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark === "true") { | |||
learun.alert.warning("当前项目已审核不能编辑!"); | |||
learun.alert.warning("当前项目已启用不能编辑!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
@@ -40,7 +40,7 @@ var bootstrap = function ($, learun) { | |||
maxHeight: 200, | |||
select: function (item) { | |||
var NDeptNo = $("#DeptNo").lrselectGet(); | |||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { | |||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != 'undefined') { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | |||
@@ -51,7 +51,7 @@ var bootstrap = function ($, learun) { | |||
} else { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, | |||
param: { strWhere: " 1=1 and CheckMark=1 " }, | |||
value: "majorno", | |||
text: "majorname", | |||
maxHeight: 200 | |||
@@ -59,14 +59,20 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}) | |||
$("#MajorNo").lrselect(); | |||
$('#LessonNo').lrselect({ | |||
placeholder: "请选择课程", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||
value: 'value', | |||
text: 'text' | |||
$("#MajorNo").lrselect({ | |||
select: function (item) { | |||
if (item) { | |||
$('#LessonNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and teachmajorno='" + item.majorno + "'" }, | |||
value: "lessonno", | |||
text: "lessonname", | |||
maxHeight: 200 | |||
}); | |||
} | |||
} | |||
}); | |||
$('#LessonNo').lrselect(); | |||
$('#TeachDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
}, | |||
initData: function () { | |||
@@ -83,7 +89,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
$('#StuSortNo').val('02'); | |||
$('#LessonSortNo').val('2'); | |||
$('#LessonSortNo').val('2'); | |||
$('#CheckStyleNo').val('1'); | |||
$('#ScoreRecordStyleNo').val('1'); | |||
$('#CheckMark').val('1'); | |||
@@ -97,7 +103,7 @@ var bootstrap = function ($, learun) { | |||
return false; | |||
} | |||
var nName = $("#LessonNo").find(".lr-select-placeholder").text(); | |||
var Narray= nName.split("("); | |||
var Narray = nName.split("("); | |||
$("#LessonName").val(Narray[0]); | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
@@ -35,17 +35,25 @@ var bootstrap = function ($, learun) { | |||
text: 'text' | |||
}); | |||
$('#Semester').lrDataItemSelect({ code: 'Semester' }); | |||
$("#MajorNo").lrselect(); | |||
$('#MajorNo').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 " }, | |||
value: "majorno", | |||
text: "majorname", | |||
maxHeight: 200, | |||
select: function (item) { | |||
if (item) { | |||
$('#LessonNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and teachmajorno='" + item.majorno + "'" }, | |||
value: "lessonno", | |||
text: "lessonname", | |||
maxHeight: 200 | |||
}); | |||
} | |||
} | |||
}); | |||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | |||
//$('#LessonNo').lrselect({ | |||
// placeholder: "请选择课程", | |||
// allowSearch: true, | |||
// url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||
// value: 'value', | |||
// text: 'text', | |||
// maxHeight: 200 | |||
//}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -177,7 +185,7 @@ var bootstrap = function ($, learun) { | |||
$('#titleinfo').text(item.text); | |||
page.search(); | |||
var NDeptNo = item.id; | |||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { | |||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != 'undefined') { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | |||
@@ -188,7 +196,7 @@ var bootstrap = function ($, learun) { | |||
} else { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, | |||
param: { strWhere: " 1=1 and CheckMark=1 " }, | |||
value: "majorno", | |||
text: "majorname", | |||
maxHeight: 200 | |||
@@ -0,0 +1,11 @@ | |||
@{ | |||
ViewBag.Title = "设置考试时长"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">考试时长(分钟)<font face="宋体">*</font></div> | |||
<input id="ExamTime" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormExamTime.js") |
@@ -0,0 +1,106 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-12 15:47 | |||
* 描 述:考试课程表 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//年级 | |||
$('#Grade').lrselect({ | |||
placeholder: "请选择年级", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#DeptNo').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
value: 'deptno', | |||
text: 'deptname', | |||
maxHeight: 200, | |||
select: function (item) { | |||
var NDeptNo = $("#DeptNo").lrselectGet(); | |||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | |||
value: "majorno", | |||
text: "majorname", | |||
maxHeight: 200 | |||
}); | |||
} else { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, | |||
value: "majorno", | |||
text: "majorname", | |||
maxHeight: 200 | |||
}); | |||
} | |||
} | |||
}); | |||
$("#MajorNo").lrselect(); | |||
$('#ELEnabled').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoBit', | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/SaveExamTime?keyValue=' + keyValue, | |||
{ ExamTime: $('#ExamTime').val() }, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -3,13 +3,17 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" > | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" > | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" id="ExamTimeDiv" > | |||
<div class="lr-form-item-title">考试时长(分钟)</div> | |||
<input id="ExamTime" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js") |
@@ -12,7 +12,7 @@ var bootstrap = function ($, learun) { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
//page.initData(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#AcademicYearNo').lrselect({ | |||
@@ -34,18 +34,11 @@ var bootstrap = function ($, learun) { | |||
}, | |||
initData: function () { | |||
//if (!!keyValue) { | |||
// $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetFormData?keyValue=' + keyValue, function (data) { | |||
// for (var id in data) { | |||
// if (!!data[id].length && data[id].length > 0) { | |||
// $('#' + id ).jfGridSet('refreshdata', data[id]); | |||
// } | |||
// else { | |||
// $('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
// } | |||
// } | |||
// }); | |||
//} | |||
if (type == 1) { | |||
$('#ExamTimeDiv').attr("style", "display:block;"); | |||
} else { | |||
$('#ExamTimeDiv').attr("style", "display:none;"); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
@@ -55,7 +48,8 @@ var bootstrap = function ($, learun) { | |||
} | |||
var postData = { | |||
AcademicYearNo: $('#AcademicYearNo').lrselectGet(), | |||
Semester: $('#Semester').lrselectGet() | |||
Semester: $('#Semester').lrselectGet(), | |||
ExamTime: $('#ExamTime').val() | |||
}; | |||
//从开课计划导入 | |||
if (type == 1) { | |||
@@ -63,7 +57,7 @@ var bootstrap = function ($, learun) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
} | |||
}); | |||
} else if (type == 2) { | |||
//按条件清空数据 | |||
@@ -44,6 +44,7 @@ | |||
@*<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a>*@ | |||
</div> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_editExamTime" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 设置考试时长</a> | |||
<a id="lr_importByBasic" class="btn btn-default"><i class="fa fa-plus"></i> 从开课计划导入</a> | |||
<a id="lr_emptyWhere" class="btn btn-default"><i class="fa fa-trash-o"></i> 按条件清空数据</a> | |||
</div> | |||
@@ -72,6 +72,31 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 设置考试时长 | |||
$('#lr_editExamTime').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ELId'); | |||
//if (keyValue.indexOf(',') != -1) { | |||
// learun.alert.warning("只能选择一条记录进行编辑!"); | |||
// return false; | |||
//} | |||
if (learun.checkrow(keyValue)) { | |||
var ELEnabled = $('#gridtable').jfGridValue('ELEnabled'); | |||
if (ELEnabled.indexOf('true') != -1) { | |||
learun.alert.warning("选中记录已启用!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'formtime', | |||
title: '设置考试时长', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/FormExamTime?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 导入 | |||
$('#lr_importByBasic').on('click', function () { | |||
@@ -87,7 +112,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
}); | |||
// 按条件清空数据 | |||
$('#lr_emptyWhere').on('click', function () { | |||
learun.layerForm({ | |||
@@ -197,6 +222,16 @@ var bootstrap = function ($, learun) { | |||
{ label: "年级", name: "Grade", width: 50, align: "left" }, | |||
{ label: "课程编号", name: "LessonNo", width: 100, align: "left" }, | |||
{ label: "课程名称", name: "LessonName", width: 200, align: "left" }, | |||
{ | |||
label: "考试时长", name: "ExamTime", width: 150, align: "left", | |||
formatter: function (cellvalue) { | |||
if (cellvalue) { | |||
return cellvalue + '分钟'; | |||
} else { | |||
return ""; | |||
} | |||
} | |||
}, | |||
//{ label: "排序号", name: "ELOrder", width: 100, align: "left" }, | |||
{ | |||
label: "是否启用", name: "ELEnabled", width: 100, align: "left", | |||
@@ -996,6 +996,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\IndexForClass.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\IndexItem.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormExamTime.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormYearSemester.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Index.js" /> | |||
@@ -7839,6 +7840,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\FormViewReceiveData.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\IndexSchool.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\FormElective.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormExamTime.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -137,6 +137,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public void SaveExamTime(string keyValue, int ExamTime) | |||
{ | |||
try | |||
{ | |||
exam_ExamLessonService.SaveExamTime(keyValue, ExamTime); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
@@ -162,11 +181,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public int Import(string AcademicYearNo, string Semester) | |||
public int Import(string AcademicYearNo, string Semester,string ExamTime) | |||
{ | |||
try | |||
{ | |||
return exam_ExamLessonService.Import(AcademicYearNo, Semester); | |||
return exam_ExamLessonService.Import(AcademicYearNo, Semester, ExamTime); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -25,6 +25,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("ACADEMICYEARNO")] | |||
public string AcademicYearNo { get; set; } | |||
/// <summary> | |||
/// 考试时长 | |||
/// </summary> | |||
[Column("EXAMTIME")] | |||
public int? ExamTime { get; set; } | |||
/// <summary> | |||
/// 学期 | |||
/// </summary> | |||
[Column("SEMESTER")] | |||
@@ -43,6 +43,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="keyValue"></param> | |||
/// <param name="ELEnabled"></param> | |||
void Lock(string keyValue, int ELEnabled); | |||
void SaveExamTime(string keyValue, int ExamTime); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
@@ -50,7 +51,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, Exam_ExamLessonEntity entity); | |||
int Import(string AcademicYearNo, string Semester); | |||
int Import(string AcademicYearNo, string Semester,string ExamTime); | |||
int DeleteWhere(string AcademicYearNo, string Semester); | |||
#endregion | |||
@@ -184,6 +184,36 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 设置考试时间 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="ExamTime"></param> | |||
public void SaveExamTime(string keyValue, int ExamTime) | |||
{ | |||
try | |||
{ | |||
if (keyValue.Contains(",")) | |||
{ | |||
keyValue = string.Join("','", keyValue.Split(',')); | |||
} | |||
string sql = $"update Exam_ExamLesson set ExamTime='{ExamTime}' where ELId in ('{keyValue}')"; | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
@@ -223,7 +253,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="AcademicYearNo"></param> | |||
/// <param name="Semester"></param> | |||
/// <returns></returns> | |||
public int Import(string AcademicYearNo, string Semester) | |||
public int Import(string AcademicYearNo, string Semester,string ExamTime) | |||
{ | |||
try | |||
{ | |||
@@ -234,8 +264,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
,[LessonName] | |||
,[LessonNo] | |||
,[ELOrder] | |||
,[ELEnabled]) | |||
select NEWID(),AcademicYearNo,Semester,Grade,LessonName,[LessonNo],0,1 from OpenLessonPlan where lessonsortno=1 and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' | |||
,[ELEnabled],ExamTime) | |||
select NEWID(),AcademicYearNo,Semester,Grade,LessonName,[LessonNo],0,1,'{ExamTime}' from OpenLessonPlan where lessonsortno=1 and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' | |||
and [LessonNo] not in (select [LessonNo] from Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' ) | |||
group by LessonNo,LessonName,AcademicYearNo,Semester,Grade | |||
"; | |||
@@ -95,7 +95,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindTable($" select distinct EPLId,LessonName,LessonNo from Exam_ExamPlanLesson where EPId='{EPId}' order by LessonNo"); | |||
return this.BaseRepository("CollegeMIS").FindTable($@" select distinct t.EPLId,t.LessonName,a.ltorder,t.LessonNo from Exam_ExamPlanLesson t | |||
join (select l.lessonno,l.LessonTypeId,lt.ltorder from [dbo].[LessonInfo] l left join CdLessonType lt on l.LessonTypeId=lt.ltid where l.checkmark=1) a | |||
on t.lessonno=a.lessonno | |||
where EPId='{EPId}' order by a.ltorder, t.LessonNo"); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -361,7 +361,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
strSql.Append( | |||
$@"insert into Exam_ExamStudent(ESId,ClassNo,AcademicYearNo,Semester,StuNo,StuName,ESType,ESEnabled) | |||
select newid(), a.classno, '{AcademicYearNo}', '{Semester}', a.stuno, a.stuname, '{ESType}', 1 from StuInfoBasic a where CheckMark = '1' and stuno not in (select stuno from Exam_ExamStudent where AcademicYearNo = '{AcademicYearNo}' and Semester = '{Semester}' and ESType = '1')"); | |||
select newid(), a.classno, '{AcademicYearNo}', '{Semester}', a.stuno, a.stuname, '{ESType}', 1 from StuInfoBasic a where CheckMark = '1' and stuno not in (select stuno from Exam_ExamStudent where AcademicYearNo = '{AcademicYearNo}' and Semester = '{Semester}' and ESType = '1' union | |||
select StuNo from StuInfoBasicChange where StuChangeType in ('04','05','06') and CheckStatus='1')"); | |||
} | |||
else | |||
{ | |||
@@ -379,7 +380,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
where 1=1 and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) "); | |||
strSql.Append(" and a.AcademicYearNo ='" + AcademicYearNo + "' and a.Semester ='" + Semester + "' "); | |||
strSql.Append(" and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) "); | |||
strSql.Append($@" and a.stuno not in (select stuno from Exam_ExamStudent where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ESType='{ESType}' ) "); | |||
strSql.Append($@" and a.stuno not in (select stuno from Exam_ExamStudent where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ESType='{ESType}' union | |||
select StuNo from StuInfoBasicChange where StuChangeType in ('04','05','06') and CheckStatus='1' ) "); | |||
strSql.Append(" group by a.stuno,a.stuname,a.classno"); | |||
} | |||
return this.BaseRepository("CollegeMIS").ExecuteBySql(strSql.ToString()); | |||