@@ -31,7 +31,7 @@ | |||||
} | } | ||||
var baseUser = JSON.parse(localStorage.userinfo); | var baseUser = JSON.parse(localStorage.userinfo); | ||||
_postParam.queryJson = JSON.stringify({ ClassDiredctorNo: baseUser.baseinfo.account }); | |||||
_postParam.queryJson = JSON.stringify({ EmpNo: baseUser.baseinfo.account }); | |||||
learun.httpget(config.webapi + '/learun/ask/testlist', _postParam, (data) => { | learun.httpget(config.webapi + '/learun/ask/testlist', _postParam, (data) => { | ||||
$page.find('.lr-badge').text('0'); | $page.find('.lr-badge').text('0'); | ||||
if (data) { | if (data) { | ||||
@@ -1,6 +1,6 @@ | |||||
(function ($, learun) { | (function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var isLoaded = 0; | |||||
learun._im = { | learun._im = { | ||||
init: function () { | init: function () { | ||||
@@ -33,7 +33,7 @@ namespace Learun.Application.WebApi.Modules | |||||
public Response GetPageList(dynamic _) | public Response GetPageList(dynamic _) | ||||
{ | { | ||||
ReqPageParam parameter = this.GetReqData<ReqPageParam>(); | ReqPageParam parameter = this.GetReqData<ReqPageParam>(); | ||||
var data = AeTerm.GetTeachList(parameter.pagination, parameter.queryJson); | |||||
var data = AeTerm.GetPageList(parameter.pagination, parameter.queryJson); | |||||
var jsonData = new | var jsonData = new | ||||
{ | { | ||||
rows = data, | rows = data, | ||||
@@ -235,31 +235,5 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
#endregion | #endregion | ||||
/// <summary> | |||||
/// 手机端 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<ArrangeExamTermNewEntity> GetTeachList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return arrangeExamTermNewService.GetTeachList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
} | } | ||||
} | } |
@@ -55,6 +55,5 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
List<TreeModel> GetClassTree(); | List<TreeModel> GetClassTree(); | ||||
IEnumerable<ArrangeExamTermItemNewEntity> GetPageListForClass(Pagination pagination, string queryJson); | IEnumerable<ArrangeExamTermItemNewEntity> GetPageListForClass(Pagination pagination, string queryJson); | ||||
IEnumerable<ArrangeExamTermNewEntity> GetPageListForLesson(Pagination pagination, string queryJson); | IEnumerable<ArrangeExamTermNewEntity> GetPageListForLesson(Pagination pagination, string queryJson); | ||||
IEnumerable<ArrangeExamTermNewEntity> GetTeachList(Pagination pagination, string queryJson); | |||||
} | } | ||||
} | } |
@@ -412,80 +412,5 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 手机端查询条件 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">条件参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<ArrangeExamTermNewEntity> GetTeachList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("select* from ArrangeExamTerm AET "); | |||||
strSql.Append(" left join(select ClassDiredctorNo, classno from[CollegeMIS_塔里木].dbo.Classinfo) CI on CI.ClassNo = AET.ClassNo "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
var dp = new DynamicParameters(new { }); | |||||
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["EmpNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.EmpNo=@EmpNo "); | |||||
dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String); | |||||
} | |||||
if (!queryParam["LessonNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.LessonNo=@LessonNo "); | |||||
dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String); | |||||
} | |||||
if (!queryParam["ClassNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.ClassNo=@ClassNo "); | |||||
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); | |||||
} | |||||
if (!queryParam["ClassRoomNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.ClassRoomNo=@ClassRoomNo "); | |||||
dp.Add("ClassRoomNo", queryParam["ClassRoomNo"].ToString(), DbType.String); | |||||
} | |||||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||||
{ | |||||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||||
strSql.Append(" AND ( ExamDate >= @startTime AND ExamDate <= @endTime ) "); | |||||
} | |||||
if (!queryParam["ClassDiredctorNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.ClassDiredctorNo=@ClassDiredctorNo "); | |||||
dp.Add("ClassDiredctorNo", queryParam["ClassDiredctorNo"].ToString(), DbType.String); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<ArrangeExamTermNewEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
} | } | ||||
} | } |