|
@@ -69,6 +69,8 @@ public class ClassroomController {
|
69
|
69
|
List<TClassroomPaperScantron> paperScantronList = new ArrayList<>();//堂测答题卡--题型试题集合
|
70
|
70
|
List<TClassroomVote> voteList = new ArrayList<>();//课堂投票集合
|
71
|
71
|
List<TClassroomVoteStudent> votestuList = new ArrayList<>();//课堂投票--学生投票
|
|
72
|
+ List<TClassroomProfile> profileList = new ArrayList<>();//资料
|
|
73
|
+ List<TClassroomProfileStudent> profileStudentList = new ArrayList<>();//资料--学生
|
72
|
74
|
|
73
|
75
|
if(N_Utils.isListEmpty(rooms)) return new ResultVo(0,"保存成功");
|
74
|
76
|
String nodename = rooms.get(0).getNodename();
|
|
@@ -173,12 +175,18 @@ public class ClassroomController {
|
173
|
175
|
} else if(rtype.equals("votestudent")){//投票--学生投票
|
174
|
176
|
TClassroomVoteStudent stuvote = JSON.parseObject(jsonstr,TClassroomVoteStudent.class);
|
175
|
177
|
votestuList.add(stuvote);
|
|
178
|
+ } else if("profileteacher".equals(rtype)){//资料
|
|
179
|
+ TClassroomProfile profile = JSON.parseObject(jsonstr,TClassroomProfile.class);
|
|
180
|
+ profileList.add(profile);
|
|
181
|
+ } else if("profilestudent".equals(rtype)){//资料--学生
|
|
182
|
+ TClassroomProfileStudent stuProfile = JSON.parseObject(jsonstr,TClassroomProfileStudent.class);
|
|
183
|
+ profileStudentList.add(stuProfile);
|
176
|
184
|
}
|
177
|
185
|
});
|
178
|
186
|
});
|
179
|
187
|
return classroomService.batchSaveClass(startclassList, stopclassList, savefileList
|
180
|
188
|
, askteacherList, askstudentList, signList
|
181
|
|
- , paperList, nodename, stupaperList, paperFileList, paperQtypeList, paperScantronList, voteList, votestuList);
|
|
189
|
+ , paperList, nodename, stupaperList, paperFileList, paperQtypeList, paperScantronList, voteList, votestuList,profileList,profileStudentList);
|
182
|
190
|
}
|
183
|
191
|
|
184
|
192
|
/**
|
|
@@ -211,19 +219,21 @@ public class ClassroomController {
|
211
|
219
|
List<TClassroomPaperScantron> paperScantronList = new ArrayList<>();//堂测答题卡--题型试题集合
|
212
|
220
|
List<TClassroomVote> voteList = new ArrayList<>();//课堂投票
|
213
|
221
|
List<TClassroomVoteStudent> votestuList = new ArrayList<>();//课堂投票--学生投票
|
|
222
|
+ List<TClassroomProfile> profileList = new ArrayList<>();//资料
|
|
223
|
+ List<TClassroomProfileStudent> profileStudentList = new ArrayList<>();//资料--学生
|
214
|
224
|
|
215
|
225
|
String nodename = r.getNodename();
|
216
|
226
|
for (RoomParamVo param : params) {
|
217
|
227
|
String rtype = param.getRtype();
|
218
|
228
|
String jsonstr = param.getJsonstr();
|
219
|
229
|
N_Utils.validation(new Object[]{rtype, "请求类型", 2, jsonstr, "请求json", 2});
|
220
|
|
- if (rtype.equals("startclass")) {//课堂--开始
|
|
230
|
+ if ("startclass".equals(rtype)) {//课堂--开始
|
221
|
231
|
startclass = JSON.parseObject(jsonstr, TClassroom.class);
|
222
|
232
|
int schoolyear = classroomService.getSchoolYearBySchoolid(startclass.getSchoolid());
|
223
|
233
|
startclass.setYear(schoolyear);
|
224
|
|
- } else if (rtype.equals("stopclass")) {//课堂--结束
|
|
234
|
+ } else if ("stopclass".equals(rtype)) {//课堂--结束
|
225
|
235
|
stopclass = JSON.parseObject(jsonstr, TClassroom.class);
|
226
|
|
- } else if (rtype.equals("savefile")) {//课堂--保存图片
|
|
236
|
+ } else if ("savefile".equals(rtype)) {//课堂--保存图片
|
227
|
237
|
TClassroomFile file = JSON.parseObject(jsonstr, TClassroomFile.class);
|
228
|
238
|
if (N_Utils.isNotEmpty(file.getRfpath())) {
|
229
|
239
|
if(N_Utils.isNotEmpty(nodename)) {
|
|
@@ -231,24 +241,24 @@ public class ClassroomController {
|
231
|
241
|
}
|
232
|
242
|
savefileList.add(file);
|
233
|
243
|
}
|
234
|
|
- } else if (rtype.equals("askteacher")) {//互动--发起
|
|
244
|
+ } else if ("askteacher".equals(rtype)) {//互动--发起
|
235
|
245
|
TClassroomAskteacher teacher = JSON.parseObject(jsonstr, TClassroomAskteacher.class);
|
236
|
246
|
String teacherpic = teacher.getTeacherpic();
|
237
|
247
|
if (N_Utils.isNotEmpty(nodename) && N_Utils.isNotEmpty(teacherpic)) {
|
238
|
248
|
teacher.setTeacherpic(nodename + "/" + teacherpic);
|
239
|
249
|
}
|
240
|
250
|
askteacherList.add(teacher);
|
241
|
|
- } else if (rtype.equals("askstudent")) {//互动--保存学生作答情况
|
|
251
|
+ } else if ("askstudent".equals(rtype)) {//互动--保存学生作答情况
|
242
|
252
|
TClassroomAskstudent student = JSON.parseObject(jsonstr, TClassroomAskstudent.class);
|
243
|
253
|
String studentpic = student.getStudentpic();
|
244
|
254
|
if (N_Utils.isNotEmpty(nodename) && N_Utils.isNotEmpty(studentpic)) {
|
245
|
255
|
student.setStudentpic(nodename + "/" + studentpic);
|
246
|
256
|
}
|
247
|
257
|
askstudentList.add(student);
|
248
|
|
- } else if (rtype.equals("sign")) {//学生--签到
|
|
258
|
+ } else if ("sign".equals(rtype)) {//学生--签到
|
249
|
259
|
TClassroomSign sign = JSON.parseObject(jsonstr, TClassroomSign.class);
|
250
|
260
|
signList.add(sign);
|
251
|
|
- } else if (rtype.equals("paperteacher") || "paper".equals(rtype)) {//堂测--发布
|
|
261
|
+ } else if ("paperteacher".equals(rtype) || "paper".equals(rtype)) {//堂测--发布
|
252
|
262
|
TClassroomPaper paper = JSON.parseObject(jsonstr, TClassroomPaper.class);
|
253
|
263
|
|
254
|
264
|
//堂测附件
|
|
@@ -294,20 +304,26 @@ public class ClassroomController {
|
294
|
304
|
}
|
295
|
305
|
}
|
296
|
306
|
paperList.add(paper);
|
297
|
|
- } else if (rtype.equals("paperstudent") || "stupaper".equals(rtype)) {//堂测--学生作答详情
|
|
307
|
+ } else if ("paperstudent".equals(rtype) || "stupaper".equals(rtype)) {//堂测--学生作答详情
|
298
|
308
|
TClassroomPaperStudent student = JSON.parseObject(jsonstr, TClassroomPaperStudent.class);
|
299
|
309
|
stupaperList.add(student);
|
300
|
|
- } else if (rtype.equals("voteteacher")){//投票
|
|
310
|
+ } else if ("voteteacher".equals(rtype)){//投票
|
301
|
311
|
TClassroomVote vote = JSON.parseObject(jsonstr,TClassroomVote.class);
|
302
|
312
|
voteList.add(vote);
|
303
|
|
- } else if(rtype.equals("votestudent")){//投票--学生投票
|
|
313
|
+ } else if("votestudent".equals(rtype)){//投票--学生投票
|
304
|
314
|
TClassroomVoteStudent stuvote = JSON.parseObject(jsonstr,TClassroomVoteStudent.class);
|
305
|
315
|
votestuList.add(stuvote);
|
|
316
|
+ } else if("profileteacher".equals(rtype)){//资料
|
|
317
|
+ TClassroomProfile profile = JSON.parseObject(jsonstr,TClassroomProfile.class);
|
|
318
|
+ profileList.add(profile);
|
|
319
|
+ } else if("profilestudent".equals(rtype)){//资料--学生
|
|
320
|
+ TClassroomProfileStudent stuProfile = JSON.parseObject(jsonstr,TClassroomProfileStudent.class);
|
|
321
|
+ profileStudentList.add(stuProfile);
|
306
|
322
|
}
|
307
|
323
|
}
|
308
|
324
|
return classroomService.saveClass(startclass, stopclass, savefileList
|
309
|
325
|
, askteacherList, askstudentList, signList
|
310
|
|
- , paperList, nodename, stupaperList, paperFileList, paperQtypeList, paperScantronList, voteList, votestuList);
|
|
326
|
+ , paperList, nodename, stupaperList, paperFileList, paperQtypeList, paperScantronList, voteList, votestuList, profileList, profileStudentList);
|
311
|
327
|
}
|
312
|
328
|
|
313
|
329
|
@PostMapping("/list_correct")
|