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
         from e_subject_invigilate ei left join e_subject es on ei.esid=es.esid
36
         from e_subject_invigilate ei left join e_subject es on ei.esid=es.esid
37
         left join e_base eb on eb.examid = es.examid
37
         left join e_base eb on eb.examid = es.examid
38
         left join e_class ec on eb.examid = ec.examid
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
         <if test="teacherid!=null and teacherid!=0">
40
         <if test="teacherid!=null and teacherid!=0">
41
             and ei.teacherid=#{teacherid}
41
             and ei.teacherid=#{teacherid}
42
         </if>
42
         </if>
43
         <if test="examid!=null and examid!=0">
43
         <if test="examid!=null and examid!=0">
44
             and es.examid=#{examid}
44
             and es.examid=#{examid}
45
         </if>
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
         group by es.esid
52
         group by es.esid
47
         )es left join e_paper_student eps on es.esid = eps.esid and find_in_set(eps.classid,es.classids)
53
         )es left join e_paper_student eps on es.esid = eps.esid and find_in_set(eps.classid,es.classids)
48
         group by es.esid
54
         group by es.esid

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

151
                             }
151
                             }
152
                         }
152
                         }
153
                     } else if (y == 5) {//准考证号
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
             resultMap.put("users", users);
169
             resultMap.put("users", users);
169
         } catch (Exception e) {
170
         } catch (Exception e) {
170
             resultMap.put("code", 1);
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
         return resultMap;
179
         return resultMap;
175
     }
180
     }
305
             resultMap.put("users", users);
310
             resultMap.put("users", users);
306
         } catch (Exception e) {
311
         } catch (Exception e) {
307
             resultMap.put("code", 1);
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
         return resultMap;
321
         return resultMap;

Loading…
Cancel
Save