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,7 +40,7 @@ public interface EClassMapper extends TkMapper<EClass> {
40 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 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,7 +49,7 @@ public interface EReportClassMapper {
49 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 54
     //根据考试id班级id获取班级名称
55 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,7 +365,9 @@ public class EReportClassService {
365 365
 
366 366
     //考试班级--教师权限下
367 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,7 +388,8 @@ public class EReportClassService {
386 388
         Map map = eBaseMapper.findById(examid);
387 389
         List<Map> subjects = eReportClassMapper.listExamSubject(examid, teacherid);
388 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 393
         map.put("classes", classes);
391 394
         return map;
392 395
     }

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

@@ -9,6 +9,7 @@ import com.xhkjedu.sexam.mapper.paper.EPaperFileMapper;
9 9
 import com.xhkjedu.sexam.mapper.paper.EPaperMapper;
10 10
 import com.xhkjedu.sexam.mapper.reportclass.ERclassRankMapper;
11 11
 import com.xhkjedu.sexam.mapper.reportstu.ERstudentMapper;
12
+import com.xhkjedu.sexam.mapper.system.UserMapper;
12 13
 import com.xhkjedu.sexam.model.exam.EBase;
13 14
 import com.xhkjedu.sexam.utils.ExamUtil;
14 15
 import com.xhkjedu.sexam.vo.report.ERankParamVo;
@@ -44,6 +45,8 @@ public class EReportStudentService {
44 45
     private EPaperAnalyzeMapper ePaperAnalyzeMapper;
45 46
     @Resource
46 47
     private ERclassRankMapper eRclassRankMapper;
48
+    @Resource
49
+    private UserMapper userMapper;
47 50
 
48 51
     /**
49 52
      * @Description 获取考试基本信息(科目、班级、班级下学生)
@@ -65,7 +68,11 @@ public class EReportStudentService {
65 68
         Map map = eBaseMapper.findById(examid);
66 69
         List<Map> subjects = eSubjectMapper.listSubjectAndPnum(examid);
67 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 76
         map.put("classes", classes);
70 77
         return map;
71 78
     }

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

@@ -34,4 +34,6 @@ public class ERankParamVo {
34 34
     private List<ERrank> rranks;//等级
35 35
 
36 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,7 +95,7 @@
95 95
         left join t_user u on ps.studentid=u.userid
96 96
         left join t_class_teacher ct on c.classid=ct.classid
97 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 99
         group by ps.studentid order by tc.classtype,tc.classorder,c.ecid, ps.studentid
100 100
     </select>
101 101
     <!--班级选择列表-->

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

@@ -173,7 +173,7 @@
173 173
         select ec.classid,ec.classname,ec.classnum
174 174
         from e_class ec left join t_class_teacher ct on ec.classid = ct.classid
175 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 177
         group by ec.classid order by c.classtype,c.classorder,ec.ecid
178 178
     </select>
179 179
     <!--根据考试id班级id获取班级名称-->

Loading…
Cancel
Save