|
@@ -74,10 +74,10 @@ public class EPaperStudentController {
|
74
|
74
|
Map map = ePaperStudentService.startPaperForAndroid(eps);
|
75
|
75
|
return new ResultVo(0, "成功获取学生试卷", map);
|
76
|
76
|
}catch (MissingParametersException e){
|
77
|
|
- log.error("学生开始考试android失败:" + e.getMessage());
|
|
77
|
+ log.error("学生开始考试android出错:" + e.getMessage());
|
78
|
78
|
return new ResultVo(1,e.getMessage());
|
79
|
79
|
}catch (Exception e){
|
80
|
|
- log.error("学生开始考试android失败:" + e.getMessage());
|
|
80
|
+ log.error("学生开始考试android出错:" + e.getMessage());
|
81
|
81
|
return new ResultVo(1,e.getMessage());
|
82
|
82
|
}
|
83
|
83
|
|
|
@@ -91,10 +91,10 @@ public class EPaperStudentController {
|
91
|
91
|
Map map = ePaperStudentService.startPaperForAndroidNew(eps);
|
92
|
92
|
return new ResultVo(0, "成功获取学生试卷", map);
|
93
|
93
|
}catch (MissingParametersException e){
|
94
|
|
- log.error("学生开始考试android失败:" + e.getMessage());
|
|
94
|
+ log.error("学生开始考试android出错:" + e.getMessage());
|
95
|
95
|
return new ResultVo(1,e.getMessage());
|
96
|
96
|
}catch (Exception e){
|
97
|
|
- log.error("学生开始考试android失败:" + e.getMessage());
|
|
97
|
+ log.error("学生开始考试android出错:" + e.getMessage());
|
98
|
98
|
return new ResultVo(1,e.getMessage());
|
99
|
99
|
}
|
100
|
100
|
|
|
@@ -108,7 +108,7 @@ public class EPaperStudentController {
|
108
|
108
|
ePaperStudentService.saveCommitQuestion(sq);
|
109
|
109
|
return new ResultVo(0, "成功提交试题");
|
110
|
110
|
} catch (Exception e) {
|
111
|
|
- log.error("提交试题失败:" + e.getMessage());
|
|
111
|
+ log.error("提交android试题失败:" + e.getMessage());
|
112
|
112
|
return new ResultVo(1, "提交试题失败");
|
113
|
113
|
}
|
114
|
114
|
}
|
|
@@ -120,7 +120,7 @@ public class EPaperStudentController {
|
120
|
120
|
N_Utils.validation(new Object[]{ps.getEpsid(), "试卷id", 1});
|
121
|
121
|
return ePaperStudentService.saveCommitPaper(ps);
|
122
|
122
|
} catch (Exception e) {
|
123
|
|
- log.error("提交android试卷失败:" + e.getMessage());
|
|
123
|
+ log.error("提交试卷出错:" + e.getMessage());
|
124
|
124
|
return new ResultVo(1, "提交失败");
|
125
|
125
|
}
|
126
|
126
|
}
|
|
@@ -132,10 +132,10 @@ public class EPaperStudentController {
|
132
|
132
|
Integer endTime = ePaperStudentService.updatePaperStudentState(ps.getEpsid());
|
133
|
133
|
return new ResultVo(0, "操作成功", endTime);
|
134
|
134
|
}catch(MissingParametersException e){
|
135
|
|
- log.error("进入考场失败:" + e.getMessage());
|
|
135
|
+ log.error("进入考场出错:" + e.getMessage());
|
136
|
136
|
return new ResultVo(1,e.getMessage());
|
137
|
137
|
} catch (Exception e) {
|
138
|
|
- log.error("进入考场失败:" + e.getMessage());
|
|
138
|
+ log.error("进入考场出错:" + e.getMessage());
|
139
|
139
|
return new ResultVo(1, "操作失败");
|
140
|
140
|
}
|
141
|
141
|
}
|
|
@@ -154,7 +154,7 @@ public class EPaperStudentController {
|
154
|
154
|
int result = ePaperStudentService.getExamstateSubjectState(ps.getEpsid());
|
155
|
155
|
return new ResultVo(0, "获取成功",result);
|
156
|
156
|
} catch (Exception e) {
|
157
|
|
- log.error("获取考试状态失败:" + e.getMessage());
|
|
157
|
+ log.error("获取考试状态出错:" + e.getMessage());
|
158
|
158
|
return new ResultVo(1, "获取考试状态失败");
|
159
|
159
|
}
|
160
|
160
|
}
|
|
@@ -167,14 +167,30 @@ public class EPaperStudentController {
|
167
|
167
|
Map psvo = ePaperStudentService.startPaperForWeb(eps);
|
168
|
168
|
return new ResultVo(0, "成功获取学生试卷", psvo);
|
169
|
169
|
}catch (MissingParametersException e){
|
170
|
|
- log.error("学生web获取试卷失败:" + e.getMessage());
|
|
170
|
+ log.error("学生web获取试卷出错:" + e.getMessage());
|
171
|
171
|
return new ResultVo(1,e.getMessage());
|
172
|
172
|
}catch (Exception e){
|
173
|
|
- log.error("学生web获取试卷失败:" + e.getMessage());
|
|
173
|
+ log.error("学生web获取试卷出错:" + e.getMessage());
|
174
|
174
|
return new ResultVo(1,"获取试卷失败");
|
175
|
175
|
}
|
176
|
176
|
}
|
177
|
177
|
|
|
178
|
+ //提交试题(web:一次提交可能多可客观题或一个主观题)
|
|
179
|
+ @PostMapping("/scqw")
|
|
180
|
+ public ResultVo saveCommitQuestionWeb(@RequestBody PaperStudentWebVo ps) {
|
|
181
|
+ try {
|
|
182
|
+ N_Utils.validation(new Object[]{ps.getEpsid(), "试卷id", 1});
|
|
183
|
+ List<EPaperStudentQuestion> qlist = ps.getQuestions();
|
|
184
|
+ if (N_Utils.isListEmpty(qlist)) {
|
|
185
|
+ return new ResultVo(1, "试题不能为空");
|
|
186
|
+ }
|
|
187
|
+ return ePaperStudentService.saveCommitQuestionForWeb(ps);
|
|
188
|
+ } catch (Exception e) {
|
|
189
|
+ log.error("提交web试题出错:" + e.getMessage());
|
|
190
|
+ return new ResultVo(1, "提交失败");
|
|
191
|
+ }
|
|
192
|
+ }
|
|
193
|
+
|
178
|
194
|
//提交试卷(web)
|
179
|
195
|
@PostMapping("/scpw")
|
180
|
196
|
public ResultVo saveCommitPaperWeb(@RequestBody PaperStudentWebVo ps) {
|
|
@@ -186,7 +202,7 @@ public class EPaperStudentController {
|
186
|
202
|
}
|
187
|
203
|
return ePaperStudentService.saveCommitPaperForWeb(ps);
|
188
|
204
|
} catch (Exception e) {
|
189
|
|
- log.error("提交web试卷失败:" + e.getMessage());
|
|
205
|
+ log.error("提交web试卷出错:" + e.getMessage());
|
190
|
206
|
return new ResultVo(1, "提交失败");
|
191
|
207
|
}
|
192
|
208
|
}
|