Browse Source

优化班级报告

tags/正式3.11.0
王宁 1 year ago
parent
commit
b24c64eb28

+ 1
- 1
sexam/src/main/java/com/xhkjedu/sexam/mapper/exam/EClassMapper.java View File

40
     List<Map> listExamClassAndStu(@Param("examid") Integer examid);
40
     List<Map> listExamClassAndStu(@Param("examid") Integer examid);
41
 
41
 
42
     //教师权限下参加考试班级和学生
42
     //教师权限下参加考试班级和学生
43
-    List<Map> listExamClassAndStuForTeacher(@Param("examid") Integer examid,@Param("teacherid") Integer teacherid);
43
+    List<Map> listExamClassAndStuForTeacher(@Param("examid") Integer examid,@Param("teacherid") Integer teacherid,@Param("schoolid") Integer schoolid);
44
 
44
 
45
     //班级选择列表
45
     //班级选择列表
46
     List<Map> listBj(@Param("schoolid") Integer schoolid, @Param("teacherid") Integer teacherid);
46
     List<Map> listBj(@Param("schoolid") Integer schoolid, @Param("teacherid") Integer teacherid);

+ 1
- 1
sexam/src/main/java/com/xhkjedu/sexam/mapper/reportclass/EReportClassMapper.java View File

49
     List<Map> listExamSubject(@Param("examid") Integer examid,@Param("teacherid") Integer teacherid);
49
     List<Map> listExamSubject(@Param("examid") Integer examid,@Param("teacherid") Integer teacherid);
50
 
50
 
51
     //教师考试权限班级
51
     //教师考试权限班级
52
-    List<Map> listExamClass(@Param("examid") Integer examid,@Param("teacherid") Integer teacherid);
52
+    List<Map> listExamClass(@Param("examid") Integer examid,@Param("teacherid") Integer teacherid,@Param("schoolid") Integer schoolid);
53
 
53
 
54
     //根据考试id班级id获取班级名称
54
     //根据考试id班级id获取班级名称
55
     String getClassNameByExamIdCid(@Param("examid")Integer examid,@Param("classid") Integer classid);
55
     String getClassNameByExamIdCid(@Param("examid")Integer examid,@Param("classid") Integer classid);

+ 5
- 2
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportClassService.java View File

365
 
365
 
366
     //考试班级--教师权限下
366
     //考试班级--教师权限下
367
     public List<Map> listExamQxClassTeacher(ReportParamsVo paramsVo){
367
     public List<Map> listExamQxClassTeacher(ReportParamsVo paramsVo){
368
-        return eReportClassMapper.listExamClass(paramsVo.getExamid(), paramsVo.getTeacherid());
368
+        Integer schoolid = userMapper.getSchoolidByUserid(paramsVo.getTeacherid());
369
+        paramsVo.setSchoolid(schoolid);
370
+        return eReportClassMapper.listExamClass(paramsVo.getExamid(), paramsVo.getTeacherid(),paramsVo.getSchoolid());
369
     }
371
     }
370
 
372
 
371
     //教师考试权限科目
373
     //教师考试权限科目
386
         Map map = eBaseMapper.findById(examid);
388
         Map map = eBaseMapper.findById(examid);
387
         List<Map> subjects = eReportClassMapper.listExamSubject(examid, teacherid);
389
         List<Map> subjects = eReportClassMapper.listExamSubject(examid, teacherid);
388
         map.put("subjects", subjects);
390
         map.put("subjects", subjects);
389
-        List<Map> classes = eReportClassMapper.listExamClass(examid, teacherid);
391
+        Integer schoolid = userMapper.getSchoolidByUserid(teacherid);
392
+        List<Map> classes = eReportClassMapper.listExamClass(examid, teacherid,schoolid);
390
         map.put("classes", classes);
393
         map.put("classes", classes);
391
         return map;
394
         return map;
392
     }
395
     }

+ 8
- 1
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportStudentService.java View File

9
 import com.xhkjedu.sexam.mapper.paper.EPaperMapper;
9
 import com.xhkjedu.sexam.mapper.paper.EPaperMapper;
10
 import com.xhkjedu.sexam.mapper.reportclass.ERclassRankMapper;
10
 import com.xhkjedu.sexam.mapper.reportclass.ERclassRankMapper;
11
 import com.xhkjedu.sexam.mapper.reportstu.ERstudentMapper;
11
 import com.xhkjedu.sexam.mapper.reportstu.ERstudentMapper;
