|
@@ -139,15 +139,25 @@ public class EReportClassService {
|
139
|
139
|
String pointname = p.get("pointname").toString();
|
140
|
140
|
List<Map> qlist = JSON.parseArray(ques, Map.class);
|
141
|
141
|
for (Map q : qlist) {
|
142
|
|
- List<Integer> eptqids = JSON.parseArray(q.get("eptqids").toString(), Integer.class);
|
143
|
|
- if (N_Utils.numInList(eptqid, eptqids)) {
|
144
|
|
- pointnames.add(pointname);
|
145
|
|
- break;
|
|
142
|
+ if (N_Utils.isEmptyInteger(eptqid)) {
|
|
143
|
+ String qn = ct.get("qn").toString();
|
|
144
|
+ String[] qnList = qn.split(",");
|
|
145
|
+ List<String> qns = JSON.parseArray(q.get("qns").toString(), String.class);
|
|
146
|
+ for (String num : qnList) {
|
|
147
|
+ if (qns.contains(num)) {
|
|
148
|
+ pointnames.add(pointname);
|
|
149
|
+ }
|
|
150
|
+ }
|
|
151
|
+ } else {
|
|
152
|
+ List<Integer> eptqids = JSON.parseArray(q.get("eptqids").toString(), Integer.class);
|
|
153
|
+ if (N_Utils.numInList(eptqid, eptqids)) {
|
|
154
|
+ pointnames.add(pointname);
|
|
155
|
+ }
|
146
|
156
|
}
|
147
|
157
|
}
|
148
|
158
|
}
|
149
|
159
|
}
|
150
|
|
- ct.put("pointnames", pointnames);
|
|
160
|
+ ct.put("pointnames", pointnames.stream().distinct().collect(Collectors.toList()));
|
151
|
161
|
}
|
152
|
162
|
|
153
|
163
|
//单科概况-需关注学生
|
|
@@ -161,8 +171,49 @@ public class EReportClassService {
|
161
|
171
|
Integer ptype = (Integer) paper.get("ptype");
|
162
|
172
|
if (ptype == 1) {
|
163
|
173
|
List<Map> list = eReportClassMapper.listTkSjGk(rank);
|
|
174
|
+ List<Map> questions = eReportClassMapper.listTkQuestion((Integer) paper.get("epid"));
|
|
175
|
+ Object pointjson = paper.get("pointjson");
|
164
|
176
|
for (Map q : list) {
|
|
177
|
+ q.put("pointjson", pointjson);
|
165
|
178
|
setQuestionPoint(q);//试题知识点
|
|
179
|
+ Object questionid = q.get("questionid");
|
|
180
|
+ Map qmap;
|
|
181
|
+ if (N_Utils.isEmpty(q.get("eptqid"))) {
|
|
182
|
+ qmap = questions.stream().filter(tq -> questionid.equals(tq.get("mquestionid"))).findFirst().orElse(null);
|
|
183
|
+ q.put("ctype", qmap.get("mctype"));
|
|
184
|
+ q.put("qtypename", qmap.get("mqtypename"));
|
|
185
|
+ q.put("qstem", qmap.get("mqstem"));
|
|
186
|
+ q.put("qanalyze", qmap.get("mqanalyze"));
|
|
187
|
+ q.put("hashear", qmap.get("mhashear"));
|
|
188
|
+ q.put("hearfile", qmap.get("mhearfile"));
|
|
189
|
+ List<Map> sonques = questions.stream().filter(tq -> questionid.equals(tq.get("questionpid")))
|
|
190
|
+ .collect(Collectors.toList());
|
|
191
|
+ sonques.forEach(sq -> {
|
|
192
|
+ sq.remove("mctype");
|
|
193
|
+ sq.remove("mqtypename");
|
|
194
|
+ sq.remove("mqstem");
|
|
195
|
+ sq.remove("mqanalyze");
|
|
196
|
+ sq.remove("mhashear");
|
|
197
|
+ sq.remove("mhearfile");
|
|
198
|
+ sq.remove("hashear");
|
|
199
|
+ sq.remove("hearfile");
|
|
200
|
+ });
|
|
201
|
+ q.put("sonques", sonques);
|
|
202
|
+ } else {
|
|
203
|
+ qmap = questions.stream().filter(tq -> questionid.equals(tq.get("questionid")))
|
|
204
|
+ .findFirst().orElse(null);
|
|
205
|
+ q.put("ctype", qmap.get("ctype"));
|
|
206
|
+ q.put("score", qmap.get("score"));
|
|
207
|
+ q.put("answer", qmap.get("answer"));
|
|
208
|
+ q.put("qtypename", qmap.get("qtypename"));
|
|
209
|
+ q.put("qstem", qmap.get("qstem"));
|
|
210
|
+ q.put("qoption", qmap.get("qoption"));
|
|
211
|
+ q.put("qanalyze", qmap.get("qanalyze"));
|
|
212
|
+ q.put("hashear", qmap.get("hashear"));
|
|
213
|
+ q.put("hearfile", qmap.get("hearfile"));
|
|
214
|
+ q.put("qn", qmap.get("qn"));
|
|
215
|
+ q.put("qorder", qmap.get("qorder"));
|
|
216
|
+ }
|
166
|
217
|
}
|
167
|
218
|
return list;
|
168
|
219
|
} else {
|