@@ -70,6 +70,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 学年下拉框信息 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetAcademicYearNoData() | |||||
{ | |||||
var data = stuScoreOfPreviousIBLL.GetAcademicYearNoData(); | |||||
return Success(data); | |||||
} | |||||
#endregion | #endregion | ||||
#region 拓展数据 | #region 拓展数据 | ||||
@@ -2,20 +2,31 @@ | |||||
ViewBag.Title = "往年成绩管理"; | ViewBag.Title = "往年成绩管理"; | ||||
Layout = "~/Views/Shared/_Index.cshtml"; | Layout = "~/Views/Shared/_Index.cshtml"; | ||||
} | } | ||||
<style> | |||||
.lr-select { | |||||
width: 150px; | |||||
} | |||||
</style> | |||||
<div class="lr-layout "> | <div class="lr-layout "> | ||||
<div class="lr-layout-center"> | <div class="lr-layout-center"> | ||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | <div class="lr-layout-wrap lr-layout-wrap-notitle "> | ||||
<div class="lr-layout-tool"> | <div class="lr-layout-tool"> | ||||
<div class="lr-layout-tool-left"> | <div class="lr-layout-tool-left"> | ||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">学号/姓名</div> | |||||
<input id="keyword" type="text" class="form-control" /> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div id="AcademicYearNo" type="lrselect" class="lr-select"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="Semester" type="lrselect" class="lr-select"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="LessonSortNo" type="lrselect" class="lr-select"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<input id="keyword" type="text" class="form-control" placeholder="学号/姓名"/> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="lr-layout-tool-right"> | <div class="lr-layout-tool-right"> | ||||
@@ -20,6 +20,38 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
}); | }); | ||||
//学年 | |||||
$('#AcademicYearNo').lrselect({ | |||||
placeholder: "学年", | |||||
allowSearch: false, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreOfPrevious/GetAcademicYearNoData', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
//学期 | |||||
$('#Semester').lrselect({ | |||||
placeholder: "学期", | |||||
allowSearch: false, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
//课程类型 | |||||
$('#LessonSortNo').lrselect({ | |||||
placeholder: "课程类型", | |||||
allowSearch: false, | |||||
data: [{ id: "1", text: "必修课" }, { id: "2", text: "选修课" }] | |||||
}); | |||||
//查询 | |||||
$('#btn_Search').on('click', function () { | |||||
var param = { | |||||
AcademicYearNo: $("#AcademicYearNo").lrselectGet(), | |||||
Semester: $("#Semester").lrselectGet(), | |||||
LessonSortNo: $("#LessonSortNo").lrselectGet(), | |||||
keyword: $("#keyword").val() | |||||
}; | |||||
page.search(param); | |||||
}); | |||||
//导入弹窗 | //导入弹窗 | ||||
$('#importBtn').on('click', function () { | $('#importBtn').on('click', function () { | ||||
learun.layerForm({ | learun.layerForm({ | ||||
@@ -62,8 +94,8 @@ var bootstrap = function ($, learun) { | |||||
return cellvalue == "1" ? "必修课" : "选修课"; | return cellvalue == "1" ? "必修课" : "选修课"; | ||||
} | } | ||||
}, | }, | ||||
{ label: '课程编号', name: 'LessonNo', width: 200, align: "left" }, | |||||
{ label: '课程名称', name: 'LessonName', width: 200, align: "left" }, | |||||
{ label: '课程编号', name: 'LessonNo', width: 150, align: "left" }, | |||||
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" }, | |||||
{ label: '学分', name: 'StudyScore', width: 100, align: "left" }, | { label: '学分', name: 'StudyScore', width: 100, align: "left" }, | ||||
{ | { | ||||
label: '平时成绩', name: 'OrdinaryScore', width: 100, align: "left" | label: '平时成绩', name: 'OrdinaryScore', width: 100, align: "left" | ||||
@@ -87,7 +119,9 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
], | ], | ||||
mainId: 'ScoreId', | mainId: 'ScoreId', | ||||
isPage: true | |||||
isPage: true, | |||||
sidx: 'AcademicYearNo desc,Semester desc,LessonNo,StuNo', | |||||
sord: "" | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
@@ -42,6 +42,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 学年下拉框信息 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<WebHelper.YearGrade> GetAcademicYearNoData() | |||||
{ | |||||
try | |||||
{ | |||||
return stuScoreOfPreviousService.GetAcademicYearNoData(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 拓展数据 | #region 拓展数据 | ||||
@@ -22,6 +22,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<StuScoreOfPreviousEntity> GetPageList(Pagination pagination, string queryJson); | IEnumerable<StuScoreOfPreviousEntity> GetPageList(Pagination pagination, string queryJson); | ||||
/// <summary> | |||||
/// 学年下拉框信息 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
IEnumerable<WebHelper.YearGrade> GetAcademicYearNoData(); | |||||
#endregion | #endregion | ||||
#region 拓展数据 | #region 拓展数据 | ||||
@@ -55,9 +55,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
if (!queryParam["keyword"].IsEmpty()) | if (!queryParam["keyword"].IsEmpty()) | ||||
{ | { | ||||
strSql.Append(" and (stuno like @keyword or stuname like @keyword )"); | |||||
strSql.Append(" and (t.stuno like @keyword or t.stuname like @keyword )"); | |||||
dp.Add("keyword", "%" + queryParam["keyword"].ToString() + "%", DbType.String); | dp.Add("keyword", "%" + queryParam["keyword"].ToString() + "%", DbType.String); | ||||
} | } | ||||
if (!queryParam["AcademicYearNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.AcademicYearNo = @AcademicYearNo "); | |||||
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); | |||||
} | |||||
if (!queryParam["Semester"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.Semester = @Semester "); | |||||
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); | |||||
} | |||||
if (!queryParam["LessonSortNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.LessonSortNo = @LessonSortNo "); | |||||
dp.Add("LessonSortNo", queryParam["LessonSortNo"].ToString(), DbType.String); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<StuScoreOfPreviousEntity>(strSql.ToString(), dp, pagination); | return this.BaseRepository("CollegeMIS").FindList<StuScoreOfPreviousEntity>(strSql.ToString(), dp, pagination); | ||||
} | } | ||||
@@ -73,6 +88,32 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 学年下拉框信息 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<WebHelper.YearGrade> GetAcademicYearNoData() | |||||
{ | |||||
try | |||||
{ | |||||
var data = this.BaseRepository("CollegeMIS").FindList<WebHelper.YearGrade>("select distinct s.AcademicYearNo as value,s.AcademicYearNo as text from StuScoreOfPrevious s "); | |||||
data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value); | |||||
return data; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 拓展数据 | #region 拓展数据 | ||||