Browse Source

显示排名得分

tags/正式版本
雍文秀 2 years ago
parent
commit
98e4d79650

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

62
     EBaseVo getExamStateAndMode(@Param("examid") Integer examid);
62
     EBaseVo getExamStateAndMode(@Param("examid") Integer examid);
63
 
63
 
64
     //根据考试id获取显示排名
64
     //根据考试id获取显示排名
65
-    Integer getShowRankById(@Param("examid") Integer examid);
65
+    EBase getShowRankById(@Param("examid") Integer examid);
66
 }
66
 }

+ 5
- 2
sexam/src/main/java/com/xhkjedu/sexam/model/exam/EBase.java View File

36
     //考试状态0未开始1已开始2已结束3已生成报告
36
     //考试状态0未开始1已开始2已结束3已生成报告
37
     private Integer examstate;
37
     private Integer examstate;
38
 
38
 
39
-    //显示排名得分0保密1分数2分数+班排名3分数+校排名
40
-    private Integer showrank;
39
+    //教师显示排名得分0保密1分数2分数+班排名3分数+校排名
40
+    private Integer teashowrank;
41
+
42
+    //学生显示排名得分0保密1分数2分数+班排名3分数+校排名
43
+    private Integer stushowrank;
41
 
44
 
42
     //考试公告
45
     //考试公告
43
     private String examcomm;
46
     private String examcomm;

+ 4
- 2
sexam/src/main/java/com/xhkjedu/sexam/service/exam/EBaseService.java View File

67
         try {
67
         try {
68
             //考试
68
             //考试
69
             model.setExamstate(0);
69
             model.setExamstate(0);
70
-            model.setShowrank(0);
70
+            model.setTeashowrank(0);
71
+            model.setStushowrank(0);
71
             model.setDeleted(1);
72
             model.setDeleted(1);
72
             model.setReportstate(0);
73
             model.setReportstate(0);
73
             model.setCreatetime(N_Utils.getSecondTimestamp());
74
             model.setCreatetime(N_Utils.getSecondTimestamp());
511
 
512
 
512
     //设置学生报告排名显示
513
     //设置学生报告排名显示
513
     public void setShowRank(EBase eBase) {
514
     public void setShowRank(EBase eBase) {
514
-        if (eBase.getShowrank() == null) eBase.setShowrank(0);
515
+        if (eBase.getTeashowrank() == null) eBase.setTeashowrank(0);
516
+        if (eBase.getStushowrank() == null) eBase.setStushowrank(0);
515
         eBaseMapper.updateByPrimaryKeySelective(eBase);
517
         eBaseMapper.updateByPrimaryKeySelective(eBase);
516
     }
518
     }
517
 }
519
 }

+ 35
- 23
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportStudentService.java View File

8
 import com.xhkjedu.sexam.mapper.paper.EPaperFileMapper;
8
 import com.xhkjedu.sexam.mapper.paper.EPaperFileMapper;
9
 import com.xhkjedu.sexam.mapper.paper.EPaperMapper;
9
 import com.xhkjedu.sexam.mapper.paper.EPaperMapper;
10
 import com.xhkjedu.sexam.mapper.reportstu.ERstudentMapper;
10
 import com.xhkjedu.sexam.mapper.reportstu.ERstudentMapper;
11
+import com.xhkjedu.sexam.model.exam.EBase;
11
 import com.xhkjedu.sexam.utils.ExamUtil;
12
 import com.xhkjedu.sexam.utils.ExamUtil;
12
 import com.xhkjedu.utils.N_Utils;
13
 import com.xhkjedu.utils.N_Utils;
13
 import org.springframework.stereotype.Service;
14
 import org.springframework.stereotype.Service;
73
      **/
74
      **/
