Переглянути джерело

考务管理 - 学生管理 并添加导出和打印功能

怀来职教中心中职
ndbs 1 рік тому
джерело
коміт
d489c74fef
4 змінених файлів з 187 додано та 11 видалено
  1. +19
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.cshtml
  2. +140
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js
  3. +7
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentEntity.cs
  4. +21
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs

+ 19
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.cshtml Переглянути файл

@@ -18,12 +18,24 @@
<div class="lr-form-item-title">学期</div>
<div id="Semester"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">系部</div>
<div id="DeptNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">专业</div>
<div id="MajorNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">年级</div>
<div id="Grade"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">班级</div>
<div id="ClassNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">学生学号</div>
<div class="lr-form-item-title">学生号</div>
<input id="StuNo" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
@@ -34,6 +46,10 @@
<div class="lr-form-item-title">考试类型</div>
<div id="ESType"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">身份证号</div>
<input id="IdentityCardNo" type="text" class="form-control" />
</div>
</div>
</div>
</div>
@@ -48,7 +64,7 @@
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i>&nbsp;启用</a>
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i>&nbsp;停用</a>
@*<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>*@
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
<div class=" btn-group btn-group-sm">
<a id="lr_importBy" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;一键生成考生信息</a>


+ 140
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js Переглянути файл

@@ -15,7 +15,7 @@ var bootstrap = function ($, learun) {
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 245, 400);
}, 320, 400);
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: true,
@@ -30,6 +30,116 @@ var bootstrap = function ($, learun) {
value: 'value',
text: 'text'
});
$('#DeptNo').lrselect({
allowSearch: true,
value: "deptno",
text: "deptname",
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
select: function (item) {
if (item) {
$('#MajorNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" }
});
} else {
$('#MajorNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
param: { strWhere: "1=1 AND CheckMark=1" }
});
}

}
});
$('#MajorNo').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
value: "majorno",
text: "majorname",
param: { strWhere: "1=1 AND CheckMark=1" },
select: function (item) {
var Grades = $("#Grade").lrselectGet();
if (Grades != null && Grades != "" && Grades != "undefined") {
if (item) {
$('#ClassNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1 AND Grade='" + Grades + "' order by classno desc" }
});
} else {
$('#ClassNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }
});
}
} else {
if (item) {
$('#ClassNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1 order by classno desc" }
});
} else {
$('#ClassNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }
});
}
}
}
});
$('#Grade').lrselect({
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear',
value: "value",
text: "text",
select: function (item) {
var MajorNos = $("#MajorNo").lrselectGet();
if (MajorNos != null && MajorNos != "" && MajorNos != "undefined") {
if (item) {
$('#ClassNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: {
strWhere: "majorno='" + MajorNos + "' AND CheckMark=1 AND Grade='" + item.text + "' order by classno desc"
}
});
} else {
$('#ClassNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }
});
}
} else {
if (item) {
$('#ClassNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: {
strWhere: "CheckMark=1 AND Grade='" + item.text + "' order by classno desc"
}
});
} else {
$('#ClassNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }
});
}
}

}
});
$('#ClassNo').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" },
value: "classno",
text: "classname"
});
$('#ESType').lrDataItemSelect({ code: 'StudentType' });
// 刷新
$('#lr_refresh').on('click', function () {
@@ -163,6 +273,32 @@ var bootstrap = function ($, learun) {
headData: [
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ label: "学期", name: "Semester", width: 100, align: "left" },
{
label: "系所", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}
},
{
label: "专业", name: "MajorNo", width: 140, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: value,
keyId: 'majorno',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{
label: "班级", name: "ClassNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
@@ -176,8 +312,9 @@ var bootstrap = function ($, learun) {
});
}
},
{ label: "学生编号", name: "StuNo", width: 100, align: "left" },
{ label: "学生编号", name: "StuNo", width: 140, align: "left" },
{ label: "学生姓名", name: "StuName", width: 100, align: "left" },
{ label: "身份证号", name: "IdentityCardNo", width: 140, align: "left" },
{ label: "年级", name: "Grade", width: 100, align: "left" },
{
label: "考试类型", name: "ESType", width: 100, align: "left",
@@ -201,7 +338,7 @@ var bootstrap = function ($, learun) {
mainId: 'ESId',
isMultiselect: true,
isPage: true,
sidx: 'AcademicYearNo desc,Semester desc',
sidx: 'AcademicYearNo desc,Semester desc ,Grade desc,DeptNo desc, MajorNo desc, ClassNo desc',
sord: 'ASC'
});
page.search();


+ 7
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentEntity.cs Переглянути файл

@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// 日 期:2022-04-12 15:47
/// 描 述:考试课程表
/// </summary>
public class Exam_ExamStudentEntity
public class Exam_ExamStudentEntity
{
#region 实体成员
/// <summary>
@@ -88,7 +88,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
public int StuNum { get; set; }
[NotMapped]
public string ClassName { get; set; }

[NotMapped]
public string DeptNo { get; set; }
[NotMapped]
public string MajorNo { get; set; }
[NotMapped]
public string IdentityCardNo { get; set; }
#endregion
}
}


+ 21
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs Переглянути файл

@@ -32,9 +32,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@" t.* ");
strSql.Append(" FROM Exam_ExamStudent t ");
strSql.Append(" select t.*,s.deptno,s.majorno,s.IdentityCardNo from Exam_ExamStudent t left join StuInfoBasic s on t.StuNo = s.stuno ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
@@ -49,6 +47,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" AND t.Semester = @Semester ");
}
if (!queryParam["Grade"].IsEmpty())
{
dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String);
strSql.Append(" AND t.Grade = @Grade ");
}
if (!queryParam["ClassNo"].IsEmpty())
{
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String);
@@ -69,6 +72,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("ESType", queryParam["ESType"].ToString(), DbType.String);
strSql.Append(" AND t.ESType = @ESType ");
}
if (!queryParam["DeptNo"].IsEmpty())
{
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" AND s.DeptNo = @DeptNo ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND s.MajorNo = @MajorNo ");
}
if (!queryParam["IdentityCardNo"].IsEmpty())
{
dp.Add("IdentityCardNo", "%" + queryParam["IdentityCardNo"].ToString() + "%", DbType.String);
strSql.Append(" AND s.IdentityCardNo like @IdentityCardNo ");
}
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamStudentEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)


Завантаження…
Відмінити
Зберегти