|
|
@@ -39,6 +39,42 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration |
|
|
|
var queryParam = queryJson.ToJObject(); |
|
|
|
// 虚拟参数 |
|
|
|
var dp = new DynamicParameters(new { }); |
|
|
|
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 ( t.CreateTime >= @startTime AND t.CreateTime <= @endTime ) "); |
|
|
|
} |
|
|
|
if (!queryParam["DeptNo"].IsEmpty()) |
|
|
|
{ |
|
|
|
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); |
|
|
|
strSql.Append(" AND t.DeptNo = @DeptNo "); |
|
|
|
} |
|
|
|
if (!queryParam["MajorNo"].IsEmpty()) |
|
|
|
{ |
|
|
|
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); |
|
|
|
strSql.Append(" AND t.MajorNo = @MajorNo "); |
|
|
|
} |
|
|
|
if (!queryParam["LessonNo"].IsEmpty()) |
|
|
|
{ |
|
|
|
dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String); |
|
|
|
strSql.Append(" AND t.LessonNo = @LessonNo "); |
|
|
|
} |
|
|
|
if (!queryParam["AcademicYearNo"].IsEmpty()) |
|
|
|
{ |
|
|
|
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); |
|
|
|
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); |
|
|
|
} |
|
|
|
if (!queryParam["Semester"].IsEmpty()) |
|
|
|
{ |
|
|
|
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); |
|
|
|
strSql.Append(" AND t.Semester = @Semester "); |
|
|
|
} |
|
|
|
if (!queryParam["PublishNo"].IsEmpty()) |
|
|
|
{ |
|
|
|
dp.Add("PublishNo", "%" + queryParam["PublishNo"].ToString() + "%", DbType.String); |
|
|
|
strSql.Append(" AND t.PublishNo Like @PublishNo "); |
|
|
|
} |
|
|
|
return this.BaseRepository("CollegeMIS").FindList<TextBookSolSubEntity>(strSql.ToString(),dp, pagination); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|