Bladeren bron

教师APP作业按人统计完善

tags/正式3.10.0
雍文秀 1 jaar geleden
bovenliggende
commit
34085d8098

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/listener/MessageConsumer.java Bestand weergeven

@@ -87,7 +87,7 @@ public class MessageConsumer {
87 87
             System.out.println(LocalDateTime.now() + " 学生答案合并接收消息内容:" + msg);
88 88
             TPaperStudentQuestion psq = JSON.parseObject(msg, TPaperStudentQuestion.class);
89 89
             Integer papertype = psq.getPapertype();
90
-            if (papertype == 1) {//题库作业
90
+            if (papertype == 1 || papertype == 3) {//题库作业
91 91
                 if (psq.getConverted() != 1) {//合并失败不修改学生答案
92 92
                     psq.setUseranswer(null);
93 93
                 } else {

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/service/paper/PaperTeaAppService.java Bestand weergeven

@@ -190,7 +190,7 @@ public class PaperTeaAppService {
190 190
     public Map getStudentScantron(PStudentVo paper){
191 191
         Map map = paperTeaAppMapper.getStudentScantron(paper);
192 192
         Integer papertype = Integer.parseInt(map.get("papertype").toString());
193
-        if(papertype == 1){
193
+        if(papertype != 2){
194 194
             List<Map> questions = (List<Map>) map.get("questions");
195 195
             List<String> qids = new ArrayList<>();
196 196
             List<Map> rtnques = new ArrayList<>();

+ 1
- 1
sstudy/src/main/resources/mapper/paper/PaperTeaAppMapper.xml Bestand weergeven

@@ -178,7 +178,7 @@
178 178
         select p.papername,ps.papernum,truncate(ps.userscore*100/ps.paperscore,2)scorerate,#{paper.papertype} papertype
179 179
         ,ps.psid,ps.stoptime,ps.costtime,q.qorder,q.qn,truncate(q.stuscore*100/q.qscore,2)correctrate,q.stuscore,q.qscore
180 180
         ,(select count(*)+1 from t_paper_student ps1
181
-        where ps1.paperid=ps.paperid and ps1.userscore>ps.userscore)'rank',ps.paperscore,ps.userscore
181
+        where ps1.paperid=ps.paperid and ps1.classid=ps.classid and ps1.userscore>ps.userscore)'rank',ps.paperscore,ps.userscore
182 182
         <if test="paper.papertype==1 or paper.papertype==3">
183 183
             ,tq.qlevel,tq.questionid,tq.questionpid
184 184
         </if>

+ 4
- 0
sstudy/src/main/resources/mapper/paperstudent/PaperStudentQuestionMapper.xml Bestand weergeven

@@ -12,6 +12,10 @@
12 12
         ELSE (SELECT json_object('qstem',fq.qstem,'qoption',fq.qoption,'qanswer',fq.qanswer,'qanalyze',fq.qanalyze
13 13
             ,'qtypename',fq.qtypename,'hashear',fq.hashear,'hearfile',fq.hearfile,'qlevel',fq.qlevel,'ctype',fq.ctype)
14 14
         FROM t_question fq WHERE fq.questionid=q.questionpid) END)mqstem
15
+        ,(case when q.questionpid is null then (select group_concat(p.pointname separator '  ') from t_question_point qp
16
+        left join t_point p on qp.pointid=p.pointid where qp.questionid=q.questionid)
17
+            else (select group_concat(p.pointname separator '  ') from t_question_point qp
18
+            left join t_point p on qp.pointid=p.pointid where qp.questionid=q.questionpid) end)pointname
15 19
         FROM t_paper_student_question psq LEFT JOIN t_question q ON psq.questionid=q.questionid
16 20
         WHERE psq.psid=#{psid} ORDER BY psq.psqid
17 21
     </select>

Laden…
Annuleren
Opslaan