소스 검색

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

tags/正式版本
王宁 2 년 전
부모
커밋
cc9760e22a

+ 2
- 2
sexam/src/main/java/com/xhkjedu/sexam/service/paperstudent/EPaperStudentService.java 파일 보기

@@ -452,7 +452,7 @@ public class EPaperStudentService {
452 452
             //说明学生缺考更新状态
453 453
             EPaperStudent paperStudent = new EPaperStudent();
454 454
             paperStudent.setEpsid(pswvo.getEpsid());
455
-            paperStudent.setStupic(JSON.toJSONString(pswvo.getStupic()));
455
+            paperStudent.setStupic(pswvo.getStupic());
456 456
             paperStudent.setSstate(3);
457 457
             paperStudent.setBatchid(pswvo.getBatchid());
458 458
             if(N_Utils.isEmptyInteger(pswvo.getHasbad())){
@@ -490,7 +490,7 @@ public class EPaperStudentService {
490 490
             }
491 491
             EPaperStudent paperStudent = new EPaperStudent();
492 492
             paperStudent.setEpsid(pswvo.getEpsid());
493
-            paperStudent.setStupic(JSON.toJSONString(pswvo.getStupic()));
493
+            paperStudent.setStupic(pswvo.getStupic());
494 494
             paperStudent.setSstate(2);
495 495
             paperStudent.setStuscore(paperscore);
496 496
             paperStudent.setBatchid(pswvo.getBatchid());

+ 17
- 12
sexam/src/main/java/com/xhkjedu/sexam/service/paperstudent/EScanbatchService.java 파일 보기

@@ -89,25 +89,30 @@ public class EScanbatchService {
89 89
         paper.put("ysznum", ysznum);
90 90
         paper.remove("scantronnum");
91 91
 
92
-        String alljson = paper.get("alljson").toString();
93
-        Map pamap = JSON.parseObject(alljson, Map.class);
94
-        List<Map> ranglist = (List<Map>) pamap.get("ranglist");
95
-        for (Map m : ranglist) {
96
-            String ptname = m.get("qtname").toString();
97
-            Integer num = Integer.parseInt(m.get("num").toString());
98
-            if ("客观题".equals(ptname)) {
99
-                paper.put("kgt", num);
100
-            } else {
101
-                paper.put("zgt", num);
92
+        if (N_Utils.isNotEmpty(paper.get("alljson"))) {
93
+            String alljson = paper.get("alljson").toString();
94
+            Map pamap = JSON.parseObject(alljson, Map.class);
95
+            List<Map> ranglist = (List<Map>) pamap.get("ranglist");
96
+            for (Map m : ranglist) {
97
+                String ptname = m.get("qtname").toString();
98
+                Integer num = Integer.parseInt(m.get("num").toString());
99
+                if ("客观题".equals(ptname)) {
100
+                    paper.put("kgt", num);
101
+                } else {
102
+                    paper.put("zgt", num);
103
+                }
102 104
             }
105
+        } else {
106
+            paper.put("kgt", 0);
107
+            paper.put("zgt", 0);
103 108
         }
104 109
         paper.remove("alljson");
105 110
 
106 111
         List<Map> batchlist = eScanbatchMapper.listScanBatchPapers(epid);
107 112
 
108 113
         Map rtnmap = new HashMap();
109
-        rtnmap.put("paper",paper);
110
-        rtnmap.put("scans",batchlist);
114
+        rtnmap.put("paper", paper);
115
+        rtnmap.put("scans", batchlist);
111 116
         return rtnmap;
112 117
     }
113 118
 

+ 13
- 14
sexam/src/main/resources/mapper/paperstudent/EScanbatchMapper.xml 파일 보기

@@ -58,20 +58,19 @@
58 58
         select eps.epsid,u.username,u.examno,ec.classname,eps.batchid,eps.sstate,eps.stupic
59 59
         from e_paper_student eps left join e_class ec on eps.examid = ec.examid and eps.classid = ec.classid
60 60
         left join t_user u on eps.studentid = u.userid
61
-        <where>
62
-            <if test="classid!=null and classid!=0">
63
-                and eps.classid=#{classid}
64
-            </if>
65
-            <if test="sstate==1">
66
-                and eps.batchid is null
67
-            </if>
68
-            <if test="sstate==2">
69
-                and eps.batchid is not null
70
-            </if>
71
-            <if test="username!=null and username!=''">
72
-                and (u.username like '%${username}%' or u.examno like '%${username}%')
73
-            </if>
74
-        </where>
61
+        where eps.epid=#{epid}
62
+        <if test="classid!=null and classid!=0">
63
+            and eps.classid=#{classid}
64
+        </if>
65
+        <if test="sstate==1">
66
+            and eps.batchid is null
67
+        </if>
68
+        <if test="sstate==2">
69
+            and eps.batchid is not null
70
+        </if>
71
+        <if test="username!=null and username!=''">
72
+            and (u.username like '%${username}%' or u.examno like '%${username}%')
73
+        </if>
75 74
     </select>
76 75
     <!--试卷基础信息-->
77 76
     <select id="listByEpId" resultType="java.util.Map">

Loading…
취소
저장