|
@@ -182,66 +182,100 @@ public class EReportStudentService {
|
182
|
182
|
}
|
183
|
183
|
|
184
|
184
|
//处理母子题
|
185
|
|
- private List<Map> setPaperQuestionForTK(List<Map> list){
|
|
185
|
+ private List<Map> setPaperQuestionForTK(List<Map> list) {
|
186
|
186
|
List<Map> rtnlist = new ArrayList<>();
|
187
|
187
|
List<String> questiopids = new ArrayList<>();
|
188
|
|
- for(Map q : list){
|
|
188
|
+ for (Map q : list) {
|
189
|
189
|
Integer qlevel = Integer.parseInt(q.get("qlevel").toString());
|
190
|
|
- if(qlevel == 1){
|
|
190
|
+ if (qlevel == 1) {
|
191
|
191
|
//代表单题
|
192
|
192
|
Map map = new HashMap();
|
193
|
|
- map.put("epsqid",Integer.parseInt(q.get("epsqid").toString()));
|
194
|
|
- map.put("eptqid",Integer.parseInt(q.get("eptqid").toString()));
|
195
|
|
- map.put("ctype",Integer.parseInt(q.get("ctype").toString()));
|
196
|
|
- map.put("qn",q.get("qn").toString());
|
197
|
|
- map.put("qorder",Integer.parseInt(q.get("qorder").toString()));
|
198
|
|
- map.put("qscore",Double.parseDouble(q.get("qscore").toString()));
|
199
|
|
- map.put("stuscore",Double.parseDouble(q.get("stuscore").toString()));
|
200
|
|
- map.put("answered",Integer.parseInt(q.get("answered").toString()));
|
201
|
|
- map.put("answertype",Integer.parseInt(q.get("answertype").toString()));
|
202
|
|
- map.put("stuanswer",q.get("stuanswer").toString());
|
203
|
|
- map.put("stuanswertxt",q.get("stuanswertxt").toString());
|
204
|
|
- map.put("qstem",q.get("qstem").toString());
|
205
|
|
- map.put("qoption",q.get("qoption").toString());
|
206
|
|
- map.put("qanswer",q.get("qanswer").toString());
|
207
|
|
- map.put("qanalyze",q.get("qanalyze").toString());
|
208
|
|
- map.put("hashear",Integer.parseInt(q.get("hashear").toString()));
|
209
|
|
- map.put("hearfile",q.get("hearfile").toString());
|
210
|
|
- map.put("qlevel",qlevel);
|
211
|
|
- map.put("classavgscore",Integer.parseInt(q.get("classavgscore").toString()));
|
212
|
|
- map.put("gradeavgscore",Integer.parseInt(q.get("gradeavgscore").toString()));
|
213
|
|
- if(q.get("points")!=null){
|
|
193
|
+ map.put("epsqid", Integer.parseInt(q.get("epsqid").toString()));
|
|
194
|
+ map.put("eptqid", Integer.parseInt(q.get("eptqid").toString()));
|
|
195
|
+ map.put("ctype", Integer.parseInt(q.get("ctype").toString()));
|
|
196
|
+ map.put("qn", q.get("qn").toString());
|
|
197
|
+ map.put("qorder", Integer.parseInt(q.get("qorder").toString()));
|
|
198
|
+ map.put("qscore", Double.parseDouble(q.get("qscore").toString()));
|
|
199
|
+ map.put("stuscore", Double.parseDouble(q.get("stuscore").toString()));
|
|
200
|
+ map.put("answered", Integer.parseInt(q.get("answered").toString()));
|
|
201
|
+ map.put("answertype", Integer.parseInt(q.get("answertype").toString()));
|
|
202
|
+ map.put("stuanswer", q.get("stuanswer").toString());
|
|
203
|
+ map.put("stuanswertxt", q.get("stuanswertxt").toString());
|
|
204
|
+ map.put("qstem", q.get("qstem").toString());
|
|
205
|
+ map.put("qoption", q.get("qoption").toString());
|
|
206
|
+ map.put("qanswer", q.get("qanswer").toString());
|
|
207
|
+ map.put("qanalyze", q.get("qanalyze").toString());
|
|
208
|
+ map.put("hashear", Integer.parseInt(q.get("hashear").toString()));
|
|
209
|
+ map.put("hearfile", q.get("hearfile").toString());
|
|
210
|
+ map.put("qlevel", qlevel);
|
|
211
|
+ map.put("classavgscore", Integer.parseInt(q.get("classavgscore").toString()));
|
|
212
|
+ map.put("gradeavgscore", Integer.parseInt(q.get("gradeavgscore").toString()));
|
|
213
|
+ if (q.get("points") != null) {
|
214
|
214
|
List<Map> points = (List<Map>) q.get("points");
|
215
|
|
- map.put("points",points);
|
|
215
|
+ map.put("points", points);
|
216
|
216
|
}
|
217
|
217
|
rtnlist.add(map);
|
218
|
|
- }else{
|
|
218
|
+ } else {
|
219
|
219
|
//母题
|
220
|
220
|
String questionpid = q.get("questionpid").toString();
|
221
|
|
- if(!questiopids.contains(questionpid)){
|
|
221
|
+ if (!questiopids.contains(questionpid)) {
|
222
|
222
|
questiopids.add(questionpid);
|
223
|
223
|
//获取所有试题
|
224
|
224
|
List<Map> sonqueslist = list.stream().filter(s -> s.get("questionpid").toString().equals(questionpid)).collect(Collectors.toList());
|
225
|
225
|
Map mq = new HashMap();
|
226
|
|
- mq.put("questionid",questionpid);
|
227
|
|
- mq.put("qlevel",2);
|
228
|
|
- mq.put("qorder",Integer.parseInt(q.get("qorder").toString()));
|
229
|
|
- mq.put("ctype",Integer.parseInt(q.get("mctype").toString()));
|
230
|
|
- mq.put("qstem",q.get("mqstem").toString());
|
231
|
|
- mq.put("qoption",q.get("mqoption").toString());
|
232
|
|
- mq.put("qanswer",q.get("mqanswer").toString());
|
233
|
|
- mq.put("qanalyze",q.get("mqanalyze").toString());
|
234
|
|
- mq.put("hashear",Integer.parseInt(q.get("mhashear").toString()));
|
235
|
|
- mq.put("hearfile",q.get("mhearfile").toString());
|
236
|
|
- if(q.get("points")!=null){
|
|
226
|
+ mq.put("questionid", questionpid);
|
|
227
|
+ mq.put("qlevel", 2);
|
|
228
|
+ mq.put("qorder", Integer.parseInt(q.get("qorder").toString()));
|
|
229
|
+ mq.put("ctype", Integer.parseInt(q.get("mctype").toString()));
|
|
230
|
+ mq.put("qstem", q.get("mqstem").toString());
|
|
231
|
+ mq.put("qoption", q.get("mqoption").toString());
|
|
232
|
+ mq.put("qanswer", q.get("mqanswer").toString());
|
|
233
|
+ mq.put("qanalyze", q.get("mqanalyze").toString());
|
|
234
|
+ mq.put("hashear", Integer.parseInt(q.get("mhashear").toString()));
|
|
235
|
+ mq.put("hearfile", q.get("mhearfile").toString());
|
|
236
|
+ if (q.get("points") != null) {
|
237
|
237
|
List<Map> points = (List<Map>) q.get("points");
|
238
|
|
- mq.put("points",points);
|
|
238
|
+ mq.put("points", points);
|
239
|
239
|
}
|
240
|
|
- mq.put("sonques",sonqueslist);
|
|
240
|
+ mq.put("sonques", sonqueslist);
|
241
|
241
|
rtnlist.add(mq);
|
242
|
242
|
}
|
243
|
243
|
}
|
244
|
244
|
}
|
245
|
245
|
return rtnlist;
|
246
|
246
|
}
|
|
247
|
+
|
|
248
|
+ /**
|
|
249
|
+ * @Description 学生报告--错题集
|
|
250
|
+ * @Param [examid, studentid]
|
|
251
|
+ * @Return java.util.List<java.util.Map>
|
|
252
|
+ * @Author wn
|
|
253
|
+ * @Date 2022/8/29 11:39
|
|
254
|
+ **/
|
|
255
|
+ public List<Map> listStudentSubjectErrorQues(Integer examid, Integer studentid) {
|
|
256
|
+ List<Map> list = eRstudentMapper.listStudentSubjectErrorQues(examid, studentid);
|
|
257
|
+ for (Map map : list) {
|
|
258
|
+ List<Map> queslist = (List<Map>) map.get("questions");
|
|
259
|
+ //单题的数量
|
|
260
|
+ List<Map> dtlist = queslist.stream().filter(s -> Integer.parseInt(s.get("qlevel").toString()) == 1).collect(Collectors.toList());
|
|
261
|
+ //子题
|
|
262
|
+ List<Map> sonlist = queslist.stream().filter(s -> Integer.parseInt(s.get("qlevel").toString()) == 3).collect(Collectors.toList());
|
|
263
|
+ Map<String,List<Map>> mtmap = sonlist.stream().collect(Collectors.groupingBy(s -> s.get("questionpid").toString()));
|
|
264
|
+ int num = 0;
|
|
265
|
+ if(N_Utils.isListNotEmpty(dtlist)){
|
|
266
|
+ num = dtlist.size();
|
|
267
|
+ }
|
|
268
|
+ if(mtmap!=null && mtmap.size()>0){
|
|
269
|
+ num = num + mtmap.size();
|
|
270
|
+ }
|
|
271
|
+ map.put("num",num);
|
|
272
|
+ map.remove("questions");
|
|
273
|
+ return list;
|
|
274
|
+ }
|
|
275
|
+ return list;
|
|
276
|
+ }
|
|
277
|
+
|
|
278
|
+ public void listStudentErrorQuestions(Integer examid, Integer studentid,String subjectid){
|
|
279
|
+
|
|
280
|
+ }
|
247
|
281
|
}
|