@@ -69,6 +69,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
[HttpGet] | [HttpGet] | ||||
public ActionResult GetClassTree() | public ActionResult GetClassTree() | ||||
{ | { | ||||
@@ -146,7 +146,27 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 排考计划 | |||||
/// </summary> | |||||
/// <param name="pagination"></param> | |||||
/// <param name="queryJson"></param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageListForLesson(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = exam_ExamPlanLessonIBLL.GetPageListForLesson(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
[HttpGet] | [HttpGet] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult GetFormRoom(string keyValue) | public ActionResult GetFormRoom(string keyValue) | ||||
@@ -27,9 +27,9 @@ | |||||
<div class=" btn-group btn-group-sm"> | <div class=" btn-group btn-group-sm"> | ||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
@*<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_arrange" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 排考数据同步</a> | <a id="lr_arrange" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 排考数据同步</a> | ||||
</div> | |||||
</div>*@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="lr-layout-body" id="gridtable"></div> | <div class="lr-layout-body" id="gridtable"></div> | ||||
@@ -86,7 +86,7 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/GetPageListForLesson', | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetPageListForLesson', | |||||
headData: [ | headData: [ | ||||
{ label: '学年', name: 'AcademicYearNo', width: 80, align: "left" }, | { label: '学年', name: 'AcademicYearNo', width: 80, align: "left" }, | ||||
{ label: '学期', name: 'Semester', width: 80, align: "left" }, | { label: '学期', name: 'Semester', width: 80, align: "left" }, | ||||
@@ -99,7 +99,7 @@ var bootstrap = function ($, learun) { | |||||
{ label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, | { label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, | ||||
{ label: '课程名称', name: 'LessonName', width: 200, align: "left" } | { label: '课程名称', name: 'LessonName', width: 200, align: "left" } | ||||
], | ], | ||||
mainId: 'AETId', | |||||
mainId: 'EPLId', | |||||
sidx: 'ExamDate ,ExamTime,LessonNo', | sidx: 'ExamDate ,ExamTime,LessonNo', | ||||
isPage: true | isPage: true | ||||
}); | }); | ||||
@@ -56,7 +56,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
if (!queryParam["LessonNo"].IsEmpty()) | if (!queryParam["LessonNo"].IsEmpty()) | ||||
{ | { | ||||
strSql.Append(" and LessonNo='" + queryParam["LessonNo"].ToString() + "' "); | |||||
strSql.Append(" and LessonNo like '%" + queryParam["LessonNo"].ToString() + "%' "); | |||||
} | } | ||||
if (!queryParam["ClassNo"].IsEmpty()) | if (!queryParam["ClassNo"].IsEmpty()) | ||||
{ | { | ||||
@@ -130,7 +130,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
if (!queryParam["LessonNo"].IsEmpty()) | if (!queryParam["LessonNo"].IsEmpty()) | ||||
{ | { | ||||
strSql.Append(" and t.LessonNo='" + queryParam["LessonNo"].ToString() + "' "); | |||||
strSql.Append(" and t.LessonNo like '%" + queryParam["LessonNo"].ToString() + "%' "); | |||||
} | } | ||||
if (!queryParam["ClassNo"].IsEmpty()) | if (!queryParam["ClassNo"].IsEmpty()) | ||||
{ | { | ||||
@@ -42,7 +42,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public IEnumerable<Exam_ExamPlanLessonEntity> GetPageListForLesson(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_ExamPlanLessonService.GetPageListForLesson(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取Exam_ExamPlanLesson表实体数据 | /// 获取Exam_ExamPlanLesson表实体数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -104,6 +104,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
public string ExamTimeStart { get; set; } | public string ExamTimeStart { get; set; } | ||||
[NotMapped] | [NotMapped] | ||||
public string ExamTimeEnd { get; set; } | public string ExamTimeEnd { get; set; } | ||||
[NotMapped] | |||||
public string AcademicYearNo { get; set; } | |||||
[NotMapped] | |||||
public string Semester { get; set; } | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="queryJson">查询参数</param> | /// <param name="queryJson">查询参数</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<Exam_ExamPlanLessonEntity> GetPageList(Pagination pagination, string queryJson); | IEnumerable<Exam_ExamPlanLessonEntity> GetPageList(Pagination pagination, string queryJson); | ||||
IEnumerable<Exam_ExamPlanLessonEntity> GetPageListForLesson(Pagination pagination, string queryJson); | |||||
/// <summary> | /// <summary> | ||||
/// 获取Exam_ExamPlanLesson表实体数据 | /// 获取Exam_ExamPlanLesson表实体数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -63,6 +63,65 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 排考计划 | |||||
/// </summary> | |||||
/// <param name="pagination"></param> | |||||
/// <param name="queryJson"></param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Exam_ExamPlanLessonEntity> GetPageListForLesson(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@"p.AcademicYearNo,p.Semester,t.* "); | |||||
strSql.Append(" FROM Exam_ExamPlanLesson t "); | |||||
strSql.Append(" join [dbo].[Exam_ExamPlan] p on t.epid=p.epid "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["ExamDate"].IsEmpty()) | |||||
{ | |||||
dp.Add("ExamDate", queryParam["ExamDate"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.ExamDate = @ExamDate "); | |||||
} | |||||
if (!queryParam["LessonNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append($" AND t.LessonNo like '%{queryParam["LessonNo"].ToString()}%' "); | |||||
} | |||||
if (!queryParam["AcademicYearNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND p.AcademicYearNo = @AcademicYearNo "); | |||||
} | |||||
if (!queryParam["Semester"].IsEmpty()) | |||||
{ | |||||
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); | |||||
strSql.Append(" AND p.Semester = @Semester "); | |||||
} | |||||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" AND ( t.ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND t.ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanLessonEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取Exam_ExamPlanLesson表实体数据 | /// 获取Exam_ExamPlanLesson表实体数据 | ||||
/// </summary> | /// </summary> | ||||