12
+import com.xhkjedu.sexam.mapper.system.UserMapper;
12
 import com.xhkjedu.sexam.model.exam.EBase;
13
 import com.xhkjedu.sexam.model.exam.EBase;
13
 import com.xhkjedu.sexam.utils.ExamUtil;
14
 import com.xhkjedu.sexam.utils.ExamUtil;
14
 import com.xhkjedu.sexam.vo.report.ERankParamVo;
15
 import com.xhkjedu.sexam.vo.report.ERankParamVo;
44
     private EPaperAnalyzeMapper ePaperAnalyzeMapper;
45
     private EPaperAnalyzeMapper ePaperAnalyzeMapper;
45
     @Resource
46
     @Resource
46
     private ERclassRankMapper eRclassRankMapper;
47
     private ERclassRankMapper eRclassRankMapper;
48
+    @Resource
49
+    private UserMapper userMapper;
47
 
50
 
48
     /**
51
     /**
49
      * @Description 获取考试基本信息(科目、班级、班级下学生)
52
      * @Description 获取考试基本信息(科目、班级、班级下学生)
65
         Map map = eBaseMapper.findById(examid);
68
         Map map = eBaseMapper.findById(examid);
66
         List<Map> subjects = eSubjectMapper.listSubjectAndPnum(examid);
69
         List<Map> subjects = eSubjectMapper.listSubjectAndPnum(examid);
67
         map.put("subjects", subjects);
70
         map.put("subjects", subjects);
68
-        List<Map> classes = eClassMapper.listExamClassAndStuForTeacher(examid,userid);
71
+
72
+        //获取当前用户所属学校id
73
+        Integer schoolid = userMapper.getSchoolidByUserid(userid);
74
+
75
+        List<Map> classes = eClassMapper.listExamClassAndStuForTeacher(examid,userid,schoolid);
69
         map.put("classes", classes);
76
         map.put("classes", classes);
70
         return map;
77
         return map;
71
     }
78
     }

+ 2
- 0
sexam/src/main/java/com/xhkjedu/sexam/vo/report/ERankParamVo.java View File

34
     private List<ERrank> rranks;//等级
34
     private List<ERrank> rranks;//等级
35
 
35
 
36
     private Integer showrank;//显示排名得分0保密1分数2分数+班排名3分数+班/校排名
36
     private Integer showrank;//显示排名得分0保密1分数2分数+班排名3分数+班/校排名
37
+
38
+    private Integer schoolid;
37
 }
39
 }

+ 1
- 1
sexam/src/main/resources/mapper/exam/EClassMapper.xml View File

95
         left join t_user u on ps.studentid=u.userid
95
         left join t_user u on ps.studentid=u.userid
96
         left join t_class_teacher ct on c.classid=ct.classid
96
         left join t_class_teacher ct on c.classid=ct.classid
97
         left join t_class tc on c.classid = tc.classid
97
         left join t_class tc on c.classid = tc.classid
98
-        where c.examid=#{examid} and ct.teacherid=#{teacherid}
98
+        where c.examid=#{examid} and ct.teacherid=#{teacherid} and c.schoolid=#{schoolid}
99
         group by ps.studentid order by tc.classtype,tc.classorder,c.ecid, ps.studentid
99
         group by ps.studentid order by tc.classtype,tc.classorder,c.ecid, ps.studentid
100
     </select>
100
     </select>
101
     <!--班级选择列表-->
101
     <!--班级选择列表-->

+ 1
- 1
sexam/src/main/resources/mapper/report/EReportClassMapper.xml View File

173
         select ec.classid,ec.classname,ec.classnum
173
         select ec.classid,ec.classname,ec.classnum
174
         from e_class ec left join t_class_teacher ct on ec.classid = ct.classid
174
         from e_class ec left join t_class_teacher ct on ec.classid = ct.classid
175
         left join t_class c on ec.classid=c.classid
175
         left join t_class c on ec.classid=c.classid
176
-        where ec.examid=#{examid} and ct.teacherid=#{teacherid}
176
+        where ec.examid=#{examid} and ct.teacherid=#{teacherid} and ec.schoolid=#{schoolid}
177
         group by ec.classid order by c.classtype,c.classorder,ec.ecid
177
         group by ec.classid order by c.classtype,c.classorder,ec.ecid
178
     </select>
178
     </select>
179
     <!--根据考试id班级id获取班级名称-->
179
     <!--根据考试id班级id获取班级名称-->

Loading…
Cancel
Save