|
@@ -60,6 +60,8 @@ public class ClassroomController {
|
60
|
60
|
List<TClassroomPaperFile> paperFileList = new ArrayList<>();//堂测附件集合
|
61
|
61
|
List<TClassroomPaperQtype> paperQtypeList = new ArrayList<>();//堂测答题卡集合
|
62
|
62
|
List<TClassroomPaperScantron> paperScantronList = new ArrayList<>();//堂测答题卡--题型试题集合
|
|
63
|
+ if(N_Utils.isListEmpty(rooms)) return new ResultVo(0,"保存成功");
|
|
64
|
+ String nodename = rooms.get(0).getNodename();
|
63
|
65
|
rooms.forEach(r -> {
|
64
|
66
|
List<RoomParamVo> params = r.getParams();
|
65
|
67
|
params.forEach(param -> {
|
|
@@ -74,12 +76,25 @@ public class ClassroomController {
|
74
|
76
|
stopclassList.add(room);
|
75
|
77
|
} else if (rtype.equals("savefile")) {//课堂--保存图片
|
76
|
78
|
TClassroomFile file = JSON.parseObject(jsonstr, TClassroomFile.class);
|
77
|
|
- if (N_Utils.isNotEmpty(file.getRfpath())) savefileList.add(file);
|
|
79
|
+ if (N_Utils.isNotEmpty(file.getRfpath())) {
|
|
80
|
+ if(N_Utils.isNotEmpty(nodename)) {
|
|
81
|
+ file.setRfpath(nodename + "/" + file.getRfpath());
|
|
82
|
+ }
|
|
83
|
+ savefileList.add(file);
|
|
84
|
+ }
|
78
|
85
|
} else if (rtype.equals("askteacher")) {//互动--发起
|
79
|
86
|
TClassroomAskteacher teacher = JSON.parseObject(jsonstr, TClassroomAskteacher.class);
|
|
87
|
+ String teacherpic = teacher.getTeacherpic();
|
|
88
|
+ if (N_Utils.isNotEmpty(nodename) && N_Utils.isNotEmpty(teacherpic)) {
|
|
89
|
+ teacher.setTeacherpic(nodename + "/" + teacherpic);
|
|
90
|
+ }
|
80
|
91
|
askteacherList.add(teacher);
|
81
|
92
|
} else if (rtype.equals("askstudent")) {//互动--保存学生作答情况
|
82
|
93
|
TClassroomAskstudent student = JSON.parseObject(jsonstr, TClassroomAskstudent.class);
|
|
94
|
+ String studentpic = student.getStudentpic();
|
|
95
|
+ if (N_Utils.isNotEmpty(nodename) && N_Utils.isNotEmpty(studentpic)) {
|
|
96
|
+ student.setStudentpic(nodename + "/" + studentpic);
|
|
97
|
+ }
|
83
|
98
|
askstudentList.add(student);
|
84
|
99
|
} else if (rtype.equals("sign")) {//学生--签到
|
85
|
100
|
TClassroomSign sign = JSON.parseObject(jsonstr, TClassroomSign.class);
|
|
@@ -95,6 +110,9 @@ public class ClassroomController {
|
95
|
110
|
pf.setCreatetime(N_Utils.getSecondTimestamp());
|
96
|
111
|
pf.setSchoolid(paper.getSchoolid());
|
97
|
112
|
pf.setPaperid(paper.getPaperid());
|
|
113
|
+ if(N_Utils.isNotEmpty(nodename)) {
|
|
114
|
+ pf.setFilepath(nodename + "/" + pf.getFilepath());
|
|
115
|
+ }
|
98
|
116
|
paperFileList.add(pf);
|
99
|
117
|
}
|
100
|
118
|
|
|
@@ -135,7 +153,7 @@ public class ClassroomController {
|
135
|
153
|
});
|
136
|
154
|
return classroomService.batchSaveClass(startclassList, stopclassList, savefileList
|
137
|
155
|
, askteacherList, askstudentList, signList
|
138
|
|
- , paperList, stupaperList, paperFileList, paperQtypeList, paperScantronList);
|
|
156
|
+ , paperList, nodename, stupaperList, paperFileList, paperQtypeList, paperScantronList);
|
139
|
157
|
}
|
140
|
158
|
|
141
|
159
|
/**
|
|
@@ -164,6 +182,7 @@ public class ClassroomController {
|
164
|
182
|
List<TClassroomPaperQtype> paperQtypeList = new ArrayList<>();//堂测答题卡集合
|
165
|
183
|
List<TClassroomPaperScantron> paperScantronList = new ArrayList<>();//堂测答题卡--题型试题集合
|
166
|
184
|
List<RoomParamVo> params = r.getParams();
|
|
185
|
+ String nodename = r.getNodename();
|
167
|
186
|
for (RoomParamVo param : params) {
|
168
|
187
|
String rtype = param.getRtype();
|
169
|
188
|
String jsonstr = param.getJsonstr();
|
|
@@ -174,12 +193,25 @@ public class ClassroomController {
|
174
|
193
|
stopclass = JSON.parseObject(jsonstr, TClassroom.class);
|
175
|
194
|
} else if (rtype.equals("savefile")) {//课堂--保存图片
|
176
|
195
|
TClassroomFile file = JSON.parseObject(jsonstr, TClassroomFile.class);
|
177
|
|
- if (N_Utils.isNotEmpty(file.getRfpath())) savefileList.add(file);
|
|
196
|
+ if (N_Utils.isNotEmpty(file.getRfpath())) {
|
|
197
|
+ if(N_Utils.isNotEmpty(nodename)) {
|
|
198
|
+ file.setRfpath(nodename + "/" + file.getRfpath());
|
|
199
|
+ }
|
|
200
|
+ savefileList.add(file);
|
|
201
|
+ }
|
178
|
202
|
} else if (rtype.equals("askteacher")) {//互动--发起
|
179
|
203
|
TClassroomAskteacher teacher = JSON.parseObject(jsonstr, TClassroomAskteacher.class);
|
|
204
|
+ String teacherpic = teacher.getTeacherpic();
|
|
205
|
+ if (N_Utils.isNotEmpty(nodename) && N_Utils.isNotEmpty(teacherpic)) {
|
|
206
|
+ teacher.setTeacherpic(nodename + "/" + teacherpic);
|
|
207
|
+ }
|
180
|
208
|
askteacherList.add(teacher);
|
181
|
209
|
} else if (rtype.equals("askstudent")) {//互动--保存学生作答情况
|
182
|
210
|
TClassroomAskstudent student = JSON.parseObject(jsonstr, TClassroomAskstudent.class);
|
|
211
|
+ String studentpic = student.getStudentpic();
|
|
212
|
+ if (N_Utils.isNotEmpty(nodename) && N_Utils.isNotEmpty(studentpic)) {
|
|
213
|
+ student.setStudentpic(nodename + "/" + studentpic);
|
|
214
|
+ }
|
183
|
215
|
askstudentList.add(student);
|
184
|
216
|
} else if (rtype.equals("sign")) {//学生--签到
|
185
|
217
|
TClassroomSign sign = JSON.parseObject(jsonstr, TClassroomSign.class);
|
|
@@ -195,6 +227,9 @@ public class ClassroomController {
|
195
|
227
|
pf.setCreatetime(N_Utils.getSecondTimestamp());
|
196
|
228
|
pf.setSchoolid(paper.getSchoolid());
|
197
|
229
|
pf.setPaperid(paper.getPaperid());
|
|
230
|
+ if(N_Utils.isNotEmpty(nodename)) {
|
|
231
|
+ pf.setFilepath(nodename + "/" + pf.getFilepath());
|
|
232
|
+ }
|
198
|
233
|
paperFileList.add(pf);
|
199
|
234
|
}
|
200
|
235
|
|
|
@@ -234,7 +269,7 @@ public class ClassroomController {
|
234
|
269
|
}
|
235
|
270
|
return classroomService.saveClass(startclass, stopclass, savefileList
|
236
|
271
|
, askteacherList, askstudentList, signList
|
237
|
|
- , paperList, stupaperList, paperFileList, paperQtypeList, paperScantronList);
|
|
272
|
+ , paperList, nodename, stupaperList, paperFileList, paperQtypeList, paperScantronList);
|
238
|
273
|
}
|
239
|
274
|
|
240
|
275
|
@PostMapping("/list_correct")
|