@Select("select scoreId,examCode,studentId,subject,ptScore,etScore,score,answerDate from score where studentId = #{studentId} order by scoreId desc")
@Select("select scoreId,examCode,studentId,subject,ptScore,etScore,score,answerDate from score where studentId = #{studentId} order by answerDate desc")
@@ -42,20 +42,42 @@ public interface ScoreMapper {
StudentScoreTjfindTjById(StringstudentId);
// 单位统计
@Select("select clazz,count(s.studentId) as count,IFNULL(sum(etScore),0) as countsum,count(distinct s.studentId) as rycount from student t left join score s on s.studentId = t.studentId GROUP BY clazz")
List<DwScoreTj>findTjDw();
@Select("<script> select clazz,count(s.studentId) as count,IFNULL(sum(etScore),0) as countsum,count(distinct s.studentId) as rycount from student t left join score s on s.studentId = t.studentId where 1=1"
@Select("select t.studentId,t.studentName,count(s.studentId) as count,IFNULL(sum(etScore),0) as countsum from student t left join score s on s.studentId = t.studentId where t.clazz=#{clazz} GROUP BY t.studentId order by sum(etScore) desc")
@Select("<script> select t.studentId,t.studentName,count(s.studentId) as count,IFNULL(sum(etScore),0) as countsum from student t left join score s on s.studentId = t.studentId where t.clazz=#{clazz}"
+"<if test='kssj != \"null\"'>"
+" and s.answerDate <![CDATA[>=]]> #{kssj}"
+"</if>"
+"<if test='jssj != \"null\"'>"
+" and s.answerDate <![CDATA[<=]]> #{jssj}"
+"</if>"
+" GROUP BY t.studentId order by sum(etScore) desc"
@Select("<script> select t.studentId,t.studentName,t.clazz as clazz,count(s.studentId) as count,IFNULL(sum(etScore),0) as countsum from student t left join score s on s.studentId = t.studentId"
@Select("<script> select t.studentId,t.studentName,t.clazz as clazz,count(s.studentId) as count,IFNULL(sum(etScore),0) as countsum from student t left join score s on s.studentId = t.studentId where 1=1"
+"<if test='clazz != \"null\"'>"
+"where t.clazz=#{clazz}"
+" and t.clazz=#{clazz}"
+"</if>"
+"<if test='kssj != \"null\"'>"
+" and s.answerDate <![CDATA[>=]]> #{kssj}"
+"</if>"
+"<if test='jssj != \"null\"'>"
+" and s.answerDate <![CDATA[<=]]> #{jssj}"
+"</if>"
+"GROUP BY t.studentId order by sum(etScore) desc"
+"GROUP BY t.studentId order by sum(etScore) desc"