@ -186,7 +187,7 @@ public interface AssesmentMapper {
*@return
*/
@Select("select DISTINCT DATE_FORMAT(creationTime,'%Y') as creationTime from experimental_class_ning "+
" WHERE isdel=0 and founder=(select staffName from staff where staffId=#{staffId}) and schoolId={schoolId} GROUP BY creationTime ORDER BY creationTime desc ")
" WHERE isdel=0 and founder=(select staffName from staff where staffId=#{staffId}) and schoolId=#{schoolId} GROUP BY creationTime ORDER BY creationTime desc ")
@ -234,12 +235,12 @@ public interface AssesmentMapper {
@Select("SELECT c.classId as classId,c.className as className from assessment ass left join class c on FIND_IN_SET(c.classId,ass.classId) where ass.id=#{assesmentId}")
List<SutdentClass>queryClass(IntegerassesmentId);
@Select("select s.studentId,studentName from student s left join experimental_class_student ecs on s.studentId=ecs.studentId where s.isdel=0 and ecs.experimentalClassId=#{experimentalClassId} ")
//s.isdel=0 and
@Select("select s.studentId,studentName from student s left join experimental_class_student ecs on s.studentId=ecs.studentId where ecs.experimentalClassId=#{experimentalClassId} ")
@Select("SELECT studentId,studentName from student where isdel=0 and classId=#{classId} ")
//isdel=0 and
@Select("SELECT studentId,studentName from student where classId=#{classId} ")
List<Student>getByclassId(IntegerclassId);
@ -257,23 +258,13 @@ public interface AssesmentMapper {
/**
*分组查询分数和对应人数
*
*@paramassesmentId
*@paramexperimentalClassId
*@paramclassId
*@return
*/
@Select({"<script>",
"select re.score as score,count(re.recordId) as number FROM (record re left join assessment ass on ass.id=re.assesmentId) left join student stu on re.studentId=stu.studentId "
+" where re.assesmentId=#{assesmentId} ",
" <if test=' experimentalClassId!=null '> and FIND_IN_SET(#{experimentalClassId},stu.experimentalClassId) </if>",
" <if test=' classId!=null '>"
+"<foreach collection='classId' item='id' open='and stu.classId in (' separator=',' close=')'>#{id}</foreach>"
+"</if>",
" and re.score is not null GROUP BY re.score",
"select score,count(studentId) as number from record where assesmentId=#{assesmentId}",
"<foreach collection='students' item='stu' open='and studentId in (' separator=',' close=')'>#{stu.studentId}</foreach>",
@ -312,28 +303,21 @@ public interface AssesmentMapper {
*@return
*/
@Select({"<script>",
"select judgmentPointsName,count(pr.judgmentPointsId) as number from PointRecord pr left join hr_judgment_points jp on pr.judgmentPointsId=jp.judgmentPointsId where rightAndWrong=-1 and assesmentId=#{assesmentId} ",
"select judgmentPointsName,count(pr.judgmentPointsId) as number from PointRecord pr left join hr_judgment_points jp on pr.judgmentPointsId=jp.judgmentPointsId "
+"where rightAndWrong=-1 and assesmentId=#{assesmentId} ",
" <if test='experimentalClassId!=null '> and experimentalClassId=#{experimentalClassId}</if>",
" <if test='classId!=null '>"
+"<foreach collection='classId' item='id' open='and classId in (' separator=',' close=')'>#{id} </foreach>"
+"</if>",
" <if test='classId!=null '> and classId =#{classId} </if>",
"select stu.studentName as studentName,re.score as score FROM (record re left join assessment ass on ass.id=re.assesmentId) left join student stu on re.studentId=stu.studentId "