Browse Source

报告接口测试及完善

wn
王宁 1 day ago
parent
commit
a65b934ecb

+ 1
- 1
smarking/src/main/java/com/xhkjedu/smarking/controller/report/XkReportController.java View File

55
      * @Param [params]
55
      * @Param [params]
56
      * @Return com.xhkjedu.vo.ResultVo
56
      * @Return com.xhkjedu.vo.ResultVo
57
      **/
57
      **/
58
-    @PostMapping("/xkst_Nd")
58
+    @PostMapping("/xkst_nd")
59
     public ResultVo listQuestionForXhXhstNdGroup(@RequestBody ExamReportParams params){
59
     public ResultVo listQuestionForXhXhstNdGroup(@RequestBody ExamReportParams params){
60
         N_Utils.validation(new Object[]{params.getExamid(),"考试id",1,params.getSubjectid(),"科目id",2});
60
         N_Utils.validation(new Object[]{params.getExamid(),"考试id",1,params.getSubjectid(),"科目id",2});
61
         return new ResultVo(0,"获取成功",msrClassQuestionService.listQuestionForXhXhstNdGroup(params));
61
         return new ResultVo(0,"获取成功",msrClassQuestionService.listQuestionForXhXhstNdGroup(params));

+ 0
- 1
smarking/src/main/java/com/xhkjedu/smarking/controller/report/ZhReportController.java View File

4
 import com.github.pagehelper.PageInfo;
4
 import com.github.pagehelper.PageInfo;
5
 import com.xhkjedu.smarking.model.exam.MsSubject;
5
 import com.xhkjedu.smarking.model.exam.MsSubject;
6
 import com.xhkjedu.smarking.model.report.reportclass.MsrClassSubjectGrade;
6
 import com.xhkjedu.smarking.model.report.reportclass.MsrClassSubjectGrade;
7
-import com.xhkjedu.smarking.model.report.reportstu.MsrStudent;
8
 import com.xhkjedu.smarking.model.report.reportstu.MsrStudentAction;
7
 import com.xhkjedu.smarking.model.report.reportstu.MsrStudentAction;
9
 import com.xhkjedu.smarking.model.report.reportsubject.MsrSubject;
8
 import com.xhkjedu.smarking.model.report.reportsubject.MsrSubject;
10
 import com.xhkjedu.smarking.service.report.report.*;
9
 import com.xhkjedu.smarking.service.report.report.*;

+ 2
- 1
smarking/src/main/java/com/xhkjedu/smarking/mapper/paper/MsTemplateMapper.java View File

2
 
2
 
3
 import com.xhkjedu.base.TkMapper;
3
 import com.xhkjedu.base.TkMapper;
4
 import com.xhkjedu.smarking.model.paper.MsTemplate;
4
 import com.xhkjedu.smarking.model.paper.MsTemplate;
5
+import com.xhkjedu.smarking.vo.scan.TemplateVo;
5
 import org.apache.ibatis.annotations.Param;
6
 import org.apache.ibatis.annotations.Param;
6
 
7
 
7
 import java.util.List;
8
 import java.util.List;
30
     int getUnSelTemplateCount(@Param("mpid")Integer mpid);
31
     int getUnSelTemplateCount(@Param("mpid")Integer mpid);
31
 
32
 
32
     //试卷所有模板信息
33
     //试卷所有模板信息
33
-    List<Map<String,Object>> listTemplateBlockQueByMpid(@Param("mpid") Integer mpid);
34
+    List<TemplateVo> listTemplateBlockQueByMpid(@Param("mpid") Integer mpid);
34
 
35
 
35
     //获取模版详情和考试id
36
     //获取模版详情和考试id
36
     MsTemplate getTemplateAndExamidByMtid(@Param("mtid") Integer mtid);
37
     MsTemplate getTemplateAndExamidByMtid(@Param("mtid") Integer mtid);

+ 1
- 1
smarking/src/main/java/com/xhkjedu/smarking/mapper/report/reportclass/MsrClassSubjectGradeMapper.java View File

15
 public interface MsrClassSubjectGradeMapper extends TkMapper<MsrClassSubjectGrade> {
15
 public interface MsrClassSubjectGradeMapper extends TkMapper<MsrClassSubjectGrade> {
16
 
16
 
17
     //综合报告-试题汇总表-全部班级-科目情况-四率等级分析
17
     //综合报告-试题汇总表-全部班级-科目情况-四率等级分析
18
-    List<MsrClassSubjectGrade> listSubjectGrade(@Param("sg")MsrClassSubjectGrade sg);
18
+    List<Map<String,Object>> listSubjectGrade(@Param("sg")MsrClassSubjectGrade sg);
19
 
19
 
20
     //综合报告-班级对比-全科及格率分析
20
     //综合报告-班级对比-全科及格率分析
21
     List<MsrClassSubjectGrade> listSubjectGradeForQk(@Param("examid") Integer examid,@Param("reportcode") String reportcode);
21
     List<MsrClassSubjectGrade> listSubjectGradeForQk(@Param("examid") Integer examid,@Param("reportcode") String reportcode);

+ 24
- 12
smarking/src/main/java/com/xhkjedu/smarking/service/report/report/MsrClassQuestionService.java View File

55
         subjectGrade.setClassid(0);
55
         subjectGrade.setClassid(0);
56
         subjectGrade.setReportcode("zh");
56
         subjectGrade.setReportcode("zh");
57
         //获取科目四率
57
         //获取科目四率
58
-        List<MsrClassSubjectGrade> subjectGradeList = msrClassSubjectGradeMapper.listSubjectGrade(subjectGrade);
58
+        List<Map<String,Object>> subjectGradeList = msrClassSubjectGradeMapper.listSubjectGrade(subjectGrade);
59
         subjectMap.put("subjectGradeList",subjectGradeList);
59
         subjectMap.put("subjectGradeList",subjectGradeList);
60
 
60
 
61
         //获取四率参数
61
         //获取四率参数
83
             List<Map<String,Object>> allSchool = questionList.stream().filter(m -> m.get("classid").equals(0)).collect(Collectors.toList());
83
             List<Map<String,Object>> allSchool = questionList.stream().filter(m -> m.get("classid").equals(0)).collect(Collectors.toList());
84
             for(Map<String,Object> school : allSchool){
84
             for(Map<String,Object> school : allSchool){
85
                 school.put("classname","学校全体");
85
                 school.put("classname","学校全体");
86
-                if(school.get("qtype").equals("1")){
86
+                if(school.get("qtype").equals(1)){
87
                     objlist.add(school);
87
                     objlist.add(school);
88
                 }else{
88
                 }else{
89
                     sublist.add(school);
89
                     sublist.add(school);
94
                 List<Map<String,Object>> classQues = questionList.stream().filter(m -> m.get("classid").equals(c.getClassid())).collect(Collectors.toList());
94
                 List<Map<String,Object>> classQues = questionList.stream().filter(m -> m.get("classid").equals(c.getClassid())).collect(Collectors.toList());
95
                 for(Map<String,Object> cq : classQues){
95
                 for(Map<String,Object> cq : classQues){
96
                     cq.put("classname",c.getClassname());
96
                     cq.put("classname",c.getClassname());
97
-                    if(cq.get("qtype").equals("1")){
97
+                    if(cq.get("qtype").equals(1)){
98
                         objlist.add(cq);
98
                         objlist.add(cq);
99
                     }else{
99
                     }else{
100
                         sublist.add(cq);
100
                         sublist.add(cq);
102
                 }
102
                 }
103
             }
103
             }
104
         }else{
104
         }else{
105
-            objlist = questionList.stream().filter(m -> m.get("qtype").equals("1")).collect(Collectors.toList());
106
-            sublist = questionList.stream().filter(m -> m.get("qtype").equals("2")).collect(Collectors.toList());
105
+            objlist = questionList.stream().filter(m -> m.get("qtype").equals(1)).collect(Collectors.toList());
106
+            sublist = questionList.stream().filter(m -> m.get("qtype").equals(2)).collect(Collectors.toList());
107
         }
107
         }
108
 
108
 
109
         Map<String,Object> rtnMap = new HashMap<>();
109
         Map<String,Object> rtnMap = new HashMap<>();
259
         }
259
         }
260
 
260
 
261
         Map<String,Object> rtnMap = new HashMap<>();
261
         Map<String,Object> rtnMap = new HashMap<>();
262
-        rtnMap.put("firstN",firstN);
263
-        rtnMap.put("lastN",lastN);
262
+        rtnMap.put("firstN",firstN.stream().map(MsrClassQuestion::getQn).distinct().collect(Collectors.toList()));
263
+        rtnMap.put("lastN",lastN.stream().map(MsrClassQuestion::getQn).distinct().collect(Collectors.toList()));
264
         rtnMap.put("qfdList",qfdList);
264
         rtnMap.put("qfdList",qfdList);
265
         return rtnMap;
265
         return rtnMap;
266
     }
266
     }
358
                 classMap.put("classid",classid);
358
                 classMap.put("classid",classid);
359
                 MsrClassQuestion classQues = entryList.stream().filter(m -> m.getClassid() == classid).findFirst().orElse(null);
359
                 MsrClassQuestion classQues = entryList.stream().filter(m -> m.getClassid() == classid).findFirst().orElse(null);
360
                 if(classQues!= null){
360
                 if(classQues!= null){
361
-                    classMap.put("scorerate",classQues.getScorerate());
361
+                    if(classid == 0){
362
+                        classMap.put("scorerate",classQues.getSchoolavgrate());
363
+                    }else{
364
+                        classMap.put("scorerate",classQues.getScorerate());
365
+                    }
362
                 }else{
366
                 }else{
363
                     classMap.put("scorerate",0);
367
                     classMap.put("scorerate",0);
364
                 }
368
                 }
401
             }else{
405
             }else{
402
                 //获取年级的
406
                 //获取年级的
403
                 List<String> qnList = schoolQues.stream().map(MsrClassQuestion::getQn).distinct().collect(Collectors.toList());
407
                 List<String> qnList = schoolQues.stream().map(MsrClassQuestion::getQn).distinct().collect(Collectors.toList());
404
-                double sumScoreRate = schoolQues.stream().mapToDouble(MsrClassQuestion::getScorerate).sum();
405
-                zsndMap.put("schoolscorerate", MarkingUtil.div(sumScoreRate,qnList.size()));
408
+                if(qnList.isEmpty()){
409
+                    zsndMap.put("schoolscorerate", 0);
410
+                }else{
411
+                    double sumScoreRate = schoolQues.stream().mapToDouble(MsrClassQuestion::getScorerate).sum();
412
+                    zsndMap.put("schoolscorerate", MarkingUtil.div(sumScoreRate,qnList.size()));
413
+                }
406
             }
414
             }
