|
|
@@ -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); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |