Browse Source

学生作业详情

tags/正式3.2.5
雍文秀 2 years ago
parent
commit
b7c9324d29
1 changed files with 2 additions and 3 deletions
  1. 2
    3
      sstudy/src/main/resources/mapper/paper/PaperAnalyzeMapper.xml

+ 2
- 3
sstudy/src/main/resources/mapper/paper/PaperAnalyzeMapper.xml View File

@@ -288,10 +288,9 @@
288 288
     <select id="getStudentPaperAnalyzeWeb" resultType="com.xhkjedu.sstudy.vo.paperstudent.StudentPaperVo">
289 289
         select p.paperid,p.papername,p.papernum,p.paperscore,pg.starttime,pg.stoptime,ps.showanswer,pg.showtype
290 290
         ,ps.userscore,ps.costtime,truncate(ps.userscore*100/p.paperscore,2)scorerate,u.username as createname
291
-        ,ps.psstate,ps.pschecked,(select count(*)+1 from t_paper_student ps1
292
-        where ps1.paperid=ps.paperid and ps1.classid=ps.classid and ps1.userscore>ps.userscore)rank,
293
-        (select count(*) from t_paper_student ps2 where ps2.paperid=ps.paperid and ps2.classid=ps.classid) stunum
291
+        ,ps.psstate,ps.pschecked,count(distinct case when ps2.userscore>ps.userscore then ps2.psid else null end)+1 rank,count(distinct ps2.psid)stunum
294 292
         from t_paper_student ps left join t_paper p on ps.paperid = p.paperid
293
+        left join t_paper_student ps2 on ps2.paperid=ps.paperid and ps2.classid=ps.classid
295 294
         left join t_paper_group pg on pg.paperid=ps.paperid and pg.classid=ps.classid
296 295
         left join t_user u on p.createid=u.userid
297 296
         where ps.psid=#{psid} limit 1

Loading…
Cancel
Save