407
 
415
 
408
             //获取班级的情况
416
             //获取班级的情况
411
                 zsndMap.put("classscorerate", 0);
419
                 zsndMap.put("classscorerate", 0);
412
             }else{
420
             }else{
413
                 List<String> qnList = schoolQues.stream().map(MsrClassQuestion::getQn).distinct().collect(Collectors.toList());
421
                 List<String> qnList = schoolQues.stream().map(MsrClassQuestion::getQn).distinct().collect(Collectors.toList());
414
-                double classScoreRate = schoolQues.stream().mapToDouble(MsrClassQuestion::getScorerate).sum();
415
-                zsndMap.put("classscorerate",MarkingUtil.div(classScoreRate,qnList.size()));
422
+                if(qnList.isEmpty()){
423
+                    zsndMap.put("classscorerate", 0);
424
+                }else{
425
+                    double classScoreRate = schoolQues.stream().mapToDouble(MsrClassQuestion::getScorerate).sum();
426
+                    zsndMap.put("classscorerate",MarkingUtil.div(classScoreRate,qnList.size()));
427
+                }
416
             }
428
             }
417
 
429
 
418
             ndList.add(zsndMap);
430
             ndList.add(zsndMap);

+ 13
- 12
smarking/src/main/java/com/xhkjedu/smarking/service/scan/MsScanbatchPaperService.java View File