74
     public Map listStudentSubjectScoreByExamid(Integer examid, Integer studentid, Integer teacherid) {
75
     public Map listStudentSubjectScoreByExamid(Integer examid, Integer studentid, Integer teacherid) {
75
         Integer showrank;
76
         Integer showrank;
77
+        EBase base = eBaseMapper.getShowRankById(examid);
76
         if (!N_Utils.isEmptyInteger(teacherid)) {
78
         if (!N_Utils.isEmptyInteger(teacherid)) {
77
-            showrank = 1;
79
+            showrank = base.getTeashowrank();
78
         } else {
80
         } else {
79
-            showrank = eBaseMapper.getShowRankById(examid);
81
+            showrank = base.getStushowrank();
80
         }
82
         }
81
         List<Map> list = eRstudentMapper.getStudentScoreByExamid(examid, studentid, showrank);
83
         List<Map> list = eRstudentMapper.getStudentScoreByExamid(examid, studentid, showrank);
82
         Map rtnmap = new LinkedHashMap();
84
         Map rtnmap = new LinkedHashMap();
84
         if (list != null && list.size() > 0) {
86
         if (list != null && list.size() > 0) {
85
             String classnum = "0";
87
             String classnum = "0";
86
             String gradenum = "0";
88
             String gradenum = "0";
87
-            if (showrank == 1) {
89
+            if (showrank != 0) {
88
                 Map map1 = list.get(0);
90
                 Map map1 = list.get(0);
89
                 Integer classid = Integer.parseInt(map1.get("classid").toString());
91
                 Integer classid = Integer.parseInt(map1.get("classid").toString());
90
                 Map gcnum = eRstudentMapper.getStudentNumByExamid(examid, classid);
92
                 Map gcnum = eRstudentMapper.getStudentNumByExamid(examid, classid);
107
      **/
109
      **/
108
     public List<Map> listStudentRankHistory(Integer studentid, Integer examid, Integer teacherid) {
110
     public List<Map> listStudentRankHistory(Integer studentid, Integer examid, Integer teacherid) {
109
         Integer showrank;
111
         Integer showrank;
112
+        EBase base = eBaseMapper.getShowRankById(examid);
110
         if (!N_Utils.isEmptyInteger(teacherid)) {
113
         if (!N_Utils.isEmptyInteger(teacherid)) {
111
-            showrank = 1;
114
+            showrank = base.getTeashowrank();
112
         } else if (N_Utils.isEmptyInteger(examid)) {
115
         } else if (N_Utils.isEmptyInteger(examid)) {
113
             showrank = 0;
116
             showrank = 0;
114
         } else {
117
         } else {
115
-            showrank = eBaseMapper.getShowRankById(examid);
118
+            showrank = base.getStushowrank();
116
         }
119
         }
117
         if (showrank == 0) return new ArrayList<>();
120
         if (showrank == 0) return new ArrayList<>();
118
         return eRstudentMapper.listStudentExamHistory(studentid, "zf");
121
         return eRstudentMapper.listStudentExamHistory(studentid, "zf");
127
      **/
130
      **/
128
     public Map getSubjectScoreByStudentid(Integer examid, Integer studentid, String subjectid, Integer teacherid) {
131
     public Map getSubjectScoreByStudentid(Integer examid, Integer studentid, String subjectid, Integer teacherid) {
129
         Integer showrank;
132
         Integer showrank;
133
+        EBase base = eBaseMapper.getShowRankById(examid);
130
         if (!N_Utils.isEmptyInteger(teacherid)) {
134
         if (!N_Utils.isEmptyInteger(teacherid)) {
131
-            showrank = 1;
135
+            showrank = base.getTeashowrank();
132
         } else {
136
         } else {
133
-            showrank = eBaseMapper.getShowRankById(examid);
137
+            showrank = base.getStushowrank();
134
         }
138
         }
135
         Map rtnmap = eRstudentMapper.getSubjectScoreByStudentid(examid, studentid, subjectid, showrank);
139
         Map rtnmap = eRstudentMapper.getSubjectScoreByStudentid(examid, studentid, subjectid, showrank);
136
         if (rtnmap != null && rtnmap.size() > 0) {
140
         if (rtnmap != null && rtnmap.size() > 0) {
164
      **/
168
      **/
165
     public List<Map> listSubjectPoints(Integer examid, Integer studentid, String subjectid, Integer teacherid) {
169
     public List<Map> listSubjectPoints(Integer examid, Integer studentid, String subjectid, Integer teacherid) {
166
         Integer showrank;
170
         Integer showrank;
171
+        EBase base = eBaseMapper.getShowRankById(examid);
167
         if (!N_Utils.isEmptyInteger(teacherid)) {
172
         if (!N_Utils.isEmptyInteger(teacherid)) {
168
-            showrank = 1;
173
+            showrank = base.getTeashowrank();
169
         } else {
174
         } else {
170
-            showrank = eBaseMapper.getShowRankById(examid);
175
+            showrank = base.getStushowrank();
171
         }
176
         }
172
         return eRstudentMapper.listSubjectPoints(examid, studentid, subjectid, showrank);
177
         return eRstudentMapper.listSubjectPoints(examid, studentid, subjectid, showrank);
173
     }
178
     }
181
      **/
186
      **/
182
     public List<Map> listSubjectComplexitys(Integer examid, Integer studentid, String subjectid, Integer teacherid) {
187
     public List<Map> listSubjectComplexitys(Integer examid, Integer studentid, String subjectid, Integer teacherid) {
183
         Integer showrank;
188
         Integer showrank;
189
+        EBase base = eBaseMapper.getShowRankById(examid);
184
         if (!N_Utils.isEmptyInteger(teacherid)) {
190
         if (!N_Utils.isEmptyInteger(teacherid)) {
185
-            showrank = 1;
191
+            showrank = base.getTeashowrank();
186
         } else {
192
         } else {
187
-            showrank = eBaseMapper.getShowRankById(examid);
193
+            showrank = base.getStushowrank();
188
         }
194
         }
189
         return eRstudentMapper.listSubjectComplexitys(examid, studentid, subjectid, showrank);
195
         return eRstudentMapper.listSubjectComplexitys(examid, studentid, subjectid, showrank);
190
     }
196
     }
198
      **/
204
      **/
199
     public List<Map> listSubjectQtypes(Integer examid, Integer studentid, String subjectid, Integer teacherid) {
205
     public List<Map> listSubjectQtypes(Integer examid, Integer studentid, String subjectid, Integer teacherid) {
200
         Integer showrank;
206
         Integer showrank;
207
+        EBase base = eBaseMapper.getShowRankById(examid);
201
         if (!N_Utils.isEmptyInteger(teacherid)) {
208
         if (!N_Utils.isEmptyInteger(teacherid)) {
202
-            showrank = 1;
209
+            showrank = base.getTeashowrank();
203
         } else {
210
         } else {
204
-            showrank = eBaseMapper.getShowRankById(examid);
211
+            showrank = base.getStushowrank();
205
         }
212
         }
206
         return eRstudentMapper.listSubjectQtypes(examid, studentid, subjectid, showrank);
213
         return eRstudentMapper.listSubjectQtypes(examid, studentid, subjectid, showrank);
207
     }
214
     }
215
      **/
222
      **/
216
     public List<Map> listSubjectQuestions(Integer examid, Integer studentid, String subjectid, Integer teacherid) {
223
     public List<Map> listSubjectQuestions(Integer examid, Integer studentid, String subjectid, Integer teacherid) {
217
         Integer showrank;
224
         Integer showrank;
225
+        EBase base = eBaseMapper.getShowRankById(examid);
218
         if (!N_Utils.isEmptyInteger(teacherid)) {
226
         if (!N_Utils.isEmptyInteger(teacherid)) {
219
-            showrank = 1;
227
+            showrank = base.getTeashowrank();
220
         } else {
228
         } else {
221
-            showrank = eBaseMapper.getShowRankById(examid);
229
+            showrank = base.getStushowrank();
222
         }
230
         }
223
         Map map = ePaperMapper.getPaperByExamidAndSubjectid(examid, subjectid);
231
         Map map = ePaperMapper.getPaperByExamidAndSubjectid(examid, subjectid);
224
         Integer ptype = Integer.parseInt(map.get("ptype").toString());
232
         Integer ptype = Integer.parseInt(map.get("ptype").toString());
276
     public Map getStudentPaperQuestions(Integer examid, Integer studentid, String subjectid, Integer teacherid) {
284
     public Map getStudentPaperQuestions(Integer examid, Integer studentid, String subjectid, Integer teacherid) {
277
         Integer showrank;
285
         Integer showrank;
278
         Integer pstate = eSubjectMapper.getPstateByExamIdSid(examid, subjectid);
286
         Integer pstate = eSubjectMapper.getPstateByExamIdSid(examid, subjectid);
287
+        EBase base = eBaseMapper.getShowRankById(examid);
279
         if (!N_Utils.isEmptyInteger(teacherid)) {
288
         if (!N_Utils.isEmptyInteger(teacherid)) {
280
-            showrank = 1;
289
+            showrank = base.getTeashowrank();
281
         } else {
290
         } else {
282
-            showrank = eBaseMapper.getShowRankById(examid);
291
+            showrank = base.getStushowrank();
283
         }
292
         }
284
         Map map = ePaperMapper.getPaperByExamidAndSubjectid(examid, subjectid);
293
         Map map = ePaperMapper.getPaperByExamidAndSubjectid(examid, subjectid);
285
         Integer ptype = Integer.parseInt(map.get("ptype").toString());
294
         Integer ptype = Integer.parseInt(map.get("ptype").toString());
423
      **/
432
      **/
424
     public List<Map> listStudentSubjectErrorQues(Integer examid, Integer studentid, Integer teacherid) {
433
     public List<Map> listStudentSubjectErrorQues(Integer examid, Integer studentid, Integer teacherid) {
425
         Integer showrank;
434
         Integer showrank;
435
+        EBase base = eBaseMapper.getShowRankById(examid);
426
         if (!N_Utils.isEmptyInteger(teacherid)) {
436
         if (!N_Utils.isEmptyInteger(teacherid)) {
427
-            showrank = 1;
437
+            showrank = base.getTeashowrank();
428
         } else {
438
         } else {
429
-            showrank = eBaseMapper.getShowRankById(examid);
439
+            showrank = base.getStushowrank();
430
         }
440
         }
431
         List<Map> list = eRstudentMapper.listStudentSubjectErrorQues(examid, studentid, showrank);
441
         List<Map> list = eRstudentMapper.listStudentSubjectErrorQues(examid, studentid, showrank);
432
         if (showrank == 0) return list;
442
         if (showrank == 0) return list;
465
     public Map listStudentErrorQuestionsTk(Integer examid, Integer studentid, String subjectid, Integer teacherid) {
475
     public Map listStudentErrorQuestionsTk(Integer examid, Integer studentid, String subjectid, Integer teacherid) {
466
         Integer pstate = eSubjectMapper.getPstateByExamIdSid(examid, subjectid);
476
         Integer pstate = eSubjectMapper.getPstateByExamIdSid(examid, subjectid);
467
         Integer showrank;
477
         Integer showrank;
478
+        EBase base = eBaseMapper.getShowRankById(examid);
468
         if (!N_Utils.isEmptyInteger(teacherid)) {
479
         if (!N_Utils.isEmptyInteger(teacherid)) {
469
-            showrank = 1;
480
+            showrank = base.getTeashowrank();
470
         } else {
481
         } else {
471
-            showrank = eBaseMapper.getShowRankById(examid);
482
+            showrank = base.getStushowrank();
472
         }
483
         }
473
         if (showrank == 0) {
484
         if (showrank == 0) {
474
             Map map = new HashMap();
485
             Map map = new HashMap();
519
      **/
530
      **/
520
     public List<Map> listStudentErrorQuestionsFj(Integer examid, Integer studentid, String subjectid, Integer teacherid) {
531
     public List<Map> listStudentErrorQuestionsFj(Integer examid, Integer studentid, String subjectid, Integer teacherid) {
521
         Integer showrank;
532
         Integer showrank;
533
+        EBase base = eBaseMapper.getShowRankById(examid);
522
         if (!N_Utils.isEmptyInteger(teacherid)) {
534
         if (!N_Utils.isEmptyInteger(teacherid)) {
523
-            showrank = 1;
535
+            showrank = base.getTeashowrank();
524
         } else {
536
         } else {
525
-            showrank = eBaseMapper.getShowRankById(examid);
537
+            showrank = base.getStushowrank();
526
         }
538
         }
527
         if (showrank == 0) return new ArrayList<>();
539
         if (showrank == 0) return new ArrayList<>();
528
         List<Map> list = eRstudentMapper.listStudentErrorQuestionsForFj(examid, studentid, subjectid);
540
         List<Map> list = eRstudentMapper.listStudentErrorQuestionsForFj(examid, studentid, subjectid);

+ 6
- 5
sexam/src/main/resources/mapper/exam/EBaseMapper.xml View File

12
     </delete>
12
     </delete>
13
     <!--考试列表-->
13
     <!--考试列表-->
14
     <select id="listAll" resultType="java.util.Map">
14
     <select id="listAll" resultType="java.util.Map">
15
-        select b.examid,b.examname,b.examdate,b.gradeid,b.examtype,b.exammode,b.monitored,b.showrank
15
+        select b.examid,b.examname,b.examdate,b.gradeid,b.examtype,b.exammode,b.monitored,b.teashowrank,b.stushowrank
16
         ,b.examstate,u.username createname,group_concat(distinct es.subjectname order by es.esid separator '|')subjectname
16
         ,b.examstate,u.username createname,group_concat(distinct es.subjectname order by es.esid separator '|')subjectname
17
         ,count(distinct case when es.begintime is null or es.begintime='' then es.esid else null end)esnum
17
         ,count(distinct case when es.begintime is null or es.begintime='' then es.esid else null end)esnum
18
         ,min(es.esstate)esstate,min(es.pstate)pstate,min(ifnull(ep.correcttype,0))correcttype
18
         ,min(es.esstate)esstate,min(es.pstate)pstate,min(ifnull(ep.correcttype,0))correcttype
62
     </update>
62
     </update>
63
     <!--考试基本信息-->
63
     <!--考试基本信息-->
64
     <select id="findById" resultType="java.util.Map">
64
     <select id="findById" resultType="java.util.Map">
65
-        select examid,examname,gradeid,examdate,examtype,exammode,monitored,examstate,showrank
65
+        select examid,examname,gradeid,examdate,examtype,exammode,monitored,examstate,teashowrank,stushowrank
66
         from e_base where examid=#{examid}
66
         from e_base where examid=#{examid}
67
     </select>
67
     </select>
68
     <!--考试基本信息(带考试人数)-->
68
     <!--考试基本信息(带考试人数)-->
69
     <select id="findById2" resultType="java.util.Map">
69
     <select id="findById2" resultType="java.util.Map">
70
-        select b.examid,b.examname,b.examdate,b.examtype,b.gradeid,b.exammode,b.monitored,b.examstate,b.examcomm,showrank
70
+        select b.examid,b.examname,b.examdate,b.examtype,b.gradeid,b.exammode,b.monitored,b.examstate,b.examcomm
71
+        ,teashowrank,stushowrank
71
         ,(select sum(c.classnum) from e_class c where c.examid=b.examid)examnum
72
         ,(select sum(c.classnum) from e_class c where c.examid=b.examid)examnum
72
         from e_base b where b.examid=#{examid}
73
         from e_base b where b.examid=#{examid}
73
     </select>
74
     </select>
124
         from e_base eb where eb.examid=#{examid}
125
         from e_base eb where eb.examid=#{examid}
125
     </select>
126
     </select>
126
     <!--根据考试id获取显示排名-->
127
     <!--根据考试id获取显示排名-->
127
-    <select id="getShowRankById" resultType="java.lang.Integer">
128
-        select eb.showrank
128
+    <select id="getShowRankById" resultType="com.xhkjedu.sexam.model.exam.EBase">
129
+        select eb.teashowrank,eb.stushowrank
129
         from e_base eb where eb.examid=#{examid}
130
         from e_base eb where eb.examid=#{examid}
130
     </select>
131
     </select>
131
 </mapper>
132
 </mapper>

+ 26
- 16
sexam/src/main/resources/mapper/report/ERstudentMapper.xml View File

45
              ,0 schoolmaxscore,0 schoolavgscore,0 goal,0 nextgoal
45
              ,0 schoolmaxscore,0 schoolavgscore,0 goal,0 nextgoal
46
         </if>
46
         </if>
47
         <if test="showrank==1">
47
         <if test="showrank==1">
48
-            ,rs.score,rs.bzscore,rs.classrank,rs.classrankpre,rs.classmaxscore,rs.classavgscore,rs.schoolrank
48
+            ,rs.score,rs.bzscore,0 classrank,0 classrankpre,rs.classmaxscore,rs.classavgscore,0 schoolrank
49
+            ,rs.schoolmaxscore,rs.schoolavgscore,0 goal,0 nextgoal
50
+        </if>
51
+        <if test="showrank==2">
52
+            ,rs.score,rs.bzscore,rs.classrank,rs.classrankpre,rs.classmaxscore,rs.classavgscore,0 schoolrank
53
+            ,rs.schoolmaxscore,rs.schoolavgscore,0 goal,0 nextgoal
54
+        </if>
55
+        <if test="showrank==3">
56
+            ,rs.score,rs.bzscore,0 classrank,0 classrankpre,rs.classmaxscore,rs.classavgscore,rs.schoolrank
49
             ,rs.schoolmaxscore,rs.schoolavgscore,rs.goal,rs.nextgoal
57
             ,rs.schoolmaxscore,rs.schoolavgscore,rs.goal,rs.nextgoal
50
         </if>
58
         </if>
51
         ,eps.device,eps.submittype,eps.endtime
59
         ,eps.device,eps.submittype,eps.endtime
81
             ,0 schoolmaxscore,0 schoolavgscore,0 goal,0 nextgoal
89
             ,0 schoolmaxscore,0 schoolavgscore,0 goal,0 nextgoal
82
         </if>
90
         </if>
83
         <if test="showrank==1">
91
         <if test="showrank==1">
84
-            ,rs.score,rs.bzscore,rs.classrank,rs.classrankpre,rs.classmaxscore,rs.classavgscore,rs.schoolrank
92
+            ,rs.score,rs.bzscore,0 classrank,0 classrankpre,rs.classmaxscore,rs.classavgscore,0 schoolrank
93
+            ,rs.schoolmaxscore,rs.schoolavgscore,0 goal,0 nextgoal
94
+        </if>
95
+        <if test="showrank==2">
96
+            ,rs.score,rs.bzscore,rs.classrank,rs.classrankpre,rs.classmaxscore,rs.classavgscore,0 schoolrank
97
+            ,rs.schoolmaxscore,rs.schoolavgscore,0 goal,0 nextgoal
98
+        </if>
99
+        <if test="showrank==3">
100
+            ,rs.score,rs.bzscore,0 classrank,0 classrankpre,rs.classmaxscore,rs.classavgscore,rs.schoolrank
85
             ,rs.schoolmaxscore,rs.schoolavgscore,rs.goal,rs.nextgoal
101
             ,rs.schoolmaxscore,rs.schoolavgscore,rs.goal,rs.nextgoal
86
         </if>
102
         </if>
87
         from e_rstudent rs where rs.examid=#{examid} and rs.studentid=#{studentid} and rs.subjectid=#{subjectid}
103
         from e_rstudent rs where rs.examid=#{examid} and rs.studentid=#{studentid} and rs.subjectid=#{subjectid}
93
             ,0 stuscore,0 stusrate,0 gradescore,0 gradesrate,0 gradeavgscore
109
             ,0 stuscore,0 stusrate,0 gradescore,0 gradesrate,0 gradeavgscore
94
             ,0 classscore,0 classsrate,0 classavgscore
110
             ,0 classscore,0 classsrate,0 classavgscore
95
         </if>
111
         </if>
96
-        <if test="showrank==1">
112
+        <if test="showrank!=0">
97
             ,sp.stuscore,sp.stusrate,cp.gradescore,cp.gradesrate,cp.gradeavgscore
113
             ,sp.stuscore,sp.stusrate,cp.gradescore,cp.gradesrate,cp.gradeavgscore
98
             ,cp.classscore,cp.classsrate,cp.classavgscore
114
             ,cp.classscore,cp.classsrate,cp.classavgscore
99
         </if>
115
         </if>
108
             ,0 stuscore,0 stusrate,0 gradescore,0 gradeavgscore,0 gradesrate
124
             ,0 stuscore,0 stusrate,0 gradescore,0 gradeavgscore,0 gradesrate
109
             ,0 classscore,0 classavgscore,0 classsrate
125
             ,0 classscore,0 classavgscore,0 classsrate
110
         </if>
126
         </if>
111
-        <if test="showrank==1">
127
+        <if test="showrank!=0">
112
             ,sc.stuscore,sc.stusrate,cc.gradescore,cc.gradeavgscore,cc.gradesrate
128
             ,sc.stuscore,sc.stusrate,cc.gradescore,cc.gradeavgscore,cc.gradesrate
113
             ,cc.classscore,cc.classavgscore,cc.classsrate
129
             ,cc.classscore,cc.classavgscore,cc.classsrate
114
         </if>
130
         </if>
123
             ,0 stuscore,0 stusrate,0 gradescore,0 gradesrate,0 gradeavgscore
139
             ,0 stuscore,0 stusrate,0 gradescore,0 gradesrate,0 gradeavgscore
124
             ,0 classscore,0 classsrate,0 classavgscore
140
             ,0 classscore,0 classsrate,0 classavgscore
125
         </if>
141
         </if>
126
-        <if test="showrank==1">
142
+        <if test="showrank!=0">
127
             ,st.stuscore,st.stusrate,ct.gradescore,ct.gradesrate,ct.gradeavgscore
143
             ,st.stuscore,st.stusrate,ct.gradescore,ct.gradesrate,ct.gradeavgscore
128
             ,ct.classscore,ct.classsrate,ct.classavgscore
144
             ,ct.classscore,ct.classsrate,ct.classavgscore
129
         </if>
145
         </if>
138
             ,0 stuscore,0 classscore,0 classsrate,0 gradescore,0 gradesrate
154
             ,0 stuscore,0 classscore,0 classsrate,0 gradescore,0 gradesrate
139
             ,0 gradeavgscore,0 classavgscore
155
             ,0 gradeavgscore,0 classavgscore
140
         </if>
156
         </if>
141
-        <if test="showrank==1">
157
+        <if test="showrank!=0">
142
             ,sq.stuscore,cq.classscore,cq.classsrate,cq.gradescore,cq.gradesrate
158
             ,sq.stuscore,cq.classscore,cq.classsrate,cq.gradescore,cq.gradesrate
143
             ,cq.gradeavgscore,cq.classavgscore
159
             ,cq.gradeavgscore,cq.classavgscore
144
         </if>
160
         </if>
172
         <if test="showrank==0">
188
         <if test="showrank==0">
173
             ,0 classscore,0 classsrate,0 gradescore,0 gradesrate,0 classavgscore,0 gradeavgscore
189
             ,0 classscore,0 classsrate,0 gradescore,0 gradesrate,0 classavgscore,0 gradeavgscore
174
         </if>
190
         </if>
175
-        <if test="showrank==1">
191
+        <if test="showrank!=0">
176
             ,cq.classscore,cq.classsrate,cq.gradescore,cq.gradesrate,cq.classavgscore,cq.gradeavgscore
192
             ,cq.classscore,cq.classsrate,cq.gradescore,cq.gradesrate,cq.classavgscore,cq.gradeavgscore
177
         </if>
193
         </if>
178
         from e_rclass_question cq
194
         from e_rclass_question cq
181
     </select>
197
     </select>
182
     <select id="listSubjectQuestionsStuScore" resultType="java.util.Map">
198
     <select id="listSubjectQuestionsStuScore" resultType="java.util.Map">
183
         select sq.stuscore,sq.qscore,sq.questionid squestionid
199
         select sq.stuscore,sq.qscore,sq.questionid squestionid
184
-        <!--<if test="showrank==0">-->
185
-        <!--    ,0 stuscore-->
186
-        <!--</if>-->
187
-        <!--<if test="showrank==1">-->
188
-        <!--    ,sq.stuscore-->
189
-        <!--</if>-->
190
         from e_paper_student_question sq
200
         from e_paper_student_question sq
191
         left join t_question q on sq.questionid=q.questionid
201
         left join t_question q on sq.questionid=q.questionid
192
         where sq.studentid=#{studentid} and sq.epid=#{epid} and (q.questionid=#{questionid} or q.questionpid=#{questionid})
202
         where sq.studentid=#{studentid} and sq.epid=#{epid} and (q.questionid=#{questionid} or q.questionpid=#{questionid})
245
         <if test="showrank==0">
255
         <if test="showrank==0">
246
             ,0 stuscore,0 classavgscore,0 gradeavgscore
256
             ,0 stuscore,0 classavgscore,0 gradeavgscore
247
         </if>
257
         </if>
248
-        <if test="showrank==1">
258
+        <if test="showrank!=0">
249
             ,sq.stuscore,cq.classavgscore,cq.gradeavgscore
259
             ,sq.stuscore,cq.classavgscore,cq.gradeavgscore
250
         </if>
260
         </if>
251
         from e_paper_student_question sq left join t_question q on sq.questionid=q.questionid
261
         from e_paper_student_question sq left join t_question q on sq.questionid=q.questionid
273
         <if test="showrank==0">
283
         <if test="showrank==0">
274
             ,0 stuscore,0 classavgscore,0 gradeavgscore
284
             ,0 stuscore,0 classavgscore,0 gradeavgscore
275
         </if>
285
         </if>
276
-        <if test="showrank==1">
286
+        <if test="showrank!=0">
277
             ,sq.stuscore,cq.classavgscore,cq.gradeavgscore
287
             ,sq.stuscore,cq.classavgscore,cq.gradeavgscore
278
         </if>
288
         </if>
279
         from e_paper_student_question sq left join e_rclass_question cq on sq.eptqid=cq.eptqid and sq.classid=cq.classid
289
         from e_paper_student_question sq left join e_rclass_question cq on sq.eptqid=cq.eptqid and sq.classid=cq.classid
296
         </collection>
306
         </collection>
297
     </resultMap>
307
     </resultMap>
298
     <select id="listStudentSubjectErrorQues" resultMap="listStudentSubjectErrorQues">
308
     <select id="listStudentSubjectErrorQues" resultMap="listStudentSubjectErrorQues">
299
-        <if test="showrank==1">
309
+        <if test="showrank!=0">
300
         select sq.subjectid,st.subjectname,p.ptype,sq.epsqid,sq.eptqid,q.questionid,q.qlevel,q.questionpid
310
         select sq.subjectid,st.subjectname,p.ptype,sq.epsqid,sq.eptqid,q.questionid,q.qlevel,q.questionpid
301
         from e_paper_student_question sq
311
         from e_paper_student_question sq
302
         left join t_question q on q.questionid=sq.questionid
312
         left join t_question q on q.questionid=sq.questionid

Loading…
Cancel
Save