|
@@ -5,6 +5,7 @@ import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentMapper;
|
5
|
5
|
import com.xhkjedu.sexam.mapper.report.EReportSchoolMapper;
|
6
|
6
|
import com.xhkjedu.sexam.mapper.reportclass.ERclassMapper;
|
7
|
7
|
import com.xhkjedu.sexam.mapper.reportclass.ERclassRankMapper;
|
|
8
|
+import com.xhkjedu.sexam.mapper.reportclass.EReportClassMapper;
|
8
|
9
|
import com.xhkjedu.sexam.mapper.reportstu.ERstudentMapper;
|
9
|
10
|
import com.xhkjedu.sexam.model.reportstu.ERstudent;
|
10
|
11
|
import com.xhkjedu.sexam.vo.report.ERPaperVo;
|
|
@@ -15,6 +16,7 @@ import org.springframework.transaction.annotation.Transactional;
|
15
|
16
|
|
16
|
17
|
import javax.annotation.Resource;
|
17
|
18
|
import java.util.ArrayList;
|
|
19
|
+import java.util.HashMap;
|
18
|
20
|
import java.util.List;
|
19
|
21
|
import java.util.Map;
|
20
|
22
|
|
|
@@ -26,10 +28,8 @@ import java.util.Map;
|
26
|
28
|
**/
|
27
|
29
|
@Service
|
28
|
30
|
public class EReportClassService {
|
29
|
|
- //@Resource
|
30
|
|
- //private ERbaseMapper eRbaseMapper;
|
31
|
|
- //@Resource
|
32
|
|
- //private ERsubjectMapper eRsubjectMapper;
|
|
31
|
+ @Resource
|
|
32
|
+ private EReportClassMapper eReportClassMapper;
|
33
|
33
|
@Resource
|
34
|
34
|
private ERstudentMapper eRstudentMapper;
|
35
|
35
|
@Resource
|
|
@@ -106,38 +106,74 @@ public class EReportClassService {
|
106
|
106
|
ct.put("gpcwx", gpcwx);
|
107
|
107
|
|
108
|
108
|
//知识点
|
109
|
|
- Object pointjson = ct.get("pointjson");
|
|
109
|
+ setQuestionPoint(ct);
|
110
|
110
|
|
111
|
111
|
ct.remove("answerjson");
|
112
|
112
|
ct.remove("ctype");
|
113
|
113
|
ct.remove("answer");
|
114
|
114
|
ct.remove("pointjson");
|
|
115
|
+ }
|
|
116
|
+ map.put("gpctList", gpctList);
|
|
117
|
+ return map;
|
|
118
|
+ }
|
115
|
119
|
|
116
|
|
- List<String> pointnames = new ArrayList<>();
|
117
|
|
- if (N_Utils.isNotEmpty(pointjson)) {
|
118
|
|
- List<Map> list = JSON.parseArray(pointjson.toString(), Map.class);
|
119
|
|
- Integer eptqid = (Integer) ct.get("eptqid");
|
120
|
|
- for (Map p : list) {
|
121
|
|
- String ques = p.get("ques").toString();
|
122
|
|
- String pointname = p.get("pointname").toString();
|
123
|
|
- List<Map> qlist = JSON.parseArray(ques, Map.class);
|
124
|
|
- for (Map q : qlist) {
|
125
|
|
- List<Integer> eptqids = JSON.parseArray(q.get("eptqids").toString(), Integer.class);
|
126
|
|
- if (N_Utils.numInList(eptqid, eptqids)) {
|
127
|
|
- pointnames.add(pointname);
|
128
|
|
- break;
|
129
|
|
- }
|
|
120
|
+ //试题知识点
|
|
121
|
+ private void setQuestionPoint(Map ct) {
|
|
122
|
+ Object pointjson = ct.get("pointjson");
|
|
123
|
+ List<String> pointnames = new ArrayList<>();
|
|
124
|
+ if (N_Utils.isNotEmpty(pointjson)) {
|
|
125
|
+ List<Map> list = JSON.parseArray(pointjson.toString(), Map.class);
|
|
126
|
+ Integer eptqid = (Integer) ct.get("eptqid");
|
|
127
|
+ for (Map p : list) {
|
|
128
|
+ String ques = p.get("ques").toString();
|
|
129
|
+ String pointname = p.get("pointname").toString();
|
|
130
|
+ List<Map> qlist = JSON.parseArray(ques, Map.class);
|
|
131
|
+ for (Map q : qlist) {
|
|
132
|
+ List<Integer> eptqids = JSON.parseArray(q.get("eptqids").toString(), Integer.class);
|
|
133
|
+ if (N_Utils.numInList(eptqid, eptqids)) {
|
|
134
|
+ pointnames.add(pointname);
|
|
135
|
+ break;
|
130
|
136
|
}
|
131
|
137
|
}
|
132
|
138
|
}
|
133
|
|
- ct.put("pointnames", pointnames);
|
134
|
139
|
}
|
135
|
|
- map.put("gpctList", gpctList);
|
136
|
|
- return map;
|
|
140
|
+ ct.put("pointnames", pointnames);
|
137
|
141
|
}
|
138
|
142
|
|
139
|
143
|
//单科概况-需关注学生
|
140
|
144
|
public List<Map> listGzXs(ERankParamVo rank) {
|
141
|
145
|
return eRclassMapper.listGzXs(rank);
|
142
|
146
|
}
|
|
147
|
+
|
|
148
|
+ //试卷概况
|
|
149
|
+ public List<Map> listSjGk(ERankParamVo rank) {
|
|
150
|
+ Map paper = eReportClassMapper.getPaperByExamSubjectId(rank);
|
|
151
|
+ Integer ptype = (Integer) paper.get("ptype");
|
|
152
|
+ if (ptype == 1) {
|
|
153
|
+ List<Map> list = eReportClassMapper.listTkSjGk(rank);
|
|
154
|
+ for (Map q : list) {
|
|
155
|
+ setQuestionPoint(q);//试题知识点
|
|
156
|
+ }
|
|
157
|
+ return list;
|
|
158
|
+ } else {
|
|
159
|
+ String examname = paper.get("examname").toString();
|
|
160
|
+ List<Map> list = eReportClassMapper.listFjSjGk(rank);
|
|
161
|
+ for (Map q : list) {
|
|
162
|
+ q.put("qstem", examname + "-第" + q.get("qorder") + "题");
|
|
163
|
+ }
|
|
164
|
+ return list;
|
|
165
|
+ }
|
|
166
|
+ }
|
|
167
|
+
|
|
168
|
+ //试卷分析
|
|
169
|
+ public Map getSjFx(ERankParamVo rank) {
|
|
170
|
+ Map map = new HashMap();
|
|
171
|
+ List<Map> types = eReportClassMapper.listType(rank);//大题分析
|
|
172
|
+ List<Map> questions = eReportClassMapper.listQuestion(rank);//小题分析
|
|
173
|
+ List<Map> points = eReportClassMapper.listPoint(rank);//知识点分析
|
|
174
|
+ map.put("types", types);
|
|
175
|
+ map.put("questions", questions);
|
|
176
|
+ map.put("points", points);
|
|
177
|
+ return map;
|
|
178
|
+ }
|
143
|
179
|
}
|