15
 import com.xhkjedu.smarking.mapper.system.SchoolMapper;
15
 import com.xhkjedu.smarking.mapper.system.SchoolMapper;
16
 import com.xhkjedu.smarking.mapper.system.UserMapper;
16
 import com.xhkjedu.smarking.mapper.system.UserMapper;
17
 import com.xhkjedu.smarking.model.paper.MsPaperBlockQuestion;
17
 import com.xhkjedu.smarking.model.paper.MsPaperBlockQuestion;
18
-import com.xhkjedu.smarking.model.paper.MsTemplate;
19
 import com.xhkjedu.smarking.model.scan.MsScanbatch;
18
 import com.xhkjedu.smarking.model.scan.MsScanbatch;
20
 import com.xhkjedu.smarking.model.scan.MsScanbatchPaper;
19
 import com.xhkjedu.smarking.model.scan.MsScanbatchPaper;
21
 import com.xhkjedu.smarking.model.scan.MsScanbatchPaperBlock;
20
 import com.xhkjedu.smarking.model.scan.MsScanbatchPaperBlock;
25
 import com.xhkjedu.smarking.model.stupaper.MsPaperStudentQuestion;
24
 import com.xhkjedu.smarking.model.stupaper.MsPaperStudentQuestion;
26
 import com.xhkjedu.smarking.utils.MarkingUtil;
