Browse Source

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

tags/正式版本
王宁 2 years ago
parent
commit
061922b87d

+ 7
- 1
sexam/src/main/resources/mapper/exam/ESubjectInvigilateMapper.xml View File

@@ -36,13 +36,19 @@
36 36
         from e_subject_invigilate ei left join e_subject es on ei.esid=es.esid
37 37
         left join e_base eb on eb.examid = es.examid
38 38
         left join e_class ec on eb.examid = ec.examid
39
-        where eb.deleted=1 and eb.examstate!=0 and eb.exammode=1 and eb.monitored=1 and es.pstate=#{esstate}
39
+        where eb.deleted=1 and eb.examstate!=0 and eb.exammode=1 and eb.monitored=1
40 40
         <if test="teacherid!=null and teacherid!=0">
41 41
             and ei.teacherid=#{teacherid}
42 42
         </if>
43 43
         <if test="examid!=null and examid!=0">
44 44
             and es.examid=#{examid}
45 45
         </if>
46
+        <if test="esstate==1">
47
+            and subdate(concat(es.sdate,' ',es.begintime),interval 5 minute)&lt;=now() and es.pstate!=2
48
+        </if>
49
+        <if test="esstate==2">
50
+            and es.pstate=2
51
+        </if>
46 52
         group by es.esid
47 53
         )es left join e_paper_student eps on es.esid = eps.esid and find_in_set(eps.classid,es.classids)
48 54
         group by es.esid

+ 14
- 5
suser/src/main/java/com/xhkjedu/suser/utils/PoiUtils.java View File

@@ -151,7 +151,8 @@ public class PoiUtils {
151 151
                             }
152 152
                         }
153 153
                     } else if (y == 5) {//准考证号
154
-                        user.setExamno(getCellValue(cell));
154
+                        String examno = getCellValue(cell);
155
+                        if (N_Utils.isNotEmpty(examno)) user.setExamno(examno);
155 156
                     }
156 157
                 }
157 158
 
@@ -168,8 +169,12 @@ public class PoiUtils {
168 169
             resultMap.put("users", users);
169 170
         } catch (Exception e) {
170 171
             resultMap.put("code", 1);
171
-            resultMap.put("msg", e.getMessage());
172
-            throw new Exception(e.getMessage());
172
+            String msg=e.getMessage();
173
+            resultMap.put("msg", msg);
174
+            if (msg.contains("Invalid ")) {
175
+                msg = "格式不正确";
176
+            }
177
+            throw new Exception(msg);
173 178
         }
174 179
         return resultMap;
175 180
     }
@@ -305,8 +310,12 @@ public class PoiUtils {
305 310
             resultMap.put("users", users);
306 311
         } catch (Exception e) {
307 312
             resultMap.put("code", 1);
308
-            resultMap.put("msg", e.getMessage());
309
-            throw new Exception(e.getMessage());
313
+            String msg=e.getMessage();
314
+            resultMap.put("msg", msg);
315
+            if (msg.contains("Invalid ")) {
316
+                msg = "格式不正确";
317
+            }
318
+            throw new Exception(msg);
310 319
         }
311 320
 
312 321
         return resultMap;

Loading…
Cancel
Save