|
@@ -108,10 +108,8 @@ public class EPaperStudentService {
|
108
|
108
|
/* Integer examstate = ePaperStudentMapper.getExamStateByEpsId(epsid);
|
109
|
109
|
if (2 <= examstate) throw new MissingParametersException("考试已结束禁止操作");*/
|
110
|
110
|
|
111
|
|
- Map mapstate = ePaperStudentMapper.getExamStateSubjectStateByEpsid(epsid);
|
112
|
|
- Integer examstate = Integer.parseInt(mapstate.get("examstate").toString());
|
113
|
|
- Integer pstate = Integer.parseInt(mapstate.get("pstate").toString());
|
114
|
|
- if(examstate >= 2 || pstate == 2) throw new MissingParametersException("考试已结束禁止操作");
|
|
111
|
+ Integer pstate = ePaperStudentMapper.getSubjectStateByEpsid(epsid);
|
|
112
|
+ if(pstate == 2) throw new MissingParametersException("考试已结束禁止操作");
|
115
|
113
|
|
116
|
114
|
Map map = new HashMap();
|
117
|
115
|
//获取试卷基本信息
|
|
@@ -172,11 +170,10 @@ public class EPaperStudentService {
|
172
|
170
|
public Integer getExamstateSubjectState(Integer epsid){
|
173
|
171
|
Integer rtnresult = 1;
|
174
|
172
|
Map mapstate = ePaperStudentMapper.getExamStateSubjectStateByEpsid(epsid);
|
175
|
|
- Integer examstate = Integer.parseInt(mapstate.get("examstate").toString());
|
176
|
173
|
Integer pstate = Integer.parseInt(mapstate.get("pstate").toString());
|
177
|
174
|
String begintime = mapstate.get("begintime").toString();
|
178
|
175
|
String sdate = mapstate.get("sdate").toString();
|
179
|
|
- if(examstate >= 2 || pstate == 2){
|
|
176
|
+ if(pstate == 2){
|
180
|
177
|
rtnresult = 2;//考试已结束
|
181
|
178
|
}else{
|
182
|
179
|
String beginstr = sdate + " " + begintime + ":00";
|
|
@@ -210,10 +207,8 @@ public class EPaperStudentService {
|
210
|
207
|
Integer epsid = eps.getEpsid();
|
211
|
208
|
// Integer examstate = ePaperStudentMapper.getExamStateByEpsId(epsid);
|
212
|
209
|
// if (2 <= examstate) throw new MissingParametersException("考试已结束禁止操作");
|
213
|
|
- Map mapstate = ePaperStudentMapper.getExamStateSubjectStateByEpsid(epsid);
|
214
|
|
- Integer examstate = Integer.parseInt(mapstate.get("examstate").toString());
|
215
|
|
- Integer pstate = Integer.parseInt(mapstate.get("pstate").toString());
|
216
|
|
- if(examstate >= 2 || pstate == 2) throw new MissingParametersException("考试已结束禁止操作");
|
|
210
|
+ Integer pstate = ePaperStudentMapper.getSubjectStateByEpsid(epsid);
|
|
211
|
+ if(pstate == 2) throw new MissingParametersException("考试已结束禁止操作");
|
217
|
212
|
|
218
|
213
|
//获取试卷基本信息
|
219
|
214
|
EPaperStudentVo psvo = ePaperStudentMapper.getExamSubjectByEpsid(epsid);
|
|
@@ -365,10 +360,8 @@ public class EPaperStudentService {
|
365
|
360
|
/* Integer examstate = ePaperStudentMapper.getExamStateByEpsId(epsid);
|
366
|
361
|
if (2 <= examstate) throw new MissingParametersException("考试已结束禁止操作");*/
|
367
|
362
|
Integer epsid = paperStudent.getEpsid();
|
368
|
|
- Map mapstate = ePaperStudentMapper.getExamStateSubjectStateByEpsid(epsid);
|
369
|
|
- Integer examstate = Integer.parseInt(mapstate.get("examstate").toString());
|
370
|
|
- Integer pstate = Integer.parseInt(mapstate.get("pstate").toString());
|
371
|
|
- if(examstate >= 2 || pstate == 2){
|
|
363
|
+ Integer pstate = ePaperStudentMapper.getSubjectStateByEpsid(epsid);
|
|
364
|
+ if(pstate == 2){
|
372
|
365
|
return new ResultVo(0,"考试已结束");
|
373
|
366
|
}
|
374
|
367
|
/*EPaperStudent ps = ePaperStudentMapper.selectByPrimaryKey(epsid);
|
|
@@ -441,10 +434,8 @@ public class EPaperStudentService {
|
441
|
434
|
public ResultVo saveCommitPaperForWeb(PaperStudentWebVo pswvo) {
|
442
|
435
|
/*Integer examstate = ePaperStudentMapper.getExamStateByEpsId(pswvo.getEpsid());
|
443
|
436
|
if (2 <= examstate) throw new MissingParametersException("考试已结束禁止操作");*/
|
444
|
|
- Map mapstate = ePaperStudentMapper.getExamStateSubjectStateByEpsid(pswvo.getEpsid());
|
445
|
|
- Integer examstate = Integer.parseInt(mapstate.get("examstate").toString());
|
446
|
|
- Integer pstate = Integer.parseInt(mapstate.get("pstate").toString());
|
447
|
|
- if(examstate >= 2 || pstate == 2) {
|
|
437
|
+ Integer pstate = ePaperStudentMapper.getSubjectStateByEpsid(pswvo.getEpsid());
|
|
438
|
+ if(pstate == 2) {
|
448
|
439
|
return new ResultVo(0,"考试已结束");
|
449
|
440
|
}
|
450
|
441
|
List<EPaperStudentQuestion> sqlist = pswvo.getQuestions();//学生提交试卷中试题
|
|
@@ -746,10 +737,8 @@ public class EPaperStudentService {
|
746
|
737
|
public void updateSstate(Integer epsid, Integer sstate) {
|
747
|
738
|
/*Integer examstate = ePaperStudentMapper.getExamStateByEpsId(epsid);
|
748
|
739
|
if (2 <= examstate) throw new MissingParametersException("考试已结束禁止操作");*/
|
749
|
|
- Map mapstate = ePaperStudentMapper.getExamStateSubjectStateByEpsid(epsid);
|
750
|
|
- Integer examstate = Integer.parseInt(mapstate.get("examstate").toString());
|
751
|
|
- Integer pstate = Integer.parseInt(mapstate.get("pstate").toString());
|
752
|
|
- if(examstate >= 2 || pstate == 2) throw new MissingParametersException("考试已结束禁止操作");
|
|
740
|
+ Integer pstate = ePaperStudentMapper.getSubjectStateByEpsid(epsid);
|
|
741
|
+ if(pstate == 2) throw new MissingParametersException("考试已结束禁止操作");
|
753
|
742
|
|
754
|
743
|
ePaperStudentMapper.updateSstate(epsid, sstate);
|
755
|
744
|
}
|