Browse Source

Merge remote-tracking branch 'cloud-schoolapi/ywx'

tags/正式版本
王宁 2 years ago
parent
commit
06229a5064

+ 7
- 11
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportGenerateService.java View File

@@ -964,30 +964,28 @@ public class EReportGenerateService {
964 964
         ERrank eRrank = rranks.get(0);
965 965
         if (ranktype == 1) {//等级(A[85%~100%],B[70%~85%),C[60%~70%),D[40%~60%),E[0%~40%))
966 966
             for (ERrank rank : rranks) {
967
-                Double maxrate = rank.getMaxscore();
968
-                Double minrate = rank.getMinscore();
967
+                Double maxscore = rank.getMaxscore();
968
+                Double minscore = rank.getMinscore();
969 969
                 String rankname = rank.getRankname();
970 970
                 if ("zf".equals(subjectid)) {
971 971
                     //总分统计
972
-                    double zfmaxscore = ExamUtil.mul(maxrate, pscore);
973
-                    double zfminscore = ExamUtil.mul(minrate, pscore);
974 972
                     ERrank rr = new ERrank();
975 973
                     rr.setRanktype(ranktype);
976 974
                     rr.setRankname(rankname);
977
-                    rr.setMaxscore(zfmaxscore);
978
-                    rr.setMinscore(zfminscore);
975
+                    rr.setMaxscore(maxscore);
976
+                    rr.setMinscore(minscore);
979 977
                     rr.setSubjectid("zf");
980
-                    String zfrankrange = "[" + zfminscore + "," + zfmaxscore;
978
+                    String zfrankrange = "[" + minscore + "," + maxscore;
981 979
                     List<ERstudent> collect;
982 980
                     if (rr.getRankname().equals("A")) {
983 981
                         zfrankrange = zfrankrange + "]";
984 982
                         collect = cstudents.stream().filter(
985
-                                s -> s.getScore().compareTo(zfminscore) != -1
983
+                                s -> s.getScore().compareTo(minscore) != -1
986 984
                         ).collect(Collectors.toList());
987 985
                     } else {
988 986
                         zfrankrange = zfrankrange + ")";
989 987
                         collect = cstudents.stream().filter(
990
-                                s -> s.getScore().compareTo(zfminscore) != -1 && s.getScore().compareTo(zfmaxscore) == -1
988
+                                s -> s.getScore().compareTo(minscore) != -1 && s.getScore().compareTo(maxscore) == -1
991 989
                         ).collect(Collectors.toList());
992 990
                     }
993 991
                     for (Map.Entry<Integer, List<ERstudent>> entry : zfcollect.entrySet()) {
@@ -1010,8 +1008,6 @@ public class EReportGenerateService {
1010 1008
                     rrank.setRanktype(ranktype);
1011 1009
                     rrank.setRankname(rankname);
1012 1010
                     rrank.setSubjectid(subjectid);
1013
-                    double maxscore = ExamUtil.mul(maxrate, pscore);
1014
-                    double minscore = ExamUtil.mul(minrate, pscore);
1015 1011
                     rrank.setMaxscore(maxscore);
1016 1012
                     rrank.setMinscore(minscore);
1017 1013
                     String rankrange = "[" + minscore + "," + maxscore;

+ 2
- 2
sexam/src/main/resources/mapper/paper/EPaperCorrectTeacherMapper.xml View File

@@ -14,7 +14,7 @@
14 14
         where pc.teacherid=#{teacherid} and psq.ctype in(3,13,14,15) group by p.epid
15 15
         union
16 16
         select p.esid,p.epid,group_concat(distinct concat(pq.qn,'_',pq.eptqid) order by pq.eptqid)qns
17
-        ,0 classids
17
+        ,'' classids
18 18
         ,count(case when psq.answered=1 then psq.epsqid else null end)tjnum
19 19
         ,count(case when psq.answered=1 and psq.checked=2 then psq.epsqid else null end)pynum
20 20
         from e_paper p left join e_paper_correctquestion pq on p.epid = pq.epid
@@ -36,7 +36,7 @@
36 36
         where pc.teacherid=#{teacherid} and psq.ctype in(3,13,14,15) group by p.epid
37 37
         union
38 38
         select p.esid,p.epid,group_concat(distinct concat(pq.qn,'_',pq.eptqid) order by pq.eptqid)qns
39
-        ,0 classids
39
+        ,'' classids
40 40
         ,count(case when psq.answered=1 then psq.epsqid else null end)tjnum
41 41
         ,count(case when psq.answered=1 and psq.checked=2 then psq.epsqid else null end)pynum
42 42
         from e_paper p left join e_paper_correctquestion pq on p.epid = pq.epid

+ 2
- 3
sexam/src/main/resources/mapper/report/EReportGenerateMapper.xml View File

@@ -40,9 +40,8 @@
40 40
     </select>
41 41
     <!--学生优秀行为-->
42 42
     <select id="listGoodActionByExamId" resultType="java.util.Map">
43
-        select studentid,classid,subjectid
44
-        ,count(case when good=1 then epsqid else null end)num
45
-        from e_paper_student_question
43
+        select studentid,classid,epsq.subjectid,s.subjectname,count(epsq.epsqid)num
44
+        from e_paper_student_question epsq left join t_subject s on epsq.subjectid=s.subjectid
46 45
         where examid=#{examid} and good=1
47 46
         group by studentid, subjectid, good
48 47
     </select>

Loading…
Cancel
Save