strSql.Append(" ,case when bb.LessonSortNo='2' then bb.Score else (case when bb.Score >=60 then bb.Score else (case when sp.Score>= 60 then sp.Score else (case when spt.Score>=60 then spt.Score else bb.Score end) end) end) end as Score ");
strSql.Append(" ,case when bb.LessonSortNo='2' then convert(nvarchar(50),bb.Score)+'(选修)' else (case when bb.Score >=60 then convert(nvarchar(50),bb.Score) else (case when sp.Score>= 60 then convert(nvarchar(50),sp.Score)+'(补)' else (case when spt.Score>=60 then convert(nvarchar(50),spt.Score)+'(重)' else convert(nvarchar(50),bb.Score) end) end) end) end as ScoreFormat ");
strSql.Append(" from ( ");
@@ -1904,6 +1904,26 @@ and a.Academicyearno='" + academicYearNo + "' and a.Semester='" + semester + "')
strSql.Append(" group by s.AcademicYearNo,s.Semester,s.LessonSortNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName ) as bb ");
strSql.Append(" left join StuScoreNotPass sp on bb.AcademicYearNo=sp.AcademicYearNo and bb.Semester=sp.Semester and bb.LessonSortNo=sp.LessonSortNo and bb.LessonNo=sp.LessonNo and bb.LessonName=sp.LessonName and bb.StuNo=sp.StuNo and sp.CheckMark = '1' ");
strSql.Append(" left join StuScoreNotPassTwo spt on bb.AcademicYearNo=spt.AcademicYearNo and bb.Semester=spt.Semester and bb.LessonSortNo=spt.LessonSortNo and bb.LessonNo=spt.LessonNo and bb.LessonName=spt.LessonName and bb.StuNo=spt.StuNo and spt.CheckMark = '1' ");
strSql.Append(" left join LessonInfo li on bb.LessonNo=li.LessonNo ");
strSql.Append(" left join CdLessonType lt on li.LessonTypeId=lt.LTId ");
//关联实训课成绩
strSql.Append(" union all ");
strSql.Append(" select se.AcademicYearNo,se.Semester,se.LessonSortNo,se.LessonNo,se.LessonName,se.StuNo,se.StuName,lt.LessonTypeName,se.Score,convert(nvarchar(50),se.Score) as ScoreFormat from StuScoreExperiment se ");
strSql.Append(" left join LessonInfo li on se.LessonNo=li.LessonNo ");
strSql.Append(" left join CdLessonType lt on li.LessonTypeId=lt.LTId ");
strSql.Append(" where 1=1 and se.CheckMark='1' ");
if (!queryParam["AcademicYearNo"].IsEmpty())
{
strSql.Append(" and se.AcademicYearNo=@AcademicYearNo ");