Browse Source

教师APP作业按人统计完善

tags/正式3.10.0
雍文秀 1 year ago
parent
commit
34085d8098

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/listener/MessageConsumer.java View File

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

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/service/paper/PaperTeaAppService.java View File

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

+ 1
- 1
sstudy/src/main/resources/mapper/paper/PaperTeaAppMapper.xml View File

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

+ 4
- 0
sstudy/src/main/resources/mapper/paperstudent/PaperStudentQuestionMapper.xml View File

12
         ELSE (SELECT json_object('qstem',fq.qstem,'qoption',fq.qoption,'qanswer',fq.qanswer,'qanalyze',fq.qanalyze
12
         ELSE (SELECT json_object('qstem',fq.qstem,'qoption',fq.qoption,'qanswer',fq.qanswer,'qanalyze',fq.qanalyze
13
             ,'qtypename',fq.qtypename,'hashear',fq.hashear,'hearfile',fq.hearfile,'qlevel',fq.qlevel,'ctype',fq.ctype)
13
             ,'qtypename',fq.qtypename,'hashear',fq.hashear,'hearfile',fq.hearfile,'qlevel',fq.qlevel,'ctype',fq.ctype)
14
         FROM t_question fq WHERE fq.questionid=q.questionpid) END)mqstem
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
         FROM t_paper_student_question psq LEFT JOIN t_question q ON psq.questionid=q.questionid
19
         FROM t_paper_student_question psq LEFT JOIN t_question q ON psq.questionid=q.questionid
16
         WHERE psq.psid=#{psid} ORDER BY psq.psqid
20
         WHERE psq.psid=#{psid} ORDER BY psq.psqid
17
     </select>
21
     </select>

Loading…
Cancel
Save