25
 import com.xhkjedu.smarking.utils.MarkingUtil;
27
 import com.xhkjedu.smarking.vo.scan.ScanParams;
26
 import com.xhkjedu.smarking.vo.scan.ScanParams;
27
+import com.xhkjedu.smarking.vo.scan.TemplateVo;
28
 import com.xhkjedu.smarking.vo.stupaper.PaperStudentWebVo;
28
 import com.xhkjedu.smarking.vo.stupaper.PaperStudentWebVo;
29
 import com.xhkjedu.smarking.vo.system.SchoolCloudVo;
29
 import com.xhkjedu.smarking.vo.system.SchoolCloudVo;
30
 import com.xhkjedu.utils.N_Utils;
30
 import com.xhkjedu.utils.N_Utils;
95
     }
95
     }
96
 
96
 
97
     //获取试卷的所有模版信息
97
     //获取试卷的所有模版信息
98
-    public List<Map<String,Object>> listTemplates(Integer mpid){
98
+    public List<TemplateVo> listTemplates(Integer mpid){
99
         return msTemplateMapper.listTemplateBlockQueByMpid(mpid);
99
         return msTemplateMapper.listTemplateBlockQueByMpid(mpid);
100
     }
100
     }
101
 
101
 
675
         if(scanbatchPapers.isEmpty()) return;
675
         if(scanbatchPapers.isEmpty()) return;
676
 
676
 
677
         //获取考试对应的试卷模板及坐标信息
677
         //获取考试对应的试卷模板及坐标信息
678
-        List<Map<String,Object>> templates = msTemplateMapper.listTemplateBlockQueByMpid(mpid);
678
+        List<TemplateVo> templates = msTemplateMapper.listTemplateBlockQueByMpid(mpid);
679
         if(templates.isEmpty()) throw new ServiceException("该考试未设置试卷模板");
679
         if(templates.isEmpty()) throw new ServiceException("该考试未设置试卷模板");
680
 
680
 
681
         //清空学生题块试题信息和学生试卷扫描识别信息
681
         //清空学生题块试题信息和学生试卷扫描识别信息
684
         msScanbatchPaperMapper.deleteScanPaperForReidentify(param);
684
         msScanbatchPaperMapper.deleteScanPaperForReidentify(param);
685
     }
685
     }
686
 
686
 
687
-    private void chandleIdentifyPaper(List<MsScanbatchPaper> scanbatchPapers,List<MsTemplate> templates){
688
-        MsTemplate template = getPaperTemplate(scanbatchPapers,templates);//试卷模板
687
+    private void chandleIdentifyPaper(List<MsScanbatchPaper> scanbatchPapers,List<TemplateVo> templates){
688
+        TemplateVo template = getPaperTemplate(scanbatchPapers,templates);//试卷模板
689
         for(MsScanbatchPaper scanbatchPaper : scanbatchPapers){
689
         for(MsScanbatchPaper scanbatchPaper : scanbatchPapers){
690
 
690
 
691
+
691
         }
692
         }
692
     }
693
     }
693
-    //重新识别-试卷模板
694
-    private MsTemplate getPaperTemplate(List<MsScanbatchPaper> scanbatchPapers,List<MsTemplate> templates){
695
-        MsTemplate template = null;//试卷模板
694
+    //重新识别-获取试卷模板
695
+    private TemplateVo getPaperTemplate(List<MsScanbatchPaper> scanbatchPapers,List<TemplateVo> templates){
696
+        TemplateVo template = null;//试卷模板
696
         if(templates.size() == 1){
697
         if(templates.size() == 1){
697
             template = templates.get(0);
698
             template = templates.get(0);
698
         }else{
699
         }else{
699
             MsScanbatchPaper firstPaper = scanbatchPapers.get(0);
700
             MsScanbatchPaper firstPaper = scanbatchPapers.get(0);
700
             Integer maxWidth = firstPaper.getTwidth() + 30;
701
             Integer maxWidth = firstPaper.getTwidth() + 30;
701
             Integer minWidth = firstPaper.getTwidth() - 30;
702
             Integer minWidth = firstPaper.getTwidth() - 30;
702
-            for(MsTemplate t : templates){
703
+            for(TemplateVo t : templates){
703
                 if(t.getTwidth() >= minWidth && t.getTwidth() <= maxWidth){
704
                 if(t.getTwidth() >= minWidth && t.getTwidth() <= maxWidth){
704
                     template = t;
705
                     template = t;
705
                     break;
706
                     break;
709
         return template;
710
         return template;
710
     }
711
     }
711
 
712
 
712
-    //重新识别-获取试卷正反面图片
713
-    private void settPaperFrontAndBack(MsScanbatchPaper scanbatchPaper,MsTemplate template){
714
-
713
+    //重新识别-获取试卷正反面正确图片
714
+    private void settPaperFrontAndBack(MsScanbatchPaper scanbatchPaper,TemplateVo template){
715
+        String paperPic = scanbatchPaper.getPaperpic();
715
     }
716
     }
716
 
717
 
717
 
718
 

+ 2
- 2
smarking/src/main/java/com/xhkjedu/smarking/utils/MarkingUtil.java View File

412
                 result += line;
412
                 result += line;
413
             }
413
             }
414
         } catch (Exception e) {
414
         } catch (Exception e) {
415
-            log.error("发送 POST 请求出现异常" + e.getMessage());
415
+            log.error("发送 POST 请求出现异常" + e.getMessage());
416
         }finally {
416
         }finally {
417
             try {
417
             try {
418
                 if(bufferedOutputStream!= null){
418
                 if(bufferedOutputStream!= null){
422
                     bufferedReader.close();
422
                     bufferedReader.close();
423
                 }
423
                 }
424
             } catch (IOException ex) {
424
             } catch (IOException ex) {
425
-                log.error("关闭输入输出流异常", ex.getMessage());
425
+                log.error("关闭输入输出流异常:" + ex.getMessage());
426
             }
426
             }
427
         }
427
         }
428
         return result;
428
         return result;

+ 22
- 0
smarking/src/main/java/com/xhkjedu/smarking/vo/scan/TemplateBlockQuestionVo.java View File

1
+package com.xhkjedu.smarking.vo.scan;
2
+
3
+import lombok.Data;
4
+
5
+/**
6
+ * @Description:模板题块试题
7
+ * @Author: WN
8
+ * @Date: 2025/1/13 10:04:22
9
+ **/
10
+@Data
11
+public class TemplateBlockQuestionVo {
12
+    //阅卷模板题块定客观题ID
13
+    private Integer mtbqid;
14
+    //题号
15
+    private String qn;
16
+    //试卷试题ID
17
+    private Integer mptqid;
18
+    //定位坐标
19
+    private String qlocalcoor;
20
+    //排序或首题题号
21
+    private Integer mtbqorder;
22
+}

+ 34
- 0
smarking/src/main/java/com/xhkjedu/smarking/vo/scan/TemplateBlockVo.java View File

1
+package com.xhkjedu.smarking.vo.scan;
2
+
3
+import lombok.Data;
4
+
5
+import java.util.List;
6
+
7
+/**
8
+ * @Description:模板题块
9
+ * @Author: WN
10
+ * @Date: 2025/1/13 10:02:33
11
+ **/
12
+@Data
13
+public class TemplateBlockVo {
14
+    //阅卷模板题块定位区ID
15
+    private Integer mtbid;
16
+    //题块ID
17
+    private Integer mblockid;
18
+    //类型1客观题2主观题
19
+    private Integer mttype;
20
+    //客观题方向1横向2纵向
21
+    private Integer direct;
22
+    //排序/首题号
23
+    private Integer mtborder;
24
+    //定位区坐标
25
+    private String localcoor;
26
+    //主观题扩展区坐标列表
27
+    private String extendcoor;
28
+    //主观题打分区坐标
29
+    private String scorecoor;
30
+
31
+    //题块中试题
32
+    private List<TemplateBlockQuestionVo> tbquestions;
33
+
34
+}

+ 53
- 0
smarking/src/main/java/com/xhkjedu/smarking/vo/scan/TemplateVo.java View File

1
+package com.xhkjedu.smarking.vo.scan;
2
+
3
+import lombok.Data;
4
+
5
+import java.util.List;
6
+
7
+/**
8
+ * @Description:试卷模板
9
+ * @Author: WN
10
+ * @Date: 2025/1/13 10:00:24
11
+ **/
12
+@Data
13
+public class TemplateVo {
14
+    //阅卷扫描模板ID
15
+    private Integer mtid;
16
+    //试卷ID
17
+    private Integer mpid;
18
+    //模板尺寸1A4 2A3
19
+    private Integer tsize;
20
+    //纸张宽度(像素)
21
+    private Integer twidth;
22
+    //纸张高度(像素)
23
+    private Integer theight;
24
+    //正面图片
25
+    private String tfront;
26
+    //反面图片
27
+    private String tback;
28
+    //空白页索引
29
+    private Integer blankindex;
30
+    //定位正面旋转角度
31
+    private Integer anglefront;
32
+    //定位反面旋转角度
33
+    private Integer angleback;
34
+    //正面定位坐标
35
+    private String coorfront;
36
+    //反面定位坐标
37
+    private String coorback;
38
+    //正面定位图片地址
39
+    private String dwtfront;
40
+    //反面定位图片地址
41
+    private String dwtback;
42
+    //缺考标记坐标
43
+    private String misscoor;
44
+    //违规标记坐标
45
+    private String violatecoor;
46
+    //考号定位坐标
47
+    private String examnocoor;
48
+    //涂卡数字坐标列表
49
+    private String cardcoor;
50
+
51
+    //模板题块
52
+    private List<TemplateBlockVo> tblocks;
53
+}

+ 6
- 4
smarking/src/main/resources/mapper/paper/MsTemplateMapper.xml View File

51
     </select>
51
     </select>
52
 
52
 
53
     <!--试卷所有模板信息-->
53
     <!--试卷所有模板信息-->
54
-    <resultMap id="paperTemplate" type="java.util.Map">
54
+    <resultMap id="paperTemplate" type="com.xhkjedu.smarking.vo.scan.TemplateVo">
55
         <result property="mtid" column="mtid"/>
55
         <result property="mtid" column="mtid"/>
56
         <result property="mpid" column="mpid"/>
56
         <result property="mpid" column="mpid"/>
57
         <result property="tsize" column="tsize"/>
57
         <result property="tsize" column="tsize"/>
58
         <result property="twidth" column="twidth"/>
58
         <result property="twidth" column="twidth"/>
59
         <result property="theight" column="theight"/>
59
         <result property="theight" column="theight"/>
60
+        <result property="tfront" column="tfront"/>
61
+        <result property="tback" column="tback"/>
60
         <result property="blankindex" column="blankindex"/>
62
         <result property="blankindex" column="blankindex"/>
61
         <result property="anglefront" column="anglefront"/>
63
         <result property="anglefront" column="anglefront"/>
62
         <result property="angleback" column="angleback"/>
64
         <result property="angleback" column="angleback"/>
68
         <result property="violatecoor" column="violatecoor"/>
70
         <result property="violatecoor" column="violatecoor"/>
69
         <result property="examnocoor" column="examnocoor"/>
71
         <result property="examnocoor" column="examnocoor"/>
70
         <result property="cardcoor" column="cardcoor"/>
72
         <result property="cardcoor" column="cardcoor"/>
71
-        <collection property="tblocks" ofType="java.util.Map" javaType="java.util.ArrayList">
73
+        <collection property="tblocks" ofType="com.xhkjedu.smarking.vo.scan.TemplateBlockVo" javaType="java.util.ArrayList">
72
             <result property="mtbid" column="mtbid"/>
74
             <result property="mtbid" column="mtbid"/>
73
             <result property="mblockid" column="mblockid"/>
75
             <result property="mblockid" column="mblockid"/>
74
             <result property="mttype" column="mttype"/>
76
             <result property="mttype" column="mttype"/>
76
             <result property="localcoor" column="localcoor"/>
78
             <result property="localcoor" column="localcoor"/>
77
             <result property="extendcoor" column="extendcoor"/>
79
             <result property="extendcoor" column="extendcoor"/>
78
             <result property="scorecoor" column="scorecoor"/>
80
             <result property="scorecoor" column="scorecoor"/>
79
-            <collection property="tbquestions" ofType="java.util.Map" javaType="java.util.ArrayList">
81
+            <collection property="tbquestions" ofType="com.xhkjedu.smarking.vo.scan.TemplateBlockQuestionVo" javaType="java.util.ArrayList">
80
                 <result property="mtbqid" column="mtbqid"/>
82
                 <result property="mtbqid" column="mtbqid"/>
81
                 <result property="qn" column="qn"/>
83
                 <result property="qn" column="qn"/>
82
                 <result property="mptqid" column="mptqid"/>
84
                 <result property="mptqid" column="mptqid"/>
86
         </collection>
88
         </collection>
87
     </resultMap>
89
     </resultMap>
88
     <select id="listTemplateBlockQueByMpid" resultMap="paperTemplate">
90
     <select id="listTemplateBlockQueByMpid" resultMap="paperTemplate">
89
-        select t.mtid,t.mpid,t.tsize,t.twidth,t.theight,t.blankindex,t.anglefront,t.angleback,t.coorfront,t.coorback,
91
+        select t.mtid,t.mpid,t.tsize,t.twidth,t.theight,t.tfront,t.tback,t.blankindex,t.anglefront,t.angleback,t.coorfront,t.coorback,
90
         t.dwtfront,t.dwtback,t.misscoor,t.violatecoor,t.examnocoor,t.cardcoor
92
         t.dwtfront,t.dwtback,t.misscoor,t.violatecoor,t.examnocoor,t.cardcoor
91
         ,tb.mtbid,tb.mblockid,tb.mttype,tb.mtborder,tb.localcoor,tb.extendcoor,tb.scorecoor
93
         ,tb.mtbid,tb.mblockid,tb.mttype,tb.mtborder,tb.localcoor,tb.extendcoor,tb.scorecoor
92
         ,q.mtbqid,q.qn,q.mptqid,q.qlocalcoor,q.mtbqorder
94
         ,q.mtbqid,q.qn,q.mptqid,q.qlocalcoor,q.mtbqorder

+ 2
- 3
smarking/src/main/resources/mapper/report/reportclass/MsrClassQuestionMapper.xml View File

92
 
92
 
93
     <!--学科报告-各班学科试题分析-->
93
     <!--学科报告-各班学科试题分析-->
94
     <select id="listQuestionForXh" resultType="com.xhkjedu.smarking.model.report.reportclass.MsrClassQuestion">
94
     <select id="listQuestionForXh" resultType="com.xhkjedu.smarking.model.report.reportclass.MsrClassQuestion">
95
-        select q.cqid,q.mptqid,q.classid,q.qn,q.qtype,q.fullscore,
95
+        select distinct q.cqid,q.mptqid,q.classid,q.qn,q.qtype,q.qorder,q.fullscore,
96
         q.classavgrate,q.schoolavgrate,q.scorerate,q.scoreratec,q.nd,q.ndms,q.ndfw,q.qfd,q.qfdms,c.classname
96
         q.classavgrate,q.schoolavgrate,q.scorerate,q.scoreratec,q.nd,q.ndms,q.ndfw,q.qfd,q.qfdms,c.classname
97
         from msr_class_question q left join ms_class c on q.examid=c.examid
97
         from msr_class_question q left join ms_class c on q.examid=c.examid
98
         and q.subjectid=c.subjectid and q.classid=c.classid
98
         and q.subjectid=c.subjectid and q.classid=c.classid
99
         where q.examid=#{param.examid} and q.subjectid=#{param.subjectid}
99
         where q.examid=#{param.examid} and q.subjectid=#{param.subjectid}
100
         <if test="param.selclass == 3">
100
         <if test="param.selclass == 3">
101
-            and q.classid in
102
-            <foreach collection="param.classids" item="item" open="(" separator="," close=")">#{item}</foreach>
101
+            and q.classid in (${param.classids})
103
         </if>
102
         </if>
104
         <if test="param.selclass == 4"> and q.classid = #{param.classid}</if>
103
         <if test="param.selclass == 4"> and q.classid = #{param.classid}</if>
105
         order by q.mptqid
104
         order by q.mptqid

+ 3
- 3
smarking/src/main/resources/mapper/report/reportclass/MsrClassSubjectGradeMapper.xml View File

3
 <mapper namespace="com.xhkjedu.smarking.mapper.report.reportclass.MsrClassSubjectGradeMapper">
3
 <mapper namespace="com.xhkjedu.smarking.mapper.report.reportclass.MsrClassSubjectGradeMapper">
4
 
4
 
5
     <!--综合报告-试题汇总表-全部班级-科目情况-四率等级分析-->
5
     <!--综合报告-试题汇总表-全部班级-科目情况-四率等级分析-->
6
-    <select id="listSubjectGrade" resultType="com.xhkjedu.smarking.model.report.reportclass.MsrClassSubjectGrade">
7
-        select * from msr_class_subject_grade where examid = #{sg.examid} and subjectid = #{sg.subjectId}
8
-        and reportcode = #{sg.reportCode} and classid = #{sg.classId}
6
+    <select id="listSubjectGrade" resultType="java.util.Map">
7
+        select csgid,rangename,rangenum,rangerate,djscore,djrate from msr_class_subject_grade where examid = #{sg.examid} and subjectid = #{sg.subjectid}
8
+        and reportcode = #{sg.reportcode} and classid = #{sg.classid}
9
     </select>
9
     </select>
10
     <!--综合报告-班级对比-全科及格率分析-->
10
     <!--综合报告-班级对比-全科及格率分析-->
11
     <select id="listSubjectGradeForQk" resultType="com.xhkjedu.smarking.model.report.reportclass.MsrClassSubjectGrade">
11
     <select id="listSubjectGradeForQk" resultType="com.xhkjedu.smarking.model.report.reportclass.MsrClassSubjectGrade">

+ 3
- 5
smarking/src/main/resources/mapper/report/reportstu/MsrStudentMapper.xml View File

32
         <result property="totalscore" column="totalscore"/>
32
         <result property="totalscore" column="totalscore"/>
33
         <collection property="questions" ofType="java.util.Map" javaType="java.util.ArrayList">
33
         <collection property="questions" ofType="java.util.Map" javaType="java.util.ArrayList">
34
             <result property="mpsqid" column="mpsqid"/>
34
             <result property="mpsqid" column="mpsqid"/>
35
-            <result property="qn" column="qn"/>
36
             <result property="stuscore" column="xtscore"/>
35
             <result property="stuscore" column="xtscore"/>
37
             <result property="answertype" column="answertype"/>
36
             <result property="answertype" column="answertype"/>
38
             <result property="stuanswer" column="stuanswer"/>
37
             <result property="stuanswer" column="stuanswer"/>
39
             <result property="qanswer" column="qanswer"/>
38
             <result property="qanswer" column="qanswer"/>
40
             <result property="qscore" column="qscore"/>
39
             <result property="qscore" column="qscore"/>
41
             <result property="qtype" column="qtype"/>
40
             <result property="qtype" column="qtype"/>
42
-            <result property="mptqn" column="mptqn"/>
41
+            <result property="qnstr" column="qnstr"/>
43
         </collection>
42
         </collection>
44
     </resultMap>
43
     </resultMap>
45
     <select id="listStuScoreAndRankByExamidAndSubjectid" resultMap="studentChengji">
44
     <select id="listStuScoreAndRankByExamidAndSubjectid" resultMap="studentChengji">
46
         select distinct s.rsid,s.examid,s.subjectid,s.studentid,s.classid,c.classname,s.stuscore,s.classrank,
45
         select distinct s.rsid,s.examid,s.subjectid,s.studentid,s.classid,c.classname,s.stuscore,s.classrank,
47
         s.schoolrank,s.objscore,s.subscore,sq.mpsqid,sq.qn,sq.stuscore as xtscore,sq.answertype,sq.stuanswer,
46
         s.schoolrank,s.objscore,s.subscore,sq.mpsqid,sq.qn,sq.stuscore as xtscore,sq.answertype,sq.stuanswer,
48
-        q.qanswer,q.qscore,q.qtype,qt.mptqn
47
+        q.qanswer,q.qscore,q.qtype,q.qnstr
49
         from msr_student s left join ms_class c on s.classid=c.classid
48
         from msr_student s left join ms_class c on s.classid=c.classid
50
         left join ms_paper_student_question sq on s.examid=sq.examid
49
         left join ms_paper_student_question sq on s.examid=sq.examid
51
         and s.subjectid=sq.subjectid and s.studentid=sq.studentid
50
         and s.subjectid=sq.subjectid and s.studentid=sq.studentid
52
         left join ms_paper_qtype_question q on sq.mptqid=q.mptqid
51
         left join ms_paper_qtype_question q on sq.mptqid=q.mptqid
53
-        left join ms_paper_qtype qt on q.mptid=qt.mptid
54
         where s.examid=#{examid} and s.subjectid=#{subjectid}
52
         where s.examid=#{examid} and s.subjectid=#{subjectid}
55
-        order by s.schoolrank,s.rsid,qt.mptorder,q.qorder
53
+        order by s.schoolrank,s.rsid,q.qorder
56
     </select>
54
     </select>
57
 
55
 
58
     <!--学生报告-学生学科试题分析-->
56
     <!--学生报告-学生学科试题分析-->

Loading…
Cancel
Save