@@ -1161,7 +1161,7 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest | |||||
@"select m.name AS 'MajorName', m.number AS 'MajorNo', tt.EmpNo AS 'EmpNo', | @"select m.name AS 'MajorName', m.number AS 'MajorNo', tt.EmpNo AS 'EmpNo', | ||||
tt.EmpName AS 'EmpName', sc.name AS 'F_SchoolName', sc.sid AS 'F_SchoolId', | tt.EmpName AS 'EmpName', sc.name AS 'F_SchoolName', sc.sid AS 'F_SchoolId', | ||||
p.grade AS 'Grade', p.classhour AS 'classhour', curr.name AS 'LessonName', curr.number AS 'LessonNo', | p.grade AS 'Grade', p.classhour AS 'classhour', curr.name AS 'LessonName', curr.number AS 'LessonNo', | ||||
s.year AS 'AcademicYearNo', s.number AS 'Semester' FROM tb_major_plan p | |||||
s.year AS 'AcademicYearNo', s.number AS 'Semester' ,cour.`assessmentmethod` AS 'ExamType' FROM tb_major_plan p | |||||
LEFT JOIN ( | LEFT JOIN ( | ||||
SELECT | SELECT | ||||
t.teacher, | t.teacher, | ||||
@@ -1222,7 +1222,8 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest | |||||
CheckMark = "1", | CheckMark = "1", | ||||
TestMark = 0, | TestMark = 0, | ||||
F_SchoolId = item.F_SchoolId, | F_SchoolId = item.F_SchoolId, | ||||
State = 1 | |||||
State = 1, | |||||
ExamType = item.ExamType | |||||
}; | }; | ||||
if (openLessonPlanData.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && | if (openLessonPlanData.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && | ||||
m.Semester == insertData.Semester && | m.Semester == insertData.Semester && | ||||
@@ -117,6 +117,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[NotMapped] | [NotMapped] | ||||
public int? EndWeek { get; set; } | public int? EndWeek { get; set; } | ||||
[NotMapped] | [NotMapped] | ||||
public string ExamType { get; set; } | |||||
[NotMapped] | |||||
public string LessonName { get; set; } | public string LessonName { get; set; } | ||||
[NotMapped] | [NotMapped] | ||||
public string LessonSortDetailNo { get; set; } | public string LessonSortDetailNo { get; set; } | ||||
@@ -32,8 +32,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | strSql.Append("SELECT "); | ||||
strSql.Append(@" * "); | |||||
strSql.Append(@" t.*,op.ExamType,op.LessonName "); | |||||
strSql.Append(" FROM TeachClass t "); | strSql.Append(" FROM TeachClass t "); | ||||
strSql.Append(" left join openlessonplan op on op.academicyearno=t.academicyearno and op.semester=t.semester and op.DeptNo=t.DeptNo and op.majorno =t.majorno "); | |||||
strSql.Append(" and op.grade =t.grade and op.lessonno =t.lessonno and op.F_SchoolId =t.F_SchoolId "); | |||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
@@ -73,6 +75,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String); | dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String); | ||||
strSql.Append(" AND t.LessonNo = @LessonNo "); | strSql.Append(" AND t.LessonNo = @LessonNo "); | ||||
} | } | ||||
if (!queryParam["EmpNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.EmpNo = @EmpNo "); | |||||
} | |||||
if (!queryParam["ClassNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.TeachClassNo = @ClassNo "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<TeachClassEntity>(strSql.ToString(), dp, pagination); | return this.BaseRepository("CollegeMIS").FindList<TeachClassEntity>(strSql.ToString(), dp, pagination); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||