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

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

14
         where pc.teacherid=#{teacherid} and psq.ctype in(3,13,14,15) group by p.epid
14
         where pc.teacherid=#{teacherid} and psq.ctype in(3,13,14,15) group by p.epid
15
         union
15
         union
16
         select p.esid,p.epid,group_concat(distinct concat(pq.qn,'_',pq.eptqid) order by pq.eptqid)qns
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
         ,count(case when psq.answered=1 then psq.epsqid else null end)tjnum
18
         ,count(case when psq.answered=1 then psq.epsqid else null end)tjnum
19
         ,count(case when psq.answered=1 and psq.checked=2 then psq.epsqid else null end)pynum
19
         ,count(case when psq.answered=1 and psq.checked=2 then psq.epsqid else null end)pynum
20
         from e_paper p left join e_paper_correctquestion pq on p.epid = pq.epid
20
         from e_paper p left join e_paper_correctquestion pq on p.epid = pq.epid
36
         where pc.teacherid=#{teacherid} and psq.ctype in(3,13,14,15) group by p.epid
36
         where pc.teacherid=#{teacherid} and psq.ctype in(3,13,14,15) group by p.epid
37
         union
37
         union
38
         select p.esid,p.epid,group_concat(distinct concat(pq.qn,'_',pq.eptqid) order by pq.eptqid)qns
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
         ,count(case when psq.answered=1 then psq.epsqid else null end)tjnum
40
         ,count(case when psq.answered=1 then psq.epsqid else null end)tjnum
41
         ,count(case when psq.answered=1 and psq.checked=2 then psq.epsqid else null end)pynum
41
         ,count(case when psq.answered=1 and psq.checked=2 then psq.epsqid else null end)pynum
42
         from e_paper p left join e_paper_correctquestion pq on p.epid = pq.epid
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
     </select>
40
     </select>
41
     <!--学生优秀行为-->
41
     <!--学生优秀行为-->
42
     <select id="listGoodActionByExamId" resultType="java.util.Map">
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
         where examid=#{examid} and good=1
45
         where examid=#{examid} and good=1
47
         group by studentid, subjectid, good
46
         group by studentid, subjectid, good
48
     </select>
47
     </select>

Loading…
Cancel
Save