Commit a923e3fe07b2430b7d02854643316731f9a99e99
1 parent
b543a2f7
Exists in
master
四维诊断
Showing
46 changed files
with
1671 additions
and
843 deletions
Show diff stats
src/main/java/com/jevon/controller/LearnController.java
... | ... | @@ -7,9 +7,7 @@ import com.jevon.service.*; |
7 | 7 | import com.jevon.vo.BaseVo; |
8 | 8 | import com.jevon.vo.excel.ExamExcelVo; |
9 | 9 | import com.jevon.vo.excel.ScoreExcelVo; |
10 | -import com.jevon.vo.req.CreateExamReqVo; | |
11 | -import com.jevon.vo.req.InitAnalyseReqVo; | |
12 | -import com.jevon.vo.req.UpdateExamReqVo; | |
10 | +import com.jevon.vo.req.*; | |
13 | 11 | import io.swagger.annotations.Api; |
14 | 12 | import io.swagger.annotations.ApiOperation; |
15 | 13 | import org.apache.commons.lang3.StringUtils; |
... | ... | @@ -54,6 +52,9 @@ public class LearnController { |
54 | 52 | @Autowired |
55 | 53 | StudentService studentService; |
56 | 54 | |
55 | + @Autowired | |
56 | + LeagueService leagueService; | |
57 | + | |
57 | 58 | @ApiOperation("获取列表") |
58 | 59 | @RequestMapping(value = "getList", method = RequestMethod.POST) |
59 | 60 | public List<Analyse> getList(){ |
... | ... | @@ -260,4 +261,34 @@ public class LearnController { |
260 | 261 | System.out.println(e.toString()); |
261 | 262 | } |
262 | 263 | } |
264 | + | |
265 | + @ApiOperation("获取导入的学校列表") | |
266 | + @RequestMapping(value = "getSchoolName", method = RequestMethod.GET) | |
267 | + public List<String> getSchoolName(int analyseId){ | |
268 | + return studentService.selectSchoolNameByAnalyse(analyseId); | |
269 | + } | |
270 | + | |
271 | + @ApiOperation("定义这次考试的联盟校") | |
272 | + @RequestMapping(value = "initLeague", method = RequestMethod.POST) | |
273 | + public BaseVo initLeague(@RequestBody InitLeagueReqVo initLeagueReqVo){ | |
274 | + BaseVo baseVo = new BaseVo(); | |
275 | + Analyse analyse = analyseService.selectById(initLeagueReqVo.getAnalyseId()); | |
276 | + if(analyse == null){ | |
277 | + baseVo.setMessage("请先创建考试"); | |
278 | + baseVo.setSuccess(false); | |
279 | + return baseVo; | |
280 | + } | |
281 | + List<League> leagues = new ArrayList<>(); | |
282 | + for(InitLeague initLeague : initLeagueReqVo.getData()){ | |
283 | + for(String schoolName : initLeague.getSchoolNames()){ | |
284 | + League league = new League(); | |
285 | + league.setAnalyseId(analyse.getId()); | |
286 | + league.setLeague(initLeague.getLeague()); | |
287 | + league.setSchoolName(schoolName); | |
288 | + leagues.add(league); | |
289 | + } | |
290 | + } | |
291 | + leagueService.insertBatch(leagues); | |
292 | + return baseVo; | |
293 | + } | |
263 | 294 | } | ... | ... |
src/main/java/com/jevon/controller/LearnStatController.java
... | ... | @@ -5,7 +5,7 @@ import com.jevon.enums.DimensionalEnums; |
5 | 5 | import com.jevon.model.*; |
6 | 6 | import com.jevon.service.*; |
7 | 7 | import com.jevon.vo.req.GetLearnReqVo; |
8 | -import com.jevon.wordDTO.second.*; | |
8 | +import com.jevon.wordDTO.*; | |
9 | 9 | import io.swagger.annotations.Api; |
10 | 10 | import io.swagger.annotations.ApiOperation; |
11 | 11 | import org.springframework.beans.factory.annotation.Autowired; |
... | ... | @@ -46,6 +46,9 @@ public class LearnStatController { |
46 | 46 | @Autowired |
47 | 47 | StudentService studentService; |
48 | 48 | |
49 | + @Autowired | |
50 | + LeagueService leagueService; | |
51 | + | |
49 | 52 | @ApiOperation("getForm1_1") |
50 | 53 | @RequestMapping(value = "getForm1_1", method = RequestMethod.POST) |
51 | 54 | public List<Form7> getForm1_1(@RequestBody GetLearnReqVo getLearnReqVo){ |
... | ... | @@ -68,8 +71,8 @@ public class LearnStatController { |
68 | 71 | |
69 | 72 | @ApiOperation("getForm2_1_1") |
70 | 73 | @RequestMapping(value = "getForm2_1_1", method = RequestMethod.POST) |
71 | - public Form1RepVo getForm2_1_1(@RequestBody GetLearnReqVo getLearnReqVo){ | |
72 | - Form1RepVo form1RepVo = new Form1RepVo(); | |
74 | + public Form1RepVO getForm2_1_1(@RequestBody GetLearnReqVo getLearnReqVo){ | |
75 | + Form1RepVO form1RepVo = new Form1RepVO(); | |
73 | 76 | //2.1表 |
74 | 77 | Analyse analyse = analyseService.selectById(getLearnReqVo.getAnalyseId()); |
75 | 78 | //分数段 |
... | ... | @@ -80,12 +83,12 @@ public class LearnStatController { |
80 | 83 | segmentMap.put("C(及格)",maxScore*0.7 + "~" + (maxScore*0.7-1f)+"分"); |
81 | 84 | segmentMap.put("D(不及格)",0 + "~" + (maxScore*0.6-1f)+"分"); |
82 | 85 | form1RepVo.setMap(segmentMap); |
83 | - List<Student> students = studentService.selectBySchoolName(getLearnReqVo.getAnalyseId(),getLearnReqVo.getSchoolName()); | |
86 | + List<Student> students = studentService.selectBySchoolName(getLearnReqVo.getAnalyseId(),null,getLearnReqVo.getSchoolName()); | |
84 | 87 | double sum = new Double(students.size()); |
85 | - int a = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),getLearnReqVo.getSchoolName(),maxScore*0.85,maxScore+1f); | |
86 | - int b = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),getLearnReqVo.getSchoolName(),maxScore*0.7,(maxScore*0.85)); | |
87 | - int c = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),getLearnReqVo.getSchoolName(),maxScore*0.6,(maxScore*0.7)); | |
88 | - int d = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),getLearnReqVo.getSchoolName(),maxScore*0,(maxScore*0.6)); | |
88 | + int a = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),null,getLearnReqVo.getSchoolName(),maxScore*0.85,maxScore+1f); | |
89 | + int b = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),null,getLearnReqVo.getSchoolName(),maxScore*0.7,(maxScore*0.85)); | |
90 | + int c = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),null,getLearnReqVo.getSchoolName(),maxScore*0.6,(maxScore*0.7)); | |
91 | + int d = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),null,getLearnReqVo.getSchoolName(),maxScore*0,(maxScore*0.6)); | |
89 | 92 | List<Form1> form1List = new ArrayList<>(); |
90 | 93 | Form1 formA = new Form1(); |
91 | 94 | formA.setLevel("A"); |
... | ... | @@ -113,52 +116,89 @@ public class LearnStatController { |
113 | 116 | |
114 | 117 | @ApiOperation("getForm2_1_2") |
115 | 118 | @RequestMapping(value = "getForm2_1_2", method = RequestMethod.POST) |
116 | - public List<Form2> getForm2_1_2(@RequestBody GetLearnReqVo getLearnReqVo){ | |
119 | + public Form2RepVO getForm2_1_2(@RequestBody GetLearnReqVo getLearnReqVo){ | |
120 | + Form2RepVO repVO = new Form2RepVO(); | |
117 | 121 | Analyse analyse = analyseService.selectById(getLearnReqVo.getAnalyseId()); |
118 | - List<Student> allStudents = studentService.selectBySchoolName(getLearnReqVo.getAnalyseId(),null); | |
119 | - List<Student> students = studentService.selectBySchoolName(getLearnReqVo.getAnalyseId(),getLearnReqVo.getSchoolName()); | |
122 | + if(analyse == null){ | |
123 | + repVO.setSuccess(false); | |
124 | + repVO.setMessage("请先创建考试"); | |
125 | + return repVO; | |
126 | + } | |
127 | + List<String> leagues = leagueService.getLeagueBySchoolName(analyse.getId(),getLearnReqVo.getSchoolName()); | |
128 | + if(leagues == null){ | |
129 | + repVO.setSuccess(false); | |
130 | + repVO.setMessage("请先设定区"); | |
131 | + return repVO; | |
132 | + } | |
133 | + List<Student> allStudents = studentService.selectBySchoolName(getLearnReqVo.getAnalyseId(),null,null); | |
134 | + List<Student> leagueStudents = studentService.selectBySchoolName(getLearnReqVo.getAnalyseId(),leagues,null); | |
135 | + List<Student> students = studentService.selectBySchoolName(getLearnReqVo.getAnalyseId(),null,getLearnReqVo.getSchoolName()); | |
120 | 136 | //先算高分段的分数 |
121 | 137 | int highNumber = (int) Math.floor(allStudents.size()*0.27); |
122 | 138 | double highScore = allStudents.get(highNumber).getScore(); |
123 | 139 | int lowNumber = allStudents.size()-highNumber; |
124 | 140 | double lowScore = allStudents.get(lowNumber).getScore(); |
125 | - int highAllCount = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),null,highScore,analyse.getMaxScore()+1f); | |
126 | - int lowAllCount = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),null,0,lowScore); | |
127 | - int highCount = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),getLearnReqVo.getSchoolName(),highScore,analyse.getMaxScore()+1f); | |
128 | - int lowCount = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),getLearnReqVo.getSchoolName(),0,lowScore); | |
129 | 141 | List<Form2> list = new ArrayList<>(); |
130 | - Form2 form = new Form2(); | |
131 | - form.setName("联盟校"); | |
132 | - form.setStudentNumber(allStudents.size()); | |
133 | - form.setHighNumber(highAllCount); | |
134 | - form.setLowNumber(lowAllCount); | |
135 | - list.add(form); | |
142 | + | |
143 | + int highAllCount = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),null,null,highScore,analyse.getMaxScore()+1f); | |
144 | + int lowAllCount = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),null,null,0,lowScore); | |
136 | 145 | Form2 form2 = new Form2(); |
137 | - form2.setName(getLearnReqVo.getSchoolName()); | |
138 | - form2.setStudentNumber(students.size()); | |
139 | - form2.setHighNumber(highCount); | |
140 | - form2.setLowNumber(lowCount); | |
141 | - form2.setHighProp(highCount/new Double(highAllCount)); | |
142 | - form2.setLowProp(lowCount/new Double(lowAllCount)); | |
146 | + form2.setName("区"); | |
147 | + form2.setStudentNumber(allStudents.size()); | |
148 | + form2.setHighNumber(highAllCount); | |
149 | + form2.setLowNumber(lowAllCount); | |
143 | 150 | list.add(form2); |
144 | - return list; | |
151 | + { | |
152 | + int highLeagueCount = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),leagues,null,highScore,analyse.getMaxScore()+1f); | |
153 | + int lowLeagueCount = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),leagues,null,0,lowScore); | |
154 | + Form2 form = new Form2(); | |
155 | + form.setName("联盟校"); | |
156 | + form.setStudentNumber(leagueStudents.size()); | |
157 | + form.setStudentProp(new Double(leagueStudents.size()) / new Double(allStudents.size())); | |
158 | + form.setHighNumber(highLeagueCount); | |
159 | + form.setLowNumber(lowLeagueCount); | |
160 | + form.setHighProp(highLeagueCount/new Double(highAllCount)); | |
161 | + form.setLowProp(lowLeagueCount/new Double(lowAllCount)); | |
162 | + list.add(form); | |
163 | + } | |
164 | + { | |
165 | + int highCount = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),null,getLearnReqVo.getSchoolName(),highScore,analyse.getMaxScore()+1f); | |
166 | + int lowCount = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),null,getLearnReqVo.getSchoolName(),0,lowScore); | |
167 | + Form2 form = new Form2(); | |
168 | + form.setName(getLearnReqVo.getSchoolName()); | |
169 | + form.setStudentNumber(students.size()); | |
170 | + form.setStudentProp(new Double(students.size()) / new Double(allStudents.size())); | |
171 | + form.setHighNumber(highCount); | |
172 | + form.setLowNumber(lowCount); | |
173 | + form.setHighProp(highCount/new Double(highAllCount)); | |
174 | + form.setLowProp(lowCount/new Double(lowAllCount)); | |
175 | + list.add(form); | |
176 | + } | |
177 | + repVO.setData(list); | |
178 | + return repVO; | |
145 | 179 | } |
146 | 180 | |
147 | 181 | @ApiOperation("getForm2_1_3_2") |
148 | 182 | @RequestMapping(value = "getForm2_1_3_2", method = RequestMethod.POST) |
149 | - public List<Form2> getForm2_1_3_2(@RequestBody GetLearnReqVo getLearnReqVo){ | |
183 | + public Form2RepVO getForm2_1_3_2(@RequestBody GetLearnReqVo getLearnReqVo){ | |
184 | + Form2RepVO repVO = new Form2RepVO(); | |
150 | 185 | Analyse analyse = analyseService.selectById(getLearnReqVo.getAnalyseId()); |
151 | - List<Student> allStudents = studentService.selectBySchoolName(getLearnReqVo.getAnalyseId(),getLearnReqVo.getSchoolName()); | |
152 | - //先算高分段的分数 再去人数 | |
186 | + if(analyse == null){ | |
187 | + repVO.setSuccess(false); | |
188 | + repVO.setMessage("请先创建考试"); | |
189 | + return repVO; | |
190 | + } | |
191 | + List<Student> allStudents = studentService.selectBySchoolName(getLearnReqVo.getAnalyseId(),null,getLearnReqVo.getSchoolName()); | |
192 | + //先算高分段的分数 | |
153 | 193 | int highNumber = (int) Math.floor(allStudents.size()*0.27); |
154 | 194 | double highScore = allStudents.get(highNumber).getScore(); |
155 | 195 | int lowNumber = allStudents.size()-highNumber; |
156 | 196 | double lowScore = allStudents.get(lowNumber).getScore(); |
157 | - int highAllCount = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),getLearnReqVo.getSchoolName(),highScore,analyse.getMaxScore()+1f); | |
158 | - int lowAllCount = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),getLearnReqVo.getSchoolName(),0,lowScore); | |
197 | + int highAllCount = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),null,getLearnReqVo.getSchoolName(),highScore,analyse.getMaxScore()+1f); | |
198 | + int lowAllCount = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),null,getLearnReqVo.getSchoolName(),0,lowScore); | |
159 | 199 | List<Form2> resultList = new ArrayList<>(); |
160 | 200 | Form2 form = new Form2(); |
161 | - form.setName("联盟校"); | |
201 | + form.setName(getLearnReqVo.getSchoolName()); | |
162 | 202 | form.setStudentNumber(allStudents.size()); |
163 | 203 | form.setHighNumber(highAllCount); |
164 | 204 | form.setLowNumber(lowAllCount); |
... | ... | @@ -171,13 +211,15 @@ public class LearnStatController { |
171 | 211 | Form2 form2 = new Form2(); |
172 | 212 | form2.setName(className); |
173 | 213 | form2.setStudentNumber(list.size()); |
214 | + form2.setStudentProp(new Double(list.size()) / new Double(allStudents.size())); | |
174 | 215 | form2.setHighNumber(highCount); |
175 | 216 | form2.setLowNumber(lowCount); |
176 | 217 | form2.setHighProp(highCount/new Double(highAllCount)); |
177 | 218 | form2.setLowProp(lowCount/new Double(lowAllCount)); |
178 | 219 | resultList.add(form2); |
179 | 220 | } |
180 | - return resultList; | |
221 | + repVO.setData(resultList); | |
222 | + return repVO; | |
181 | 223 | } |
182 | 224 | |
183 | 225 | @ApiOperation("getForm2_1_3") |
... | ... | @@ -206,10 +248,10 @@ public class LearnStatController { |
206 | 248 | Table1 table1 = new Table1(); |
207 | 249 | if(i == 0){ |
208 | 250 | table1.setScore(list.get(i)+""); |
209 | - table1.setNumber(studentService.selectCountByScore(analyse.getId(),getLearnReqVo.getSchoolName(),new Double(list.get(i)),new Double(list.get(i)+1))); | |
251 | + table1.setNumber(studentService.selectCountByScore(analyse.getId(),null,getLearnReqVo.getSchoolName(),new Double(list.get(i)),new Double(list.get(i)+1))); | |
210 | 252 | }else { |
211 | 253 | table1.setScore(list.get(i)+"-"+(list.get(i-1)-0.5)); |
212 | - table1.setNumber(studentService.selectCountByScore(analyse.getId(),getLearnReqVo.getSchoolName(),new Double(list.get(i)),new Double(list.get(i-1)))); | |
254 | + table1.setNumber(studentService.selectCountByScore(analyse.getId(),null,getLearnReqVo.getSchoolName(),new Double(list.get(i)),new Double(list.get(i-1)))); | |
213 | 255 | } |
214 | 256 | list1.add(table1); |
215 | 257 | } |
... | ... | @@ -218,216 +260,378 @@ public class LearnStatController { |
218 | 260 | |
219 | 261 | @ApiOperation("getForm2_2_1") |
220 | 262 | @RequestMapping(value = "getForm2_2_1", method = RequestMethod.POST) |
221 | - public List<Form3> getForm2_2_1(@RequestBody GetLearnReqVo getLearnReqVo){ | |
263 | + public Form3RepVO getForm2_2_1(@RequestBody GetLearnReqVo getLearnReqVo){ | |
264 | + Form3RepVO repVO = new Form3RepVO(); | |
222 | 265 | Analyse analyse = analyseService.selectById(getLearnReqVo.getAnalyseId()); |
266 | + if(analyse == null){ | |
267 | + repVO.setSuccess(false); | |
268 | + repVO.setMessage("请先创建考试"); | |
269 | + return repVO; | |
270 | + } | |
271 | + List<String> leagues = leagueService.getLeagueBySchoolName(analyse.getId(),getLearnReqVo.getSchoolName()); | |
272 | + if(leagues == null){ | |
273 | + repVO.setSuccess(false); | |
274 | + repVO.setMessage("请先设定区"); | |
275 | + return repVO; | |
276 | + } | |
223 | 277 | List<Form3> list = new ArrayList<>(); |
224 | - Form3 form3 = new Form3(); | |
225 | - form3.setName("联盟校"); | |
226 | - List<Student> allStudents = studentService.selectBySchoolName(analyse.getId(),null); | |
227 | - form3.setMaxScore(studentService.selectMaxScore(analyse.getId(),null)); | |
228 | - form3.setAverage(studentService.selectAvgScore(analyse.getId(),null)); | |
229 | - form3.setMinScore(studentService.selectMinScore(analyse.getId(),null)); | |
230 | - int a = studentService.selectCountByScore(analyse.getId(),null,analyse.getMaxScore()*0.85,analyse.getMaxScore()+1); | |
231 | - form3.setApercent(a / new Double(allStudents.size()) * 100); | |
232 | - int b = studentService.selectCountByScore(analyse.getId(),null,analyse.getMaxScore()*0.7,analyse.getMaxScore()*0.85); | |
233 | - form3.setBpercent(b / new Double(allStudents.size()) * 100); | |
234 | - int c = studentService.selectCountByScore(analyse.getId(),null,analyse.getMaxScore()*0.6,analyse.getMaxScore()*0.7); | |
235 | - form3.setCpercent(c / new Double(allStudents.size()) * 100); | |
236 | - int d = studentService.selectCountByScore(analyse.getId(),null,analyse.getMaxScore()*0,analyse.getMaxScore()*0.6); | |
237 | - form3.setDpercent(d / new Double(allStudents.size()) * 100); | |
238 | - list.add(form3); | |
239 | - | |
240 | - Form3 form = new Form3(); | |
241 | - form.setName("联盟校"); | |
242 | - List<Student> students = studentService.selectBySchoolName(analyse.getId(),getLearnReqVo.getSchoolName()); | |
243 | - form.setMaxScore(studentService.selectMaxScore(analyse.getId(),getLearnReqVo.getSchoolName())); | |
244 | - form.setAverage(studentService.selectAvgScore(analyse.getId(),getLearnReqVo.getSchoolName())); | |
245 | - form.setMinScore(studentService.selectMinScore(analyse.getId(),getLearnReqVo.getSchoolName())); | |
246 | - int a1 = studentService.selectCountByScore(analyse.getId(),getLearnReqVo.getSchoolName(),analyse.getMaxScore()*0.85,analyse.getMaxScore()+1); | |
247 | - form.setApercent(a1 / new Double(students.size()) * 100); | |
248 | - int b1 = studentService.selectCountByScore(analyse.getId(),getLearnReqVo.getSchoolName(),analyse.getMaxScore()*0.7,analyse.getMaxScore()*0.85); | |
249 | - form.setBpercent(b1 / new Double(students.size()) * 100); | |
250 | - int c1 = studentService.selectCountByScore(analyse.getId(),getLearnReqVo.getSchoolName(),analyse.getMaxScore()*0.6,analyse.getMaxScore()*0.7); | |
251 | - form.setCpercent(c1 / new Double(students.size()) * 100); | |
252 | - int d1 = studentService.selectCountByScore(analyse.getId(),getLearnReqVo.getSchoolName(),analyse.getMaxScore()*0,analyse.getMaxScore()*0.6); | |
253 | - form.setDpercent(d1 / new Double(students.size()) * 100); | |
254 | - list.add(form); | |
255 | - return list ; | |
278 | + List<Student> allStudents = studentService.selectBySchoolName(analyse.getId(),null,null); | |
279 | + { | |
280 | + Form3 form3 = new Form3(); | |
281 | + form3.setName("区"); | |
282 | + form3.setMaxScore(studentService.selectMaxScore(analyse.getId(),null,null)); | |
283 | + form3.setAverage(studentService.selectAvgScore(analyse.getId(),null,null)); | |
284 | + form3.setMinScore(studentService.selectMinScore(analyse.getId(),null,null)); | |
285 | + int a = studentService.selectCountByScore(analyse.getId(),null,null,analyse.getMaxScore()*0.85,analyse.getMaxScore()+1); | |
286 | + form3.setApercent(a / new Double(allStudents.size()) * 100); | |
287 | + int b = studentService.selectCountByScore(analyse.getId(),null,null,analyse.getMaxScore()*0.7,analyse.getMaxScore()*0.85); | |
288 | + form3.setBpercent(b / new Double(allStudents.size()) * 100); | |
289 | + int c = studentService.selectCountByScore(analyse.getId(),null,null,analyse.getMaxScore()*0.6,analyse.getMaxScore()*0.7); | |
290 | + form3.setCpercent(c / new Double(allStudents.size()) * 100); | |
291 | + int d = studentService.selectCountByScore(analyse.getId(),null,null,analyse.getMaxScore()*0,analyse.getMaxScore()*0.6); | |
292 | + form3.setDpercent(d / new Double(allStudents.size()) * 100); | |
293 | + list.add(form3); | |
294 | + } | |
295 | + { | |
296 | + Form3 form = new Form3(); | |
297 | + form.setName("联盟校"); | |
298 | + List<Student> students = studentService.selectBySchoolName(analyse.getId(),leagues,null); | |
299 | + form.setMaxScore(studentService.selectMaxScore(analyse.getId(),leagues,null)); | |
300 | + form.setAverage(studentService.selectAvgScore(analyse.getId(),leagues,null)); | |
301 | + form.setMinScore(studentService.selectMinScore(analyse.getId(),leagues,null)); | |
302 | + int a1 = studentService.selectCountByScore(analyse.getId(),leagues,null,analyse.getMaxScore()*0.85,analyse.getMaxScore()+1); | |
303 | + form.setApercent(a1 / new Double(students.size()) * 100); | |
304 | + int b1 = studentService.selectCountByScore(analyse.getId(),leagues,null,analyse.getMaxScore()*0.7,analyse.getMaxScore()*0.85); | |
305 | + form.setBpercent(b1 / new Double(students.size()) * 100); | |
306 | + int c1 = studentService.selectCountByScore(analyse.getId(),leagues,null,analyse.getMaxScore()*0.6,analyse.getMaxScore()*0.7); | |
307 | + form.setCpercent(c1 / new Double(students.size()) * 100); | |
308 | + int d1 = studentService.selectCountByScore(analyse.getId(),leagues,null,analyse.getMaxScore()*0,analyse.getMaxScore()*0.6); | |
309 | + form.setDpercent(d1 / new Double(students.size()) * 100); | |
310 | + list.add(form); | |
311 | + } | |
312 | + { | |
313 | + Form3 form = new Form3(); | |
314 | + form.setName(getLearnReqVo.getSchoolName()); | |
315 | + List<Student> students = studentService.selectBySchoolName(analyse.getId(),null,getLearnReqVo.getSchoolName()); | |
316 | + form.setMaxScore(studentService.selectMaxScore(analyse.getId(),null,getLearnReqVo.getSchoolName())); | |
317 | + form.setAverage(studentService.selectAvgScore(analyse.getId(),null,getLearnReqVo.getSchoolName())); | |
318 | + form.setMinScore(studentService.selectMinScore(analyse.getId(),null,getLearnReqVo.getSchoolName())); | |
319 | + int a1 = studentService.selectCountByScore(analyse.getId(),null,getLearnReqVo.getSchoolName(),analyse.getMaxScore()*0.85,analyse.getMaxScore()+1); | |
320 | + form.setApercent(a1 / new Double(students.size()) * 100); | |
321 | + int b1 = studentService.selectCountByScore(analyse.getId(),null,getLearnReqVo.getSchoolName(),analyse.getMaxScore()*0.7,analyse.getMaxScore()*0.85); | |
322 | + form.setBpercent(b1 / new Double(students.size()) * 100); | |
323 | + int c1 = studentService.selectCountByScore(analyse.getId(),null,getLearnReqVo.getSchoolName(),analyse.getMaxScore()*0.6,analyse.getMaxScore()*0.7); | |
324 | + form.setCpercent(c1 / new Double(students.size()) * 100); | |
325 | + int d1 = studentService.selectCountByScore(analyse.getId(),null,getLearnReqVo.getSchoolName(),analyse.getMaxScore()*0,analyse.getMaxScore()*0.6); | |
326 | + form.setDpercent(d1 / new Double(students.size()) * 100); | |
327 | + list.add(form); | |
328 | + } | |
329 | + repVO.setData(list); | |
330 | + return repVO ; | |
256 | 331 | } |
257 | 332 | |
258 | 333 | @ApiOperation("getForm2_2_2") |
259 | 334 | @RequestMapping(value = "getForm2_2_2", method = RequestMethod.POST) |
260 | - public List<Form4> getForm2_2_2(@RequestBody GetLearnReqVo getLearnReqVo){ | |
335 | + public Form4RepVO getForm2_2_2(@RequestBody GetLearnReqVo getLearnReqVo){ | |
336 | + Form4RepVO repVO = new Form4RepVO(); | |
261 | 337 | Analyse analyse = analyseService.selectById(getLearnReqVo.getAnalyseId()); |
338 | + if(analyse == null){ | |
339 | + repVO.setSuccess(false); | |
340 | + repVO.setMessage("请先创建考试"); | |
341 | + return repVO; | |
342 | + } | |
343 | + List<String> leagues = leagueService.getLeagueBySchoolName(analyse.getId(),getLearnReqVo.getSchoolName()); | |
344 | + if(leagues == null){ | |
345 | + repVO.setSuccess(false); | |
346 | + repVO.setMessage("请先设定区"); | |
347 | + return repVO; | |
348 | + } | |
262 | 349 | List<Form4> list = new ArrayList<>(); |
263 | - Form4 form4 = new Form4(); | |
264 | - form4.setName("联盟校"); | |
265 | - form4.setModeNumber(studentService.selectModeNumber(analyse.getId(),null)); | |
266 | - form4.setMedianNumber(studentService.selectMedian(analyse.getId(),null)); | |
267 | - form4.setStdev(studentService.selectStdev(analyse.getId(),null)); | |
268 | - form4.setAvgNumber(studentService.selectAvgScore(analyse.getId(),null)); | |
269 | - list.add(form4); | |
270 | - Form4 form = new Form4(); | |
271 | - form.setName(getLearnReqVo.getSchoolName()); | |
272 | - form.setModeNumber(studentService.selectModeNumber(analyse.getId(),getLearnReqVo.getSchoolName())); | |
273 | - form.setMedianNumber(studentService.selectMedian(analyse.getId(),getLearnReqVo.getSchoolName())); | |
274 | - form.setStdev(studentService.selectStdev(analyse.getId(),getLearnReqVo.getSchoolName())); | |
275 | - form.setAvgNumber(studentService.selectAvgScore(analyse.getId(),getLearnReqVo.getSchoolName())); | |
276 | - list.add(form); | |
277 | - return list; | |
350 | + { | |
351 | + Form4 form4 = new Form4(); | |
352 | + form4.setName("区"); | |
353 | + form4.setModeNumber(studentService.selectModeNumber(analyse.getId(),null,null)); | |
354 | + form4.setMedianNumber(studentService.selectMedian(analyse.getId(),null,null)); | |
355 | + form4.setStdev(studentService.selectStdev(analyse.getId(),null,null)); | |
356 | + form4.setAvgNumber(studentService.selectAvgScore(analyse.getId(),null,null)); | |
357 | + list.add(form4); | |
358 | + } | |
359 | + { | |
360 | + Form4 form = new Form4(); | |
361 | + form.setName(getLearnReqVo.getSchoolName()); | |
362 | + form.setModeNumber(studentService.selectModeNumber(analyse.getId(),leagues,null)); | |
363 | + form.setMedianNumber(studentService.selectMedian(analyse.getId(),leagues,null)); | |
364 | + form.setStdev(studentService.selectStdev(analyse.getId(),leagues,null)); | |
365 | + form.setAvgNumber(studentService.selectAvgScore(analyse.getId(),leagues,null)); | |
366 | + list.add(form); | |
367 | + } | |
368 | + { | |
369 | + Form4 form = new Form4(); | |
370 | + form.setName(getLearnReqVo.getSchoolName()); | |
371 | + form.setModeNumber(studentService.selectModeNumber(analyse.getId(),null,getLearnReqVo.getSchoolName())); | |
372 | + form.setMedianNumber(studentService.selectMedian(analyse.getId(),null,getLearnReqVo.getSchoolName())); | |
373 | + form.setStdev(studentService.selectStdev(analyse.getId(),null,getLearnReqVo.getSchoolName())); | |
374 | + form.setAvgNumber(studentService.selectAvgScore(analyse.getId(),null,getLearnReqVo.getSchoolName())); | |
375 | + list.add(form); | |
376 | + } | |
377 | + repVO.setData(list); | |
378 | + return repVO; | |
278 | 379 | } |
279 | 380 | |
280 | 381 | @ApiOperation("getForm2_2_3") |
281 | 382 | @RequestMapping(value = "getForm2_2_3", method = RequestMethod.POST) |
282 | - public List<From5> getForm2_2_3(@RequestBody GetLearnReqVo getLearnReqVo){ | |
283 | - List<From5> list = new ArrayList<>(); | |
383 | + public Form5RepVO getForm2_2_3(@RequestBody GetLearnReqVo getLearnReqVo){ | |
384 | + Form5RepVO repVO = new Form5RepVO(); | |
284 | 385 | Analyse analyse = analyseService.selectById(getLearnReqVo.getAnalyseId()); |
285 | - List<Student> allStudents = studentService.selectBySchoolName(analyse.getId(),null); | |
286 | - int allNumber = (int) Math.floor(allStudents.size()*0.27) ; | |
386 | + if(analyse == null){ | |
387 | + repVO.setSuccess(false); | |
388 | + repVO.setMessage("请先创建考试"); | |
389 | + return repVO; | |
390 | + } | |
391 | + List<String> leagues = leagueService.getLeagueBySchoolName(analyse.getId(),getLearnReqVo.getSchoolName()); | |
392 | + if(leagues == null){ | |
393 | + repVO.setSuccess(false); | |
394 | + repVO.setMessage("请先设定区"); | |
395 | + return repVO; | |
396 | + } | |
287 | 397 | List<String> allHighStudent = new ArrayList<>(); |
288 | 398 | List<String> allLowStudent = new ArrayList<>(); |
289 | - for (int i = 0; i < allNumber ; i++) { | |
290 | - allHighStudent.add(allStudents.get(i).getStudentNumber()); | |
399 | + List<Student> allStudents = studentService.selectBySchoolName(analyse.getId(),null,null); | |
400 | + int allNumber = (int) Math.floor(allStudents.size()*0.27) ; | |
401 | + { | |
402 | + //获取区 高分段,低分段学生编号 | |
403 | + for (int i = 0; i < allNumber ; i++) { | |
404 | + allHighStudent.add(allStudents.get(i).getStudentNumber()); | |
405 | + } | |
406 | + for(int i =allStudents.size()-allNumber ; i < allStudents.size() ; i++){ | |
407 | + allLowStudent.add(allStudents.get(i).getStudentNumber()); | |
408 | + } | |
291 | 409 | } |
292 | - for(int i =allStudents.size()-allNumber ; i < allStudents.size() ; i++){ | |
293 | - allLowStudent.add(allStudents.get(i).getStudentNumber()); | |
410 | + List<String> leagueHighStudent = new ArrayList<>(); | |
411 | + List<String> leagueLowStudent = new ArrayList<>(); | |
412 | + List<Student> leagueStudents = studentService.selectBySchoolName(analyse.getId(),leagues,null); | |
413 | + int leagueNumber = (int) Math.floor(leagueStudents.size()*0.27) ; | |
414 | + { | |
415 | + //获取联盟校 高分段 低分段 学生编号 | |
416 | + for (int i = 0; i < leagueNumber ; i++) { | |
417 | + leagueHighStudent.add(leagueStudents.get(i).getStudentNumber()); | |
418 | + } | |
419 | + for(int i =leagueStudents.size()-leagueNumber ; i < leagueStudents.size() ; i++){ | |
420 | + leagueLowStudent.add(leagueStudents.get(i).getStudentNumber()); | |
421 | + } | |
294 | 422 | } |
295 | - List<Student> students = studentService.selectBySchoolName(analyse.getId(),getLearnReqVo.getSchoolName()); | |
296 | - int number = (int) Math.floor(students.size()*0.27) ; | |
297 | 423 | List<String> highStudent = new ArrayList<>(); |
298 | 424 | List<String> lowStudent = new ArrayList<>(); |
299 | - for (int i = 0; i < number ; i++) { | |
300 | - highStudent.add(students.get(i).getStudentNumber()); | |
301 | - } | |
302 | - for(int i =students.size()-number ; i < students.size() ; i++){ | |
303 | - lowStudent.add(students.get(i).getStudentNumber()); | |
425 | + List<Student> students = studentService.selectBySchoolName(analyse.getId(),null,getLearnReqVo.getSchoolName()); | |
426 | + int number = (int) Math.floor(students.size()*0.27) ; | |
427 | + { | |
428 | + //获取本校高分段 低分段 学生编号 | |
429 | + for (int i = 0; i < number ; i++) { | |
430 | + highStudent.add(students.get(i).getStudentNumber()); | |
431 | + } | |
432 | + for(int i =students.size()-number ; i < students.size() ; i++){ | |
433 | + lowStudent.add(students.get(i).getStudentNumber()); | |
434 | + } | |
304 | 435 | } |
436 | + | |
437 | + List<Form5> list = new ArrayList<>(); | |
438 | + | |
305 | 439 | List<AnalyseDetail> analyseDetails = analyseDetailService.selectByAnalyseId(analyse.getId()); |
306 | 440 | for(AnalyseDetail analyseDetail : analyseDetails){ |
307 | - From5 from5 = new From5(); | |
308 | - Double allSumScore = studentDetailService.selectSumScore(analyse.getId(),null,analyseDetail.getQuestionNumber()); | |
309 | - Double schoolSumScore = studentDetailService.selectSumScore(analyse.getId(),getLearnReqVo.getSchoolName(),analyseDetail.getQuestionNumber()); | |
441 | + Form5 from5 = new Form5(); | |
442 | + Double allSumScore = studentDetailService.selectSumScore(analyse.getId(),null,null,analyseDetail.getQuestionNumber()); | |
443 | + Double leagueSumScore = studentDetailService.selectSumScore(analyse.getId(),leagues,null,analyseDetail.getQuestionNumber()); | |
444 | + Double schoolSumScore = studentDetailService.selectSumScore(analyse.getId(),null,getLearnReqVo.getSchoolName(),analyseDetail.getQuestionNumber()); | |
310 | 445 | from5.setExamNumber(analyseDetail.getQuestionNumber()); |
311 | 446 | from5.setScore(analyseDetail.getScore()); |
312 | 447 | from5.setDifficultName(DifficultEnums.getDifficultName(analyseDetail.getDifficult())); |
313 | 448 | from5.setAllRate(allSumScore/new Double(allStudents.size()) / analyseDetail.getScore()); |
449 | + from5.setLeagueRate(leagueSumScore/new Double(leagueStudents.size()) / analyseDetail.getScore()); | |
314 | 450 | from5.setSchoolRate(schoolSumScore/new Double(students.size()) / analyseDetail.getScore()); |
451 | + | |
315 | 452 | from5.setAllAvg(allSumScore / new Double(allStudents.size())); |
453 | + from5.setLeagueAvg(leagueSumScore / new Double(leagueStudents.size())); | |
316 | 454 | from5.setSchoolAvg(schoolSumScore / new Double(students.size())); |
317 | - int allHigh = studentDetailService.selectTrueByExamNumber(analyse.getId(),null ,analyseDetail.getQuestionNumber(),allHighStudent,analyseDetail.getScore()); | |
318 | - int allLow = studentDetailService.selectTrueByExamNumber(analyse.getId(),null ,analyseDetail.getQuestionNumber(),allLowStudent,analyseDetail.getScore()); | |
319 | - int high = studentDetailService.selectTrueByExamNumber(analyse.getId(),getLearnReqVo.getSchoolName() ,analyseDetail.getQuestionNumber(),highStudent,analyseDetail.getScore()); | |
320 | - int low = studentDetailService.selectTrueByExamNumber(analyse.getId(),getLearnReqVo.getSchoolName() ,analyseDetail.getQuestionNumber(),lowStudent,analyseDetail.getScore()); | |
455 | + | |
456 | + int allHigh = studentDetailService.selectTrueByExamNumber(analyse.getId(),null,null ,analyseDetail.getQuestionNumber(),allHighStudent,analyseDetail.getScore()); | |
457 | + int allLow = studentDetailService.selectTrueByExamNumber(analyse.getId(),null,null ,analyseDetail.getQuestionNumber(),allLowStudent,analyseDetail.getScore()); | |
458 | + | |
459 | + int leagueHigh = studentDetailService.selectTrueByExamNumber(analyse.getId(),leagues,null ,analyseDetail.getQuestionNumber(),allHighStudent,analyseDetail.getScore()); | |
460 | + int leagueLow = studentDetailService.selectTrueByExamNumber(analyse.getId(),leagues,null ,analyseDetail.getQuestionNumber(),allLowStudent,analyseDetail.getScore()); | |
461 | + | |
462 | + int high = studentDetailService.selectTrueByExamNumber(analyse.getId(),null,getLearnReqVo.getSchoolName() ,analyseDetail.getQuestionNumber(),highStudent,analyseDetail.getScore()); | |
463 | + int low = studentDetailService.selectTrueByExamNumber(analyse.getId(),null,getLearnReqVo.getSchoolName() ,analyseDetail.getQuestionNumber(),lowStudent,analyseDetail.getScore()); | |
321 | 464 | from5.setAllDist(new Double(allHigh-allLow)/new Double(allNumber)); |
465 | + from5.setLeagueDist(new Double(leagueHigh-leagueLow)/new Double(leagueNumber)); | |
322 | 466 | from5.setSchoolDist(new Double(high-low)/new Double(number)); |
323 | 467 | list.add(from5); |
324 | 468 | } |
325 | - return list; | |
469 | + repVO.setData(list); | |
470 | + return repVO; | |
326 | 471 | } |
327 | 472 | |
328 | 473 | @ApiOperation("getForm2_2_4") |
329 | 474 | @RequestMapping(value = "getForm2_2_4", method = RequestMethod.POST) |
330 | - public List<Form8> getForm2_2_4(@RequestBody GetLearnReqVo getLearnReqVo){ | |
475 | + public Form8RepVO getForm2_2_4(@RequestBody GetLearnReqVo getLearnReqVo){ | |
476 | + Form8RepVO repVO = new Form8RepVO(); | |
331 | 477 | Analyse analyse = analyseService.selectById(getLearnReqVo.getAnalyseId()); |
478 | + if(analyse == null){ | |
479 | + repVO.setSuccess(false); | |
480 | + repVO.setMessage("请先创建考试"); | |
481 | + return repVO; | |
482 | + } | |
483 | + List<String> leagues = leagueService.getLeagueBySchoolName(analyse.getId(),getLearnReqVo.getSchoolName()); | |
484 | + if(leagues == null){ | |
485 | + repVO.setSuccess(false); | |
486 | + repVO.setMessage("请先设定区"); | |
487 | + return repVO; | |
488 | + } | |
332 | 489 | List<Form8> list = new ArrayList<>(); |
333 | - List<Student> allStudents = studentService.selectBySchoolName(analyse.getId(),null); | |
334 | - List<Student> students = studentService.selectBySchoolName(analyse.getId(),getLearnReqVo.getSchoolName()); | |
490 | + List<Student> allStudents = studentService.selectBySchoolName(analyse.getId(),null,null); | |
491 | + List<Student> leagueStudents = studentService.selectBySchoolName(analyse.getId(),leagues,null); | |
492 | + List<Student> students = studentService.selectBySchoolName(analyse.getId(),null,getLearnReqVo.getSchoolName()); | |
335 | 493 | for(DifficultEnums enums : DifficultEnums.values()){ |
336 | 494 | Form8 form8 = new Form8(); |
337 | 495 | form8.setDifficultName(enums.getDifficultName()); |
338 | 496 | form8.setScore(analyseDetailService.selectDifficult(analyse.getId(),enums.getDifficultType())); |
339 | 497 | List<AnalyseDetail> analyseDetails = analyseDetailService.selectDifficultDetail(analyse.getId(),enums.getDifficultType()); |
340 | - Double allSumScore = 0d , schoolSumScore = 0d , score = 0d; | |
498 | + Double allSumScore = 0d , leagueSumScore = 0d , schoolSumScore = 0d , score = 0d; | |
341 | 499 | for(AnalyseDetail analyseDetail : analyseDetails){ |
342 | - allSumScore = allSumScore + studentDetailService.selectSumScore(analyse.getId(),null,analyseDetail.getQuestionNumber()); | |
343 | - schoolSumScore = schoolSumScore + studentDetailService.selectSumScore(analyse.getId(),getLearnReqVo.getSchoolName(),analyseDetail.getQuestionNumber()); | |
500 | + allSumScore = allSumScore + studentDetailService.selectSumScore(analyse.getId(),null,null,analyseDetail.getQuestionNumber()); | |
501 | + leagueSumScore = leagueSumScore + studentDetailService.selectSumScore(analyse.getId(),leagues,null,analyseDetail.getQuestionNumber()); | |
502 | + schoolSumScore = schoolSumScore + studentDetailService.selectSumScore(analyse.getId(),null,getLearnReqVo.getSchoolName(),analyseDetail.getQuestionNumber()); | |
344 | 503 | score = score + analyseDetail.getScore() ; |
345 | 504 | } |
346 | 505 | form8.setAllRate(allSumScore / new Double(allStudents.size()) / score ); |
506 | + form8.setLeagueRate(leagueSumScore / new Double(leagueStudents.size()) / score ); | |
347 | 507 | form8.setSchoolRate(schoolSumScore / new Double(students.size()) / score); |
348 | 508 | list.add(form8); |
349 | 509 | } |
350 | - return list; | |
510 | + repVO.setData(list); | |
511 | + return repVO; | |
351 | 512 | } |
352 | 513 | |
353 | 514 | @ApiOperation("getForm3_1") |
354 | 515 | @RequestMapping(value = "getForm3_1", method = RequestMethod.POST) |
355 | - public List<Form6> getForm3_1(@RequestBody GetLearnReqVo getLearnReqVo){ | |
516 | + public Form6RepVo getForm3_1(@RequestBody GetLearnReqVo getLearnReqVo){ | |
356 | 517 | return initDimensional(getLearnReqVo,DimensionalEnums.knowledge.getDimensionalType()); |
357 | 518 | } |
358 | 519 | |
359 | 520 | @ApiOperation("getForm3_2") |
360 | 521 | @RequestMapping(value = "getForm3_2", method = RequestMethod.POST) |
361 | - public List<Form6> getForm3_2(@RequestBody GetLearnReqVo getLearnReqVo){ | |
522 | + public Form6RepVo getForm3_2(@RequestBody GetLearnReqVo getLearnReqVo){ | |
362 | 523 | return initDimensional(getLearnReqVo,DimensionalEnums.skill.getDimensionalType()); |
363 | 524 | } |
364 | 525 | |
365 | 526 | @ApiOperation("getForm3_3") |
366 | 527 | @RequestMapping(value = "getForm3_3", method = RequestMethod.POST) |
367 | - public List<Form6> getForm3_3(@RequestBody GetLearnReqVo getLearnReqVo){ | |
528 | + public Form6RepVo getForm3_3(@RequestBody GetLearnReqVo getLearnReqVo){ | |
368 | 529 | return initDimensional(getLearnReqVo,DimensionalEnums.ability.getDimensionalType()); |
369 | 530 | } |
370 | 531 | |
371 | 532 | @ApiOperation("getForm3_4") |
372 | 533 | @RequestMapping(value = "getForm3_4", method = RequestMethod.POST) |
373 | - public List<Form6> getForm3_4(@RequestBody GetLearnReqVo getLearnReqVo){ | |
534 | + public Form6RepVo getForm3_4(@RequestBody GetLearnReqVo getLearnReqVo){ | |
374 | 535 | return initDimensional(getLearnReqVo,DimensionalEnums.think.getDimensionalType()); |
375 | 536 | } |
376 | 537 | |
377 | - private List<Form6> initDimensional(GetLearnReqVo getLearnReqVo , int dimensionalType){ | |
378 | - List<Form6> list = new ArrayList<>(); | |
538 | + private Form6RepVo initDimensional(GetLearnReqVo getLearnReqVo , int dimensionalType){ | |
539 | + Form6RepVo repVO = new Form6RepVo(); | |
379 | 540 | Analyse analyse = analyseService.selectById(getLearnReqVo.getAnalyseId()); |
380 | - List<Student> allStudents = studentService.selectBySchoolName(analyse.getId(),null); | |
381 | - int allNumber = (int) Math.floor(allStudents.size()*0.27) ; | |
541 | + if(analyse == null){ | |
542 | + repVO.setSuccess(false); | |
543 | + repVO.setMessage("请先创建考试"); | |
544 | + return repVO; | |
545 | + } | |
546 | + List<String> leagues = leagueService.getLeagueBySchoolName(analyse.getId(),getLearnReqVo.getSchoolName()); | |
547 | + if(leagues == null){ | |
548 | + repVO.setSuccess(false); | |
549 | + repVO.setMessage("请先设定区"); | |
550 | + return repVO; | |
551 | + } | |
382 | 552 | List<String> allHighStudent = new ArrayList<>(); |
383 | 553 | List<String> allLowStudent = new ArrayList<>(); |
384 | - for (int i = 0; i < allNumber ; i++) { | |
385 | - allHighStudent.add(allStudents.get(i).getStudentNumber()); | |
554 | + List<Student> allStudents = studentService.selectBySchoolName(analyse.getId(),null,null); | |
555 | + int allNumber = (int) Math.floor(allStudents.size()*0.27) ; | |
556 | + { | |
557 | + //获取区 高分段,低分段学生编号 | |
558 | + for (int i = 0; i < allNumber ; i++) { | |
559 | + allHighStudent.add(allStudents.get(i).getStudentNumber()); | |
560 | + } | |
561 | + for(int i =allStudents.size()-allNumber ; i < allStudents.size() ; i++){ | |
562 | + allLowStudent.add(allStudents.get(i).getStudentNumber()); | |
563 | + } | |
386 | 564 | } |
387 | - for(int i =allStudents.size()-allNumber ; i < allStudents.size() ; i++){ | |
388 | - allLowStudent.add(allStudents.get(i).getStudentNumber()); | |
565 | + List<String> leagueHighStudent = new ArrayList<>(); | |
566 | + List<String> leagueLowStudent = new ArrayList<>(); | |
567 | + List<Student> leagueStudents = studentService.selectBySchoolName(analyse.getId(),leagues,null); | |
568 | + int leagueNumber = (int) Math.floor(leagueStudents.size()*0.27) ; | |
569 | + { | |
570 | + //获取联盟校 高分段 低分段 学生编号 | |
571 | + for (int i = 0; i < leagueNumber ; i++) { | |
572 | + leagueHighStudent.add(leagueStudents.get(i).getStudentNumber()); | |
573 | + } | |
574 | + for(int i =leagueStudents.size()-leagueNumber ; i < leagueStudents.size() ; i++){ | |
575 | + leagueLowStudent.add(leagueStudents.get(i).getStudentNumber()); | |
576 | + } | |
389 | 577 | } |
390 | - List<Student> students = studentService.selectBySchoolName(analyse.getId(),getLearnReqVo.getSchoolName()); | |
391 | - int number = (int) Math.floor(students.size()*0.27) ; | |
392 | 578 | List<String> highStudent = new ArrayList<>(); |
393 | 579 | List<String> lowStudent = new ArrayList<>(); |
394 | - for (int i = 0; i < number ; i++) { | |
395 | - highStudent.add(students.get(i).getStudentNumber()); | |
396 | - } | |
397 | - for(int i =students.size()-number ; i < students.size() ; i++){ | |
398 | - lowStudent.add(students.get(i).getStudentNumber()); | |
580 | + List<Student> students = studentService.selectBySchoolName(analyse.getId(),null,getLearnReqVo.getSchoolName()); | |
581 | + int number = (int) Math.floor(students.size()*0.27) ; | |
582 | + { | |
583 | + //获取本校高分段 低分段 学生编号 | |
584 | + for (int i = 0; i < number ; i++) { | |
585 | + highStudent.add(students.get(i).getStudentNumber()); | |
586 | + } | |
587 | + for(int i =students.size()-number ; i < students.size() ; i++){ | |
588 | + lowStudent.add(students.get(i).getStudentNumber()); | |
589 | + } | |
399 | 590 | } |
591 | + | |
592 | + List<Form6> list = new ArrayList<>(); | |
593 | + | |
400 | 594 | List<Dimensional> knowledgeList = dimensionalService.selectByAnalyse(analyse.getId(),dimensionalType); |
401 | 595 | for(Dimensional dimensional : knowledgeList){ |
402 | 596 | Form6 form6 = new Form6(); |
403 | - form6.setKnowledge(dimensional.getDimensionalName()); | |
597 | + form6.setDimensional(dimensional.getDimensionalName()); | |
404 | 598 | List<AnalyseDimensional> analyseDimensionals = analyseDimensionalService.selectByDimensional(analyse.getId(),dimensional.getId()); |
405 | 599 | Double score = 0d; |
406 | - Double allSumScore = 0d ; | |
407 | - Double schoolSumScore = 0d ; | |
408 | - int allHigh = 0 , allLow = 0 , high = 0 , low = 0 ; | |
600 | + Double allSumScore = 0d , leagueSumScore = 0d , schoolSumScore = 0d ; | |
601 | + int allHigh = 0 , allLow = 0 , leagueHigh = 0 , leagueLow = 0 , high = 0 , low = 0 ; | |
409 | 602 | StringBuffer examNumber = new StringBuffer(); |
410 | 603 | for(AnalyseDimensional analyseDimensional :analyseDimensionals){ |
411 | 604 | score = score + analyseDimensional.getScore() ; |
412 | - allSumScore = allSumScore + studentDetailService.selectSumScore(analyse.getId(),null,analyseDimensional.getQuestionNumber()); | |
413 | - schoolSumScore = schoolSumScore + studentDetailService.selectSumScore(analyse.getId(),getLearnReqVo.getSchoolName(),analyseDimensional.getQuestionNumber()); | |
414 | - allHigh = allHigh + studentDetailService.selectTrueByExamNumber(analyse.getId(),null ,analyseDimensional.getQuestionNumber(),allHighStudent,analyseDimensional.getScore()); | |
415 | - allLow = allLow + studentDetailService.selectTrueByExamNumber(analyse.getId(),null ,analyseDimensional.getQuestionNumber(),allLowStudent,analyseDimensional.getScore()); | |
416 | - high = high + studentDetailService.selectTrueByExamNumber(analyse.getId(),getLearnReqVo.getSchoolName() ,analyseDimensional.getQuestionNumber(),highStudent,analyseDimensional.getScore()); | |
417 | - low = low + studentDetailService.selectTrueByExamNumber(analyse.getId(),getLearnReqVo.getSchoolName() ,analyseDimensional.getQuestionNumber(),lowStudent,analyseDimensional.getScore()); | |
605 | + allSumScore = allSumScore + studentDetailService.selectSumScore(analyse.getId(),null,null,analyseDimensional.getQuestionNumber()); | |
606 | + allHigh = allHigh + studentDetailService.selectTrueByExamNumber(analyse.getId(),null,null ,analyseDimensional.getQuestionNumber(),allHighStudent,analyseDimensional.getScore()); | |
607 | + allLow = allLow + studentDetailService.selectTrueByExamNumber(analyse.getId(),null,null ,analyseDimensional.getQuestionNumber(),allLowStudent,analyseDimensional.getScore()); | |
608 | + | |
609 | + leagueSumScore = leagueSumScore + studentDetailService.selectSumScore(analyse.getId(),leagues,null,analyseDimensional.getQuestionNumber()); | |
610 | + leagueHigh = leagueHigh + studentDetailService.selectTrueByExamNumber(analyse.getId(),leagues,null ,analyseDimensional.getQuestionNumber(),allHighStudent,analyseDimensional.getScore()); | |
611 | + leagueLow = leagueLow + studentDetailService.selectTrueByExamNumber(analyse.getId(),leagues,null ,analyseDimensional.getQuestionNumber(),allLowStudent,analyseDimensional.getScore()); | |
612 | + | |
613 | + schoolSumScore = schoolSumScore + studentDetailService.selectSumScore(analyse.getId(),null,getLearnReqVo.getSchoolName(),analyseDimensional.getQuestionNumber()); | |
614 | + high = high + studentDetailService.selectTrueByExamNumber(analyse.getId(),null,getLearnReqVo.getSchoolName() ,analyseDimensional.getQuestionNumber(),highStudent,analyseDimensional.getScore()); | |
615 | + low = low + studentDetailService.selectTrueByExamNumber(analyse.getId(),null,getLearnReqVo.getSchoolName() ,analyseDimensional.getQuestionNumber(),lowStudent,analyseDimensional.getScore()); | |
418 | 616 | examNumber.append(analyseDimensional.getQuestionNumber()).append(","); |
419 | 617 | } |
420 | 618 | form6.setScore(score); |
421 | 619 | form6.setAllRate(allSumScore / new Double(allStudents.size()) / score ); |
422 | - form6.setAllAvg(allSumScore / new Double(allStudents.size())); | |
620 | + form6.setLeagueRate(leagueSumScore / new Double(leagueStudents.size()) / score ); | |
423 | 621 | form6.setSchoolRate(schoolSumScore / new Double(students.size()) / score); |
622 | + | |
623 | + form6.setAllAvg(allSumScore / new Double(allStudents.size())); | |
624 | + form6.setLeagueAvg(leagueSumScore / new Double(leagueStudents.size())); | |
424 | 625 | form6.setSchoolAvg(schoolSumScore / new Double(students.size())); |
626 | + | |
425 | 627 | form6.setAllDist(new Double(allHigh-allLow) / new Double(allNumber * analyseDimensionals.size())); |
628 | + form6.setLeagueDist(new Double(leagueHigh-leagueLow) / new Double(leagueNumber * analyseDimensionals.size())); | |
426 | 629 | form6.setSchoolDist(new Double(high-low) / new Double(number * analyseDimensionals.size())); |
427 | 630 | form6.setExamNumber(examNumber.toString().substring(0,examNumber.toString().length()-1)); |
428 | 631 | list.add(form6); |
429 | 632 | } |
430 | - return list; | |
633 | + repVO.setData(list); | |
634 | + return repVO; | |
431 | 635 | } |
432 | 636 | |
433 | 637 | } | ... | ... |
... | ... | @@ -0,0 +1,17 @@ |
1 | +package com.jevon.mapper; | |
2 | + | |
3 | +import com.jevon.model.League; | |
4 | + | |
5 | +import java.util.List; | |
6 | + | |
7 | +/** | |
8 | + * @author chen | |
9 | + * @version 1.0 | |
10 | + * @date 2019/10/22 0022 8:59 | |
11 | + */ | |
12 | +public interface LeagueMapper { | |
13 | + | |
14 | + int insertBatch(List<League> list); | |
15 | + | |
16 | + List<League> selectByLeague(League league); | |
17 | +} | ... | ... |
src/main/java/com/jevon/mapper/StudentMapper.java
... | ... | @@ -19,6 +19,8 @@ public interface StudentMapper { |
19 | 19 | |
20 | 20 | List<String> selectClassNameBySchool(Student student); |
21 | 21 | |
22 | + List<String> selectSchoolNameByAnalyse(int analyseId); | |
23 | + | |
22 | 24 | //最高分 |
23 | 25 | Double selectMaxScore(Student student); |
24 | 26 | //最低分 |
... | ... | @@ -26,7 +28,7 @@ public interface StudentMapper { |
26 | 28 | //平均分 |
27 | 29 | Double selectAvgScore(Student student); |
28 | 30 | //众数 |
29 | - Double selectModeNumber(Student student); | |
31 | + List<Double> selectModeNumber(Student student); | |
30 | 32 | //中位数 |
31 | 33 | Double selectMedian(Student student); |
32 | 34 | //标准差 | ... | ... |
... | ... | @@ -0,0 +1,46 @@ |
1 | +package com.jevon.model; | |
2 | + | |
3 | +/** | |
4 | + * @author chen | |
5 | + * @version 1.0 | |
6 | + * @date 2019/10/22 0022 8:59 | |
7 | + */ | |
8 | +public class League { | |
9 | + | |
10 | + private int id ; | |
11 | + private int analyseId ; | |
12 | + private String league ; | |
13 | + private String schoolName ; | |
14 | + | |
15 | + public int getId() { | |
16 | + return id; | |
17 | + } | |
18 | + | |
19 | + public void setId(int id) { | |
20 | + this.id = id; | |
21 | + } | |
22 | + | |
23 | + public int getAnalyseId() { | |
24 | + return analyseId; | |
25 | + } | |
26 | + | |
27 | + public void setAnalyseId(int analyseId) { | |
28 | + this.analyseId = analyseId; | |
29 | + } | |
30 | + | |
31 | + public String getLeague() { | |
32 | + return league; | |
33 | + } | |
34 | + | |
35 | + public void setLeague(String league) { | |
36 | + this.league = league; | |
37 | + } | |
38 | + | |
39 | + public String getSchoolName() { | |
40 | + return schoolName; | |
41 | + } | |
42 | + | |
43 | + public void setSchoolName(String schoolName) { | |
44 | + this.schoolName = schoolName; | |
45 | + } | |
46 | +} | ... | ... |
src/main/java/com/jevon/model/Student.java
... | ... | @@ -3,6 +3,7 @@ package com.jevon.model; |
3 | 3 | import com.jevon.vo.excel.ScoreExcelVo; |
4 | 4 | |
5 | 5 | import java.util.Date; |
6 | +import java.util.List; | |
6 | 7 | |
7 | 8 | /** |
8 | 9 | * @author chen |
... | ... | @@ -23,6 +24,7 @@ public class Student { |
23 | 24 | |
24 | 25 | private double begin ; |
25 | 26 | private double end ; |
27 | + private List<String> schoolNames ; | |
26 | 28 | |
27 | 29 | public Student(ScoreExcelVo scoreExcelVo) { |
28 | 30 | this.schoolName = scoreExcelVo.getSchoolName(); |
... | ... | @@ -122,4 +124,12 @@ public class Student { |
122 | 124 | public void setEnd(double end) { |
123 | 125 | this.end = end; |
124 | 126 | } |
127 | + | |
128 | + public List<String> getSchoolNames() { | |
129 | + return schoolNames; | |
130 | + } | |
131 | + | |
132 | + public void setSchoolNames(List<String> schoolNames) { | |
133 | + this.schoolNames = schoolNames; | |
134 | + } | |
125 | 135 | } | ... | ... |
src/main/java/com/jevon/model/StudentDetail.java
... | ... | @@ -12,7 +12,7 @@ import java.util.List; |
12 | 12 | */ |
13 | 13 | public class StudentDetail { |
14 | 14 | |
15 | - private int id ; | |
15 | + private long id ; | |
16 | 16 | private int openId; |
17 | 17 | private String schoolName ; |
18 | 18 | private String className ; |
... | ... | @@ -25,6 +25,7 @@ public class StudentDetail { |
25 | 25 | |
26 | 26 | //查询用 高分段 低分段学生考号 |
27 | 27 | private List<String> studentNumbers ; |
28 | + private List<String> schoolNames ; | |
28 | 29 | |
29 | 30 | public StudentDetail(ScoreExcelVo scoreExcelVo) { |
30 | 31 | this.schoolName = scoreExcelVo.getSchoolName(); |
... | ... | @@ -36,11 +37,11 @@ public class StudentDetail { |
36 | 37 | public StudentDetail() { |
37 | 38 | } |
38 | 39 | |
39 | - public int getId() { | |
40 | + public long getId() { | |
40 | 41 | return id; |
41 | 42 | } |
42 | 43 | |
43 | - public void setId(int id) { | |
44 | + public void setId(long id) { | |
44 | 45 | this.id = id; |
45 | 46 | } |
46 | 47 | |
... | ... | @@ -123,4 +124,12 @@ public class StudentDetail { |
123 | 124 | public void setStudentNumbers(List<String> studentNumbers) { |
124 | 125 | this.studentNumbers = studentNumbers; |
125 | 126 | } |
127 | + | |
128 | + public List<String> getSchoolNames() { | |
129 | + return schoolNames; | |
130 | + } | |
131 | + | |
132 | + public void setSchoolNames(List<String> schoolNames) { | |
133 | + this.schoolNames = schoolNames; | |
134 | + } | |
126 | 135 | } | ... | ... |
... | ... | @@ -0,0 +1,20 @@ |
1 | +package com.jevon.service; | |
2 | + | |
3 | +import com.jevon.model.League; | |
4 | + | |
5 | +import java.util.List; | |
6 | + | |
7 | +/** | |
8 | + * @author chen | |
9 | + * @version 1.0 | |
10 | + * @date 2019/10/22 0022 9:08 | |
11 | + */ | |
12 | +public interface LeagueService { | |
13 | + | |
14 | + int insertBatch(List<League> list); | |
15 | + | |
16 | + List<League> selectByAnalyseId(int analyseId); | |
17 | + | |
18 | + List<String> getLeagueBySchoolName(int analyseId , String schoolName); | |
19 | + | |
20 | +} | ... | ... |
src/main/java/com/jevon/service/StudentDetailService.java
... | ... | @@ -13,7 +13,7 @@ public interface StudentDetailService { |
13 | 13 | |
14 | 14 | int insertBatch(List<StudentDetail> list); |
15 | 15 | |
16 | - Double selectSumScore(int analyseId , String schoolName , String examNumber); | |
16 | + Double selectSumScore(int analyseId, List<String> league , String schoolName, String examNumber); | |
17 | 17 | |
18 | - int selectTrueByExamNumber(int analyseId , String schoolName , String examNumber , List<String> studentNumbers ,Double score); | |
18 | + int selectTrueByExamNumber(int analyseId , List<String> league , String schoolName , String examNumber , List<String> studentNumbers ,Double score); | |
19 | 19 | } | ... | ... |
src/main/java/com/jevon/service/StudentService.java
... | ... | @@ -13,25 +13,27 @@ public interface StudentService { |
13 | 13 | |
14 | 14 | int insertBatch(List<Student> list); |
15 | 15 | |
16 | - List<Student> selectBySchoolName(int analyseId , String schoolName); | |
16 | + public List<Student> selectBySchoolName(int analyseId,List<String> league , String schoolName); | |
17 | 17 | |
18 | 18 | List<Student> selectByClassName(int analyseId , String schoolName ,String className); |
19 | 19 | |
20 | - int selectCountByScore(int analyseId , String schoolName , double begin , double end); | |
20 | + public int selectCountByScore(int analyseId, List<String> league , String schoolName, double begin, double end); | |
21 | 21 | |
22 | 22 | int selectCountBySchoolScore(int analyseId , String schoolName ,String className , double begin , double end); |
23 | 23 | |
24 | 24 | List<String> selectClassNameBySchool(int analyseId , String schoolName); |
25 | 25 | |
26 | - Double selectMaxScore(int analyseId , String schoolName); | |
26 | + List<String> selectSchoolNameByAnalyse(int analyseId); | |
27 | 27 | |
28 | - Double selectMinScore(int analyseId , String schoolName); | |
28 | + Double selectMaxScore(int analyseId, List<String> league ,String schoolName); | |
29 | 29 | |
30 | - Double selectAvgScore(int analyseId , String schoolName); | |
30 | + Double selectMinScore(int analyseId, List<String> league ,String schoolName); | |
31 | + | |
32 | + Double selectAvgScore(int analyseId, List<String> league ,String schoolName); | |
31 | 33 | //众数 |
32 | - Double selectModeNumber(int analyseId , String schoolName); | |
34 | + Double selectModeNumber(int analyseId,List<String> league , String schoolName); | |
33 | 35 | //中位数 |
34 | - Double selectMedian(int analyseId , String schoolName); | |
36 | + Double selectMedian(int analyseId,List<String> league , String schoolName); | |
35 | 37 | //标准差 |
36 | - Double selectStdev(int analyseId , String schoolName); | |
38 | + Double selectStdev(int analyseId,List<String> league , String schoolName); | |
37 | 39 | } | ... | ... |
src/main/java/com/jevon/service/impl/LeagueServiceImpl.java
0 → 100644
... | ... | @@ -0,0 +1,54 @@ |
1 | +package com.jevon.service.impl; | |
2 | + | |
3 | +import com.jevon.mapper.LeagueMapper; | |
4 | +import com.jevon.model.League; | |
5 | +import com.jevon.service.LeagueService; | |
6 | +import org.springframework.beans.factory.annotation.Autowired; | |
7 | +import org.springframework.stereotype.Service; | |
8 | + | |
9 | +import java.util.ArrayList; | |
10 | +import java.util.List; | |
11 | + | |
12 | +/** | |
13 | + * @author chen | |
14 | + * @version 1.0 | |
15 | + * @date 2019/10/22 0022 9:09 | |
16 | + */ | |
17 | +@Service | |
18 | +public class LeagueServiceImpl implements LeagueService { | |
19 | + | |
20 | + @Autowired | |
21 | + LeagueMapper leagueMapper; | |
22 | + | |
23 | + @Override | |
24 | + public int insertBatch(List<League> list) { | |
25 | + return leagueMapper.insertBatch(list); | |
26 | + } | |
27 | + | |
28 | + @Override | |
29 | + public List<League> selectByAnalyseId(int analyseId) { | |
30 | + League league = new League(); | |
31 | + league.setAnalyseId(analyseId); | |
32 | + return leagueMapper.selectByLeague(league); | |
33 | + } | |
34 | + | |
35 | + @Override | |
36 | + public List<String> getLeagueBySchoolName(int analyseId, String schoolName) { | |
37 | + League league = new League(); | |
38 | + league.setAnalyseId(analyseId); | |
39 | + league.setSchoolName(schoolName); | |
40 | + List<League> leagues = leagueMapper.selectByLeague(league); | |
41 | + if(leagues != null && leagues.size() > 0){ | |
42 | + League search = new League(); | |
43 | + search.setAnalyseId(analyseId); | |
44 | + search.setLeague(leagues.get(0).getLeague()); | |
45 | + List<League> result = leagueMapper.selectByLeague(search); | |
46 | + List<String> leagueSchoolName = new ArrayList<>(); | |
47 | + for(League league1 : result){ | |
48 | + leagueSchoolName.add(league1.getSchoolName()); | |
49 | + } | |
50 | + return leagueSchoolName ; | |
51 | + } | |
52 | + return null; | |
53 | + } | |
54 | +} | ... | ... |
src/main/java/com/jevon/service/impl/StudentDetailServiceImpl.java
... | ... | @@ -37,22 +37,24 @@ public class StudentDetailServiceImpl implements StudentDetailService { |
37 | 37 | } |
38 | 38 | |
39 | 39 | @Override |
40 | - public Double selectSumScore(int analyseId, String schoolName, String examNumber) { | |
40 | + public Double selectSumScore(int analyseId, List<String> league , String schoolName, String examNumber) { | |
41 | 41 | StudentDetail studentDetail = new StudentDetail(); |
42 | 42 | studentDetail.setAnalyseId(analyseId); |
43 | 43 | studentDetail.setSchoolName(schoolName); |
44 | 44 | studentDetail.setExamNumber(examNumber); |
45 | + studentDetail.setSchoolNames(league); | |
45 | 46 | return studentDetailMapper.selectSumScore(studentDetail); |
46 | 47 | } |
47 | 48 | |
48 | 49 | @Override |
49 | - public int selectTrueByExamNumber(int analyseId, String schoolName, String examNumber, List<String> studentNumbers , Double score) { | |
50 | + public int selectTrueByExamNumber(int analyseId,List<String> league , String schoolName, String examNumber, List<String> studentNumbers , Double score) { | |
50 | 51 | StudentDetail studentDetail = new StudentDetail(); |
51 | 52 | studentDetail.setAnalyseId(analyseId); |
52 | 53 | studentDetail.setSchoolName(schoolName); |
53 | 54 | studentDetail.setExamNumber(examNumber); |
54 | 55 | studentDetail.setScore(score); |
55 | 56 | studentDetail.setStudentNumbers(studentNumbers); |
57 | + studentDetail.setSchoolNames(league); | |
56 | 58 | return studentDetailMapper.selectTrueByExamNumber(studentDetail); |
57 | 59 | } |
58 | 60 | } | ... | ... |
src/main/java/com/jevon/service/impl/StudentServiceImpl.java
... | ... | @@ -37,10 +37,11 @@ public class StudentServiceImpl implements StudentService { |
37 | 37 | } |
38 | 38 | |
39 | 39 | @Override |
40 | - public List<Student> selectBySchoolName(int analyseId, String schoolName) { | |
40 | + public List<Student> selectBySchoolName(int analyseId , List<String> league , String schoolName) { | |
41 | 41 | Student student = new Student(); |
42 | 42 | student.setAnalyseId(analyseId); |
43 | 43 | student.setSchoolName(schoolName); |
44 | + student.setSchoolNames(league); | |
44 | 45 | return studentMapper.selectByStudent(student); |
45 | 46 | } |
46 | 47 | |
... | ... | @@ -54,12 +55,13 @@ public class StudentServiceImpl implements StudentService { |
54 | 55 | } |
55 | 56 | |
56 | 57 | @Override |
57 | - public int selectCountByScore(int analyseId, String schoolName, double begin, double end) { | |
58 | + public int selectCountByScore(int analyseId, List<String> league , String schoolName, double begin, double end) { | |
58 | 59 | Student student = new Student(); |
59 | 60 | student.setAnalyseId(analyseId); |
60 | 61 | student.setSchoolName(schoolName); |
61 | 62 | student.setBegin(begin); |
62 | 63 | student.setEnd(end); |
64 | + student.setSchoolNames(league); | |
63 | 65 | return studentMapper.selectCountByScore(student); |
64 | 66 | } |
65 | 67 | |
... | ... | @@ -82,50 +84,66 @@ public class StudentServiceImpl implements StudentService { |
82 | 84 | } |
83 | 85 | |
84 | 86 | @Override |
85 | - public Double selectMaxScore(int analyseId, String schoolName) { | |
87 | + public List<String> selectSchoolNameByAnalyse(int analyseId) { | |
88 | + return studentMapper.selectSchoolNameByAnalyse(analyseId); | |
89 | + } | |
90 | + | |
91 | + @Override | |
92 | + public Double selectMaxScore(int analyseId,List<String> league , String schoolName) { | |
86 | 93 | Student student = new Student(); |
87 | 94 | student.setAnalyseId(analyseId); |
88 | 95 | student.setSchoolName(schoolName); |
96 | + student.setSchoolNames(league); | |
89 | 97 | return studentMapper.selectMaxScore(student); |
90 | 98 | } |
91 | 99 | |
92 | 100 | @Override |
93 | - public Double selectMinScore(int analyseId, String schoolName) { | |
101 | + public Double selectMinScore(int analyseId, List<String> league ,String schoolName) { | |
94 | 102 | Student student = new Student(); |
95 | 103 | student.setAnalyseId(analyseId); |
96 | 104 | student.setSchoolName(schoolName); |
105 | + student.setSchoolNames(league); | |
97 | 106 | return studentMapper.selectMinScore(student); |
98 | 107 | } |
99 | 108 | |
100 | 109 | @Override |
101 | - public Double selectAvgScore(int analyseId, String schoolName) { | |
110 | + public Double selectAvgScore(int analyseId,List<String> league , String schoolName) { | |
102 | 111 | Student student = new Student(); |
103 | 112 | student.setAnalyseId(analyseId); |
104 | 113 | student.setSchoolName(schoolName); |
114 | + student.setSchoolNames(league); | |
105 | 115 | return studentMapper.selectAvgScore(student); |
106 | 116 | } |
107 | 117 | |
108 | 118 | @Override |
109 | - public Double selectModeNumber(int analyseId, String schoolName) { | |
119 | + public Double selectModeNumber(int analyseId,List<String> league , String schoolName) { | |
110 | 120 | Student student = new Student(); |
111 | 121 | student.setAnalyseId(analyseId); |
112 | 122 | student.setSchoolName(schoolName); |
113 | - return studentMapper.selectModeNumber(student); | |
123 | + student.setSchoolNames(league); | |
124 | + List<Double> list = studentMapper.selectModeNumber(student); | |
125 | + if(list.size() > 1){ | |
126 | + return null ; | |
127 | + }else { | |
128 | + return list.get(0); | |
129 | + } | |
114 | 130 | } |
115 | 131 | |
116 | 132 | @Override |
117 | - public Double selectMedian(int analyseId, String schoolName) { | |
133 | + public Double selectMedian(int analyseId,List<String> league , String schoolName) { | |
118 | 134 | Student student = new Student(); |
119 | 135 | student.setAnalyseId(analyseId); |
120 | 136 | student.setSchoolName(schoolName); |
137 | + student.setSchoolNames(league); | |
121 | 138 | return studentMapper.selectMedian(student); |
122 | 139 | } |
123 | 140 | |
124 | 141 | @Override |
125 | - public Double selectStdev(int analyseId, String schoolName) { | |
142 | + public Double selectStdev(int analyseId,List<String> league , String schoolName) { | |
126 | 143 | Student student = new Student(); |
127 | 144 | student.setAnalyseId(analyseId); |
128 | 145 | student.setSchoolName(schoolName); |
146 | + student.setSchoolNames(league); | |
129 | 147 | return studentMapper.selectStdev(student); |
130 | 148 | } |
131 | 149 | } | ... | ... |
... | ... | @@ -0,0 +1,30 @@ |
1 | +package com.jevon.vo.req; | |
2 | + | |
3 | +import java.util.List; | |
4 | + | |
5 | +/** | |
6 | + * @author chen | |
7 | + * @version 1.0 | |
8 | + * @date 2019/10/22 0022 9:28 | |
9 | + */ | |
10 | +public class InitLeague { | |
11 | + | |
12 | + private String league ; | |
13 | + private List<String> schoolNames ; | |
14 | + | |
15 | + public String getLeague() { | |
16 | + return league; | |
17 | + } | |
18 | + | |
19 | + public void setLeague(String league) { | |
20 | + this.league = league; | |
21 | + } | |
22 | + | |
23 | + public List<String> getSchoolNames() { | |
24 | + return schoolNames; | |
25 | + } | |
26 | + | |
27 | + public void setSchoolNames(List<String> schoolNames) { | |
28 | + this.schoolNames = schoolNames; | |
29 | + } | |
30 | +} | ... | ... |
... | ... | @@ -0,0 +1,30 @@ |
1 | +package com.jevon.vo.req; | |
2 | + | |
3 | +import java.util.List; | |
4 | + | |
5 | +/** | |
6 | + * @author chen | |
7 | + * @version 1.0 | |
8 | + * @date 2019/10/22 0022 9:30 | |
9 | + */ | |
10 | +public class InitLeagueReqVo { | |
11 | + | |
12 | + private int analyseId ; | |
13 | + private List<InitLeague> data ; | |
14 | + | |
15 | + public int getAnalyseId() { | |
16 | + return analyseId; | |
17 | + } | |
18 | + | |
19 | + public void setAnalyseId(int analyseId) { | |
20 | + this.analyseId = analyseId; | |
21 | + } | |
22 | + | |
23 | + public List<InitLeague> getData() { | |
24 | + return data; | |
25 | + } | |
26 | + | |
27 | + public void setData(List<InitLeague> data) { | |
28 | + this.data = data; | |
29 | + } | |
30 | +} | ... | ... |
... | ... | @@ -0,0 +1,37 @@ |
1 | +package com.jevon.wordDTO; | |
2 | + | |
3 | +/** | |
4 | + * @author chen | |
5 | + * @version 1.0 | |
6 | + * @date 2019/10/18 0018 15:37 | |
7 | + */ | |
8 | +public class Form1 { | |
9 | + | |
10 | + private String level ; | |
11 | + private int number ; | |
12 | + private double prop ; | |
13 | + | |
14 | + public String getLevel() { | |
15 | + return level; | |
16 | + } | |
17 | + | |
18 | + public void setLevel(String level) { | |
19 | + this.level = level; | |
20 | + } | |
21 | + | |
22 | + public int getNumber() { | |
23 | + return number; | |
24 | + } | |
25 | + | |
26 | + public void setNumber(int number) { | |
27 | + this.number = number; | |
28 | + } | |
29 | + | |
30 | + public double getProp() { | |
31 | + return prop; | |
32 | + } | |
33 | + | |
34 | + public void setProp(double prop) { | |
35 | + this.prop = prop; | |
36 | + } | |
37 | +} | ... | ... |
... | ... | @@ -0,0 +1,31 @@ |
1 | +package com.jevon.wordDTO; | |
2 | + | |
3 | +import java.util.List; | |
4 | +import java.util.Map; | |
5 | + | |
6 | +/** | |
7 | + * @author chen | |
8 | + * @version 1.0 | |
9 | + * @date 2019/10/18 0018 15:46 | |
10 | + */ | |
11 | +public class Form1RepVO { | |
12 | + | |
13 | + private Map<String ,String> map ; | |
14 | + private List<Form1> list ; | |
15 | + | |
16 | + public Map<String, String> getMap() { | |
17 | + return map; | |
18 | + } | |
19 | + | |
20 | + public void setMap(Map<String, String> map) { | |
21 | + this.map = map; | |
22 | + } | |
23 | + | |
24 | + public List<Form1> getList() { | |
25 | + return list; | |
26 | + } | |
27 | + | |
28 | + public void setList(List<Form1> list) { | |
29 | + this.list = list; | |
30 | + } | |
31 | +} | ... | ... |
... | ... | @@ -0,0 +1,73 @@ |
1 | +package com.jevon.wordDTO; | |
2 | + | |
3 | +/** | |
4 | + * @author chen | |
5 | + * @version 1.0 | |
6 | + * @date 2019/10/18 0018 16:10 | |
7 | + */ | |
8 | +public class Form2 { | |
9 | + | |
10 | + private String name ; | |
11 | + private int studentNumber ; | |
12 | + private double studentProp ; | |
13 | + private int highNumber ; | |
14 | + private double highProp ; | |
15 | + private int lowNumber ; | |
16 | + private double lowProp ; | |
17 | + | |
18 | + public String getName() { | |
19 | + return name; | |
20 | + } | |
21 | + | |
22 | + public void setName(String name) { | |
23 | + this.name = name; | |
24 | + } | |
25 | + | |
26 | + public int getStudentNumber() { | |
27 | + return studentNumber; | |
28 | + } | |
29 | + | |
30 | + public void setStudentNumber(int studentNumber) { | |
31 | + this.studentNumber = studentNumber; | |
32 | + } | |
33 | + | |
34 | + public int getHighNumber() { | |
35 | + return highNumber; | |
36 | + } | |
37 | + | |
38 | + public void setHighNumber(int highNumber) { | |
39 | + this.highNumber = highNumber; | |
40 | + } | |
41 | + | |
42 | + public double getHighProp() { | |
43 | + return highProp; | |
44 | + } | |
45 | + | |
46 | + public void setHighProp(double highProp) { | |
47 | + this.highProp = highProp; | |
48 | + } | |
49 | + | |
50 | + public int getLowNumber() { | |
51 | + return lowNumber; | |
52 | + } | |
53 | + | |
54 | + public void setLowNumber(int lowNumber) { | |
55 | + this.lowNumber = lowNumber; | |
56 | + } | |
57 | + | |
58 | + public double getLowProp() { | |
59 | + return lowProp; | |
60 | + } | |
61 | + | |
62 | + public void setLowProp(double lowProp) { | |
63 | + this.lowProp = lowProp; | |
64 | + } | |
65 | + | |
66 | + public double getStudentProp() { | |
67 | + return studentProp; | |
68 | + } | |
69 | + | |
70 | + public void setStudentProp(double studentProp) { | |
71 | + this.studentProp = studentProp; | |
72 | + } | |
73 | +} | ... | ... |
... | ... | @@ -0,0 +1,23 @@ |
1 | +package com.jevon.wordDTO; | |
2 | + | |
3 | +import com.jevon.vo.BaseVo; | |
4 | + | |
5 | +import java.util.List; | |
6 | + | |
7 | +/** | |
8 | + * @author chen | |
9 | + * @version 1.0 | |
10 | + * @date 2019/10/22 0022 9:51 | |
11 | + */ | |
12 | +public class Form2RepVO extends BaseVo { | |
13 | + | |
14 | + private List<Form2> data ; | |
15 | + | |
16 | + public List<Form2> getData() { | |
17 | + return data; | |
18 | + } | |
19 | + | |
20 | + public void setData(List<Form2> data) { | |
21 | + this.data = data; | |
22 | + } | |
23 | +} | ... | ... |
... | ... | @@ -0,0 +1,82 @@ |
1 | +package com.jevon.wordDTO; | |
2 | + | |
3 | +/** | |
4 | + * @author chen | |
5 | + * @version 1.0 | |
6 | + * @date 2019/10/21 0021 9:03 | |
7 | + */ | |
8 | +public class Form3 { | |
9 | + | |
10 | + private String name ; | |
11 | + private Double maxScore ; | |
12 | + private Double average ; | |
13 | + private Double minScore ; | |
14 | + private Double apercent ; | |
15 | + private Double bpercent ; | |
16 | + private Double cpercent ; | |
17 | + private Double dpercent ; | |
18 | + | |
19 | + public String getName() { | |
20 | + return name; | |
21 | + } | |
22 | + | |
23 | + public void setName(String name) { | |
24 | + this.name = name; | |
25 | + } | |
26 | + | |
27 | + public Double getMaxScore() { | |
28 | + return maxScore; | |
29 | + } | |
30 | + | |
31 | + public void setMaxScore(Double maxScore) { | |
32 | + this.maxScore = maxScore; | |
33 | + } | |
34 | + | |
35 | + public Double getAverage() { | |
36 | + return average; | |
37 | + } | |
38 | + | |
39 | + public void setAverage(Double average) { | |
40 | + this.average = average; | |
41 | + } | |
42 | + | |
43 | + public Double getMinScore() { | |
44 | + return minScore; | |
45 | + } | |
46 | + | |
47 | + public void setMinScore(Double minScore) { | |
48 | + this.minScore = minScore; | |
49 | + } | |
50 | + | |
51 | + public Double getApercent() { | |
52 | + return apercent; | |
53 | + } | |
54 | + | |
55 | + public void setApercent(Double apercent) { | |
56 | + this.apercent = apercent; | |
57 | + } | |
58 | + | |
59 | + public Double getBpercent() { | |
60 | + return bpercent; | |
61 | + } | |
62 | + | |
63 | + public void setBpercent(Double bpercent) { | |
64 | + this.bpercent = bpercent; | |
65 | + } | |
66 | + | |
67 | + public Double getCpercent() { | |
68 | + return cpercent; | |
69 | + } | |
70 | + | |
71 | + public void setCpercent(Double cpercent) { | |
72 | + this.cpercent = cpercent; | |
73 | + } | |
74 | + | |
75 | + public Double getDpercent() { | |
76 | + return dpercent; | |
77 | + } | |
78 | + | |
79 | + public void setDpercent(Double dpercent) { | |
80 | + this.dpercent = dpercent; | |
81 | + } | |
82 | +} | ... | ... |
... | ... | @@ -0,0 +1,23 @@ |
1 | +package com.jevon.wordDTO; | |
2 | + | |
3 | +import com.jevon.vo.BaseVo; | |
4 | + | |
5 | +import java.util.List; | |
6 | + | |
7 | +/** | |
8 | + * @author chen | |
9 | + * @version 1.0 | |
10 | + * @date 2019/10/22 0022 10:14 | |
11 | + */ | |
12 | +public class Form3RepVO extends BaseVo { | |
13 | + | |
14 | + private List<Form3> data ; | |
15 | + | |
16 | + public List<Form3> getData() { | |
17 | + return data; | |
18 | + } | |
19 | + | |
20 | + public void setData(List<Form3> data) { | |
21 | + this.data = data; | |
22 | + } | |
23 | +} | ... | ... |
... | ... | @@ -0,0 +1,55 @@ |
1 | +package com.jevon.wordDTO; | |
2 | + | |
3 | +/** | |
4 | + * @author chen | |
5 | + * @version 1.0 | |
6 | + * @date 2019/10/21 0021 9:51 | |
7 | + */ | |
8 | +public class Form4 { | |
9 | + | |
10 | + private String name ; | |
11 | + private Double modeNumber ; | |
12 | + private Double medianNumber ; | |
13 | + private Double stdev ; | |
14 | + private Double avgNumber ; | |
15 | + | |
16 | + public String getName() { | |
17 | + return name; | |
18 | + } | |
19 | + | |
20 | + public void setName(String name) { | |
21 | + this.name = name; | |
22 | + } | |
23 | + | |
24 | + public Double getModeNumber() { | |
25 | + return modeNumber; | |
26 | + } | |
27 | + | |
28 | + public void setModeNumber(Double modeNumber) { | |
29 | + this.modeNumber = modeNumber; | |
30 | + } | |
31 | + | |
32 | + public Double getMedianNumber() { | |
33 | + return medianNumber; | |
34 | + } | |
35 | + | |
36 | + public void setMedianNumber(Double medianNumber) { | |
37 | + this.medianNumber = medianNumber; | |
38 | + } | |
39 | + | |
40 | + public Double getStdev() { | |
41 | + return stdev; | |
42 | + } | |
43 | + | |
44 | + public void setStdev(Double stdev) { | |
45 | + this.stdev = stdev; | |
46 | + } | |
47 | + | |
48 | + public Double getAvgNumber() { | |
49 | + return avgNumber; | |
50 | + } | |
51 | + | |
52 | + public void setAvgNumber(Double avgNumber) { | |
53 | + this.avgNumber = avgNumber; | |
54 | + } | |
55 | +} | ... | ... |
... | ... | @@ -0,0 +1,23 @@ |
1 | +package com.jevon.wordDTO; | |
2 | + | |
3 | +import com.jevon.vo.BaseVo; | |
4 | + | |
5 | +import java.util.List; | |
6 | + | |
7 | +/** | |
8 | + * @author chen | |
9 | + * @version 1.0 | |
10 | + * @date 2019/10/22 0022 10:23 | |
11 | + */ | |
12 | +public class Form4RepVO extends BaseVo { | |
13 | + | |
14 | + private List<Form4> data ; | |
15 | + | |
16 | + public List<Form4> getData() { | |
17 | + return data; | |
18 | + } | |
19 | + | |
20 | + public void setData(List<Form4> data) { | |
21 | + this.data = data; | |
22 | + } | |
23 | +} | ... | ... |
... | ... | @@ -0,0 +1,118 @@ |
1 | +package com.jevon.wordDTO; | |
2 | + | |
3 | +/** | |
4 | + * @author chen | |
5 | + * @version 1.0 | |
6 | + * @date 2019/10/21 0021 9:59 | |
7 | + */ | |
8 | +public class Form5 { | |
9 | + | |
10 | + private String examNumber ; | |
11 | + private String difficultName ; | |
12 | + private Double score ; | |
13 | + private Double allRate ; | |
14 | + private Double leagueRate ; | |
15 | + private Double schoolRate ; | |
16 | + private Double allAvg ; | |
17 | + private Double leagueAvg ; | |
18 | + private Double schoolAvg ; | |
19 | + private Double allDist ; | |
20 | + private Double leagueDist ; | |
21 | + private Double schoolDist ; | |
22 | + | |
23 | + public String getExamNumber() { | |
24 | + return examNumber; | |
25 | + } | |
26 | + | |
27 | + public void setExamNumber(String examNumber) { | |
28 | + this.examNumber = examNumber; | |
29 | + } | |
30 | + | |
31 | + public Double getScore() { | |
32 | + return score; | |
33 | + } | |
34 | + | |
35 | + public void setScore(Double score) { | |
36 | + this.score = score; | |
37 | + } | |
38 | + | |
39 | + public Double getAllRate() { | |
40 | + return allRate; | |
41 | + } | |
42 | + | |
43 | + public void setAllRate(Double allRate) { | |
44 | + this.allRate = allRate; | |
45 | + } | |
46 | + | |
47 | + public Double getSchoolRate() { | |
48 | + return schoolRate; | |
49 | + } | |
50 | + | |
51 | + public void setSchoolRate(Double schoolRate) { | |
52 | + this.schoolRate = schoolRate; | |
53 | + } | |
54 | + | |
55 | + public Double getAllAvg() { | |
56 | + return allAvg; | |
57 | + } | |
58 | + | |
59 | + public void setAllAvg(Double allAvg) { | |
60 | + this.allAvg = allAvg; | |
61 | + } | |
62 | + | |
63 | + public Double getSchoolAvg() { | |
64 | + return schoolAvg; | |
65 | + } | |
66 | + | |
67 | + public void setSchoolAvg(Double schoolAvg) { | |
68 | + this.schoolAvg = schoolAvg; | |
69 | + } | |
70 | + | |
71 | + public Double getAllDist() { | |
72 | + return allDist; | |
73 | + } | |
74 | + | |
75 | + public void setAllDist(Double allDist) { | |
76 | + this.allDist = allDist; | |
77 | + } | |
78 | + | |
79 | + public Double getSchoolDist() { | |
80 | + return schoolDist; | |
81 | + } | |
82 | + | |
83 | + public void setSchoolDist(Double schoolDist) { | |
84 | + this.schoolDist = schoolDist; | |
85 | + } | |
86 | + | |
87 | + public String getDifficultName() { | |
88 | + return difficultName; | |
89 | + } | |
90 | + | |
91 | + public void setDifficultName(String difficultName) { | |
92 | + this.difficultName = difficultName; | |
93 | + } | |
94 | + | |
95 | + public Double getLeagueRate() { | |
96 | + return leagueRate; | |
97 | + } | |
98 | + | |
99 | + public void setLeagueRate(Double leagueRate) { | |
100 | + this.leagueRate = leagueRate; | |
101 | + } | |
102 | + | |
103 | + public Double getLeagueAvg() { | |
104 | + return leagueAvg; | |
105 | + } | |
106 | + | |
107 | + public void setLeagueAvg(Double leagueAvg) { | |
108 | + this.leagueAvg = leagueAvg; | |
109 | + } | |
110 | + | |
111 | + public Double getLeagueDist() { | |
112 | + return leagueDist; | |
113 | + } | |
114 | + | |
115 | + public void setLeagueDist(Double leagueDist) { | |
116 | + this.leagueDist = leagueDist; | |
117 | + } | |
118 | +} | ... | ... |
... | ... | @@ -0,0 +1,23 @@ |
1 | +package com.jevon.wordDTO; | |
2 | + | |
3 | +import com.jevon.vo.BaseVo; | |
4 | + | |
5 | +import java.util.List; | |
6 | + | |
7 | +/** | |
8 | + * @author chen | |
9 | + * @version 1.0 | |
10 | + * @date 2019/10/22 0022 10:28 | |
11 | + */ | |
12 | +public class Form5RepVO extends BaseVo { | |
13 | + | |
14 | + private List<Form5> data ; | |
15 | + | |
16 | + public List<Form5> getData() { | |
17 | + return data; | |
18 | + } | |
19 | + | |
20 | + public void setData(List<Form5> data) { | |
21 | + this.data = data; | |
22 | + } | |
23 | +} | ... | ... |
... | ... | @@ -0,0 +1,119 @@ |
1 | +package com.jevon.wordDTO; | |
2 | + | |
3 | +/** | |
4 | + * @author chen | |
5 | + * @version 1.0 | |
6 | + * @date 2019/10/21 0021 11:25 | |
7 | + */ | |
8 | +public class Form6 { | |
9 | + private String dimensional ; | |
10 | + private Double score ; | |
11 | + private Double allRate ; | |
12 | + private Double leagueRate ; | |
13 | + private Double schoolRate ; | |
14 | + private Double allAvg ; | |
15 | + private Double leagueAvg ; | |
16 | + private Double schoolAvg ; | |
17 | + private Double allDist ; | |
18 | + private Double leagueDist ; | |
19 | + private Double schoolDist ; | |
20 | + | |
21 | + private String examNumber ; | |
22 | + | |
23 | + | |
24 | + public Double getScore() { | |
25 | + return score; | |
26 | + } | |
27 | + | |
28 | + public void setScore(Double score) { | |
29 | + this.score = score; | |
30 | + } | |
31 | + | |
32 | + public Double getAllRate() { | |
33 | + return allRate; | |
34 | + } | |
35 | + | |
36 | + public void setAllRate(Double allRate) { | |
37 | + this.allRate = allRate; | |
38 | + } | |
39 | + | |
40 | + public Double getSchoolRate() { | |
41 | + return schoolRate; | |
42 | + } | |
43 | + | |
44 | + public void setSchoolRate(Double schoolRate) { | |
45 | + this.schoolRate = schoolRate; | |
46 | + } | |
47 | + | |
48 | + public Double getAllAvg() { | |
49 | + return allAvg; | |
50 | + } | |
51 | + | |
52 | + public void setAllAvg(Double allAvg) { | |
53 | + this.allAvg = allAvg; | |
54 | + } | |
55 | + | |
56 | + public Double getSchoolAvg() { | |
57 | + return schoolAvg; | |
58 | + } | |
59 | + | |
60 | + public void setSchoolAvg(Double schoolAvg) { | |
61 | + this.schoolAvg = schoolAvg; | |
62 | + } | |
63 | + | |
64 | + public Double getAllDist() { | |
65 | + return allDist; | |
66 | + } | |
67 | + | |
68 | + public void setAllDist(Double allDist) { | |
69 | + this.allDist = allDist; | |
70 | + } | |
71 | + | |
72 | + public Double getSchoolDist() { | |
73 | + return schoolDist; | |
74 | + } | |
75 | + | |
76 | + public void setSchoolDist(Double schoolDist) { | |
77 | + this.schoolDist = schoolDist; | |
78 | + } | |
79 | + | |
80 | + public String getExamNumber() { | |
81 | + return examNumber; | |
82 | + } | |
83 | + | |
84 | + public void setExamNumber(String examNumber) { | |
85 | + this.examNumber = examNumber; | |
86 | + } | |
87 | + | |
88 | + public String getDimensional() { | |
89 | + return dimensional; | |
90 | + } | |
91 | + | |
92 | + public void setDimensional(String dimensional) { | |
93 | + this.dimensional = dimensional; | |
94 | + } | |
95 | + | |
96 | + public Double getLeagueRate() { | |
97 | + return leagueRate; | |
98 | + } | |
99 | + | |
100 | + public void setLeagueRate(Double leagueRate) { | |
101 | + this.leagueRate = leagueRate; | |
102 | + } | |
103 | + | |
104 | + public Double getLeagueAvg() { | |
105 | + return leagueAvg; | |
106 | + } | |
107 | + | |
108 | + public void setLeagueAvg(Double leagueAvg) { | |
109 | + this.leagueAvg = leagueAvg; | |
110 | + } | |
111 | + | |
112 | + public Double getLeagueDist() { | |
113 | + return leagueDist; | |
114 | + } | |
115 | + | |
116 | + public void setLeagueDist(Double leagueDist) { | |
117 | + this.leagueDist = leagueDist; | |
118 | + } | |
119 | +} | ... | ... |
... | ... | @@ -0,0 +1,23 @@ |
1 | +package com.jevon.wordDTO; | |
2 | + | |
3 | +import com.jevon.vo.BaseVo; | |
4 | + | |
5 | +import java.util.List; | |
6 | + | |
7 | +/** | |
8 | + * @author chen | |
9 | + * @version 1.0 | |
10 | + * @date 2019/10/22 0022 10:51 | |
11 | + */ | |
12 | +public class Form6RepVo extends BaseVo { | |
13 | + | |
14 | + private List<Form6> data ; | |
15 | + | |
16 | + public List<Form6> getData() { | |
17 | + return data; | |
18 | + } | |
19 | + | |
20 | + public void setData(List<Form6> data) { | |
21 | + this.data = data; | |
22 | + } | |
23 | +} | ... | ... |
... | ... | @@ -0,0 +1,28 @@ |
1 | +package com.jevon.wordDTO; | |
2 | + | |
3 | +/** | |
4 | + * @author chen | |
5 | + * @version 1.0 | |
6 | + * @date 2019/10/21 0021 14:58 | |
7 | + */ | |
8 | +public class Form7 { | |
9 | + | |
10 | + private String name ; | |
11 | + private Double percent ; | |
12 | + | |
13 | + public String getName() { | |
14 | + return name; | |
15 | + } | |
16 | + | |
17 | + public void setName(String name) { | |
18 | + this.name = name; | |
19 | + } | |
20 | + | |
21 | + public Double getPercent() { | |
22 | + return percent; | |
23 | + } | |
24 | + | |
25 | + public void setPercent(Double percent) { | |
26 | + this.percent = percent; | |
27 | + } | |
28 | +} | ... | ... |
... | ... | @@ -0,0 +1,55 @@ |
1 | +package com.jevon.wordDTO; | |
2 | + | |
3 | +/** | |
4 | + * @author chen | |
5 | + * @version 1.0 | |
6 | + * @date 2019/10/21 0021 15:14 | |
7 | + */ | |
8 | +public class Form8 { | |
9 | + | |
10 | + private String difficultName ; | |
11 | + private Double score ; | |
12 | + private Double allRate ; | |
13 | + private Double leagueRate ; | |
14 | + private Double schoolRate ; | |
15 | + | |
16 | + public String getDifficultName() { | |
17 | + return difficultName; | |
18 | + } | |
19 | + | |
20 | + public void setDifficultName(String difficultName) { | |
21 | + this.difficultName = difficultName; | |
22 | + } | |
23 | + | |
24 | + public Double getScore() { | |
25 | + return score; | |
26 | + } | |
27 | + | |
28 | + public void setScore(Double score) { | |
29 | + this.score = score; | |
30 | + } | |
31 | + | |
32 | + public Double getAllRate() { | |
33 | + return allRate; | |
34 | + } | |
35 | + | |
36 | + public void setAllRate(Double allRate) { | |
37 | + this.allRate = allRate; | |
38 | + } | |
39 | + | |
40 | + public Double getSchoolRate() { | |
41 | + return schoolRate; | |
42 | + } | |
43 | + | |
44 | + public void setSchoolRate(Double schoolRate) { | |
45 | + this.schoolRate = schoolRate; | |
46 | + } | |
47 | + | |
48 | + public Double getLeagueRate() { | |
49 | + return leagueRate; | |
50 | + } | |
51 | + | |
52 | + public void setLeagueRate(Double leagueRate) { | |
53 | + this.leagueRate = leagueRate; | |
54 | + } | |
55 | +} | ... | ... |
... | ... | @@ -0,0 +1,23 @@ |
1 | +package com.jevon.wordDTO; | |
2 | + | |
3 | +import com.jevon.vo.BaseVo; | |
4 | + | |
5 | +import java.util.List; | |
6 | + | |
7 | +/** | |
8 | + * @author chen | |
9 | + * @version 1.0 | |
10 | + * @date 2019/10/22 0022 10:47 | |
11 | + */ | |
12 | +public class Form8RepVO extends BaseVo { | |
13 | + | |
14 | + private List<Form8> data ; | |
15 | + | |
16 | + public List<Form8> getData() { | |
17 | + return data; | |
18 | + } | |
19 | + | |
20 | + public void setData(List<Form8> data) { | |
21 | + this.data = data; | |
22 | + } | |
23 | +} | ... | ... |
... | ... | @@ -0,0 +1,28 @@ |
1 | +package com.jevon.wordDTO; | |
2 | + | |
3 | +/** | |
4 | + * @author chen | |
5 | + * @version 1.0 | |
6 | + * @date 2019/10/21 0021 8:34 | |
7 | + */ | |
8 | +public class Table1 { | |
9 | + | |
10 | + private String score ; | |
11 | + private int number ; | |
12 | + | |
13 | + public String getScore() { | |
14 | + return score; | |
15 | + } | |
16 | + | |
17 | + public void setScore(String score) { | |
18 | + this.score = score; | |
19 | + } | |
20 | + | |
21 | + public int getNumber() { | |
22 | + return number; | |
23 | + } | |
24 | + | |
25 | + public void setNumber(int number) { | |
26 | + this.number = number; | |
27 | + } | |
28 | +} | ... | ... |
src/main/java/com/jevon/wordDTO/second/Form1.java
... | ... | @@ -1,37 +0,0 @@ |
1 | -package com.jevon.wordDTO.second; | |
2 | - | |
3 | -/** | |
4 | - * @author chen | |
5 | - * @version 1.0 | |
6 | - * @date 2019/10/18 0018 15:37 | |
7 | - */ | |
8 | -public class Form1 { | |
9 | - | |
10 | - private String level ; | |
11 | - private int number ; | |
12 | - private double prop ; | |
13 | - | |
14 | - public String getLevel() { | |
15 | - return level; | |
16 | - } | |
17 | - | |
18 | - public void setLevel(String level) { | |
19 | - this.level = level; | |
20 | - } | |
21 | - | |
22 | - public int getNumber() { | |
23 | - return number; | |
24 | - } | |
25 | - | |
26 | - public void setNumber(int number) { | |
27 | - this.number = number; | |
28 | - } | |
29 | - | |
30 | - public double getProp() { | |
31 | - return prop; | |
32 | - } | |
33 | - | |
34 | - public void setProp(double prop) { | |
35 | - this.prop = prop; | |
36 | - } | |
37 | -} |
src/main/java/com/jevon/wordDTO/second/Form1RepVo.java
... | ... | @@ -1,31 +0,0 @@ |
1 | -package com.jevon.wordDTO.second; | |
2 | - | |
3 | -import java.util.List; | |
4 | -import java.util.Map; | |
5 | - | |
6 | -/** | |
7 | - * @author chen | |
8 | - * @version 1.0 | |
9 | - * @date 2019/10/18 0018 15:46 | |
10 | - */ | |
11 | -public class Form1RepVo { | |
12 | - | |
13 | - private Map<String ,String> map ; | |
14 | - private List<Form1> list ; | |
15 | - | |
16 | - public Map<String, String> getMap() { | |
17 | - return map; | |
18 | - } | |
19 | - | |
20 | - public void setMap(Map<String, String> map) { | |
21 | - this.map = map; | |
22 | - } | |
23 | - | |
24 | - public List<Form1> getList() { | |
25 | - return list; | |
26 | - } | |
27 | - | |
28 | - public void setList(List<Form1> list) { | |
29 | - this.list = list; | |
30 | - } | |
31 | -} |
src/main/java/com/jevon/wordDTO/second/Form2.java
... | ... | @@ -1,64 +0,0 @@ |
1 | -package com.jevon.wordDTO.second; | |
2 | - | |
3 | -/** | |
4 | - * @author chen | |
5 | - * @version 1.0 | |
6 | - * @date 2019/10/18 0018 16:10 | |
7 | - */ | |
8 | -public class Form2 { | |
9 | - | |
10 | - private String name ; | |
11 | - private int studentNumber ; | |
12 | - private int highNumber ; | |
13 | - private double highProp ; | |
14 | - private int lowNumber ; | |
15 | - private double lowProp ; | |
16 | - | |
17 | - public String getName() { | |
18 | - return name; | |
19 | - } | |
20 | - | |
21 | - public void setName(String name) { | |
22 | - this.name = name; | |
23 | - } | |
24 | - | |
25 | - public int getStudentNumber() { | |
26 | - return studentNumber; | |
27 | - } | |
28 | - | |
29 | - public void setStudentNumber(int studentNumber) { | |
30 | - this.studentNumber = studentNumber; | |
31 | - } | |
32 | - | |
33 | - public int getHighNumber() { | |
34 | - return highNumber; | |
35 | - } | |
36 | - | |
37 | - public void setHighNumber(int highNumber) { | |
38 | - this.highNumber = highNumber; | |
39 | - } | |
40 | - | |
41 | - public double getHighProp() { | |
42 | - return highProp; | |
43 | - } | |
44 | - | |
45 | - public void setHighProp(double highProp) { | |
46 | - this.highProp = highProp; | |
47 | - } | |
48 | - | |
49 | - public int getLowNumber() { | |
50 | - return lowNumber; | |
51 | - } | |
52 | - | |
53 | - public void setLowNumber(int lowNumber) { | |
54 | - this.lowNumber = lowNumber; | |
55 | - } | |
56 | - | |
57 | - public double getLowProp() { | |
58 | - return lowProp; | |
59 | - } | |
60 | - | |
61 | - public void setLowProp(double lowProp) { | |
62 | - this.lowProp = lowProp; | |
63 | - } | |
64 | -} |
src/main/java/com/jevon/wordDTO/second/Form3.java
... | ... | @@ -1,82 +0,0 @@ |
1 | -package com.jevon.wordDTO.second; | |
2 | - | |
3 | -/** | |
4 | - * @author chen | |
5 | - * @version 1.0 | |
6 | - * @date 2019/10/21 0021 9:03 | |
7 | - */ | |
8 | -public class Form3 { | |
9 | - | |
10 | - private String name ; | |
11 | - private Double maxScore ; | |
12 | - private Double average ; | |
13 | - private Double minScore ; | |
14 | - private Double apercent ; | |
15 | - private Double bpercent ; | |
16 | - private Double cpercent ; | |
17 | - private Double dpercent ; | |
18 | - | |
19 | - public String getName() { | |
20 | - return name; | |
21 | - } | |
22 | - | |
23 | - public void setName(String name) { | |
24 | - this.name = name; | |
25 | - } | |
26 | - | |
27 | - public Double getMaxScore() { | |
28 | - return maxScore; | |
29 | - } | |
30 | - | |
31 | - public void setMaxScore(Double maxScore) { | |
32 | - this.maxScore = maxScore; | |
33 | - } | |
34 | - | |
35 | - public Double getAverage() { | |
36 | - return average; | |
37 | - } | |
38 | - | |
39 | - public void setAverage(Double average) { | |
40 | - this.average = average; | |
41 | - } | |
42 | - | |
43 | - public Double getMinScore() { | |
44 | - return minScore; | |
45 | - } | |
46 | - | |
47 | - public void setMinScore(Double minScore) { | |
48 | - this.minScore = minScore; | |
49 | - } | |
50 | - | |
51 | - public Double getApercent() { | |
52 | - return apercent; | |
53 | - } | |
54 | - | |
55 | - public void setApercent(Double apercent) { | |
56 | - this.apercent = apercent; | |
57 | - } | |
58 | - | |
59 | - public Double getBpercent() { | |
60 | - return bpercent; | |
61 | - } | |
62 | - | |
63 | - public void setBpercent(Double bpercent) { | |
64 | - this.bpercent = bpercent; | |
65 | - } | |
66 | - | |
67 | - public Double getCpercent() { | |
68 | - return cpercent; | |
69 | - } | |
70 | - | |
71 | - public void setCpercent(Double cpercent) { | |
72 | - this.cpercent = cpercent; | |
73 | - } | |
74 | - | |
75 | - public Double getDpercent() { | |
76 | - return dpercent; | |
77 | - } | |
78 | - | |
79 | - public void setDpercent(Double dpercent) { | |
80 | - this.dpercent = dpercent; | |
81 | - } | |
82 | -} |
src/main/java/com/jevon/wordDTO/second/Form4.java
... | ... | @@ -1,55 +0,0 @@ |
1 | -package com.jevon.wordDTO.second; | |
2 | - | |
3 | -/** | |
4 | - * @author chen | |
5 | - * @version 1.0 | |
6 | - * @date 2019/10/21 0021 9:51 | |
7 | - */ | |
8 | -public class Form4 { | |
9 | - | |
10 | - private String name ; | |
11 | - private Double modeNumber ; | |
12 | - private Double medianNumber ; | |
13 | - private Double stdev ; | |
14 | - private Double avgNumber ; | |
15 | - | |
16 | - public String getName() { | |
17 | - return name; | |
18 | - } | |
19 | - | |
20 | - public void setName(String name) { | |
21 | - this.name = name; | |
22 | - } | |
23 | - | |
24 | - public Double getModeNumber() { | |
25 | - return modeNumber; | |
26 | - } | |
27 | - | |
28 | - public void setModeNumber(Double modeNumber) { | |
29 | - this.modeNumber = modeNumber; | |
30 | - } | |
31 | - | |
32 | - public Double getMedianNumber() { | |
33 | - return medianNumber; | |
34 | - } | |
35 | - | |
36 | - public void setMedianNumber(Double medianNumber) { | |
37 | - this.medianNumber = medianNumber; | |
38 | - } | |
39 | - | |
40 | - public Double getStdev() { | |
41 | - return stdev; | |
42 | - } | |
43 | - | |
44 | - public void setStdev(Double stdev) { | |
45 | - this.stdev = stdev; | |
46 | - } | |
47 | - | |
48 | - public Double getAvgNumber() { | |
49 | - return avgNumber; | |
50 | - } | |
51 | - | |
52 | - public void setAvgNumber(Double avgNumber) { | |
53 | - this.avgNumber = avgNumber; | |
54 | - } | |
55 | -} |
src/main/java/com/jevon/wordDTO/second/Form6.java
... | ... | @@ -1,91 +0,0 @@ |
1 | -package com.jevon.wordDTO.second; | |
2 | - | |
3 | -/** | |
4 | - * @author chen | |
5 | - * @version 1.0 | |
6 | - * @date 2019/10/21 0021 11:25 | |
7 | - */ | |
8 | -public class Form6 { | |
9 | - private String knowledge ; | |
10 | - private Double score ; | |
11 | - private Double allRate ; | |
12 | - private Double schoolRate ; | |
13 | - private Double allAvg ; | |
14 | - private Double schoolAvg ; | |
15 | - private Double allDist ; | |
16 | - private Double schoolDist ; | |
17 | - | |
18 | - private String examNumber ; | |
19 | - | |
20 | - public String getKnowledge() { | |
21 | - return knowledge; | |
22 | - } | |
23 | - | |
24 | - public void setKnowledge(String knowledge) { | |
25 | - this.knowledge = knowledge; | |
26 | - } | |
27 | - | |
28 | - public Double getScore() { | |
29 | - return score; | |
30 | - } | |
31 | - | |
32 | - public void setScore(Double score) { | |
33 | - this.score = score; | |
34 | - } | |
35 | - | |
36 | - public Double getAllRate() { | |
37 | - return allRate; | |
38 | - } | |
39 | - | |
40 | - public void setAllRate(Double allRate) { | |
41 | - this.allRate = allRate; | |
42 | - } | |
43 | - | |
44 | - public Double getSchoolRate() { | |
45 | - return schoolRate; | |
46 | - } | |
47 | - | |
48 | - public void setSchoolRate(Double schoolRate) { | |
49 | - this.schoolRate = schoolRate; | |
50 | - } | |
51 | - | |
52 | - public Double getAllAvg() { | |
53 | - return allAvg; | |
54 | - } | |
55 | - | |
56 | - public void setAllAvg(Double allAvg) { | |
57 | - this.allAvg = allAvg; | |
58 | - } | |
59 | - | |
60 | - public Double getSchoolAvg() { | |
61 | - return schoolAvg; | |
62 | - } | |
63 | - | |
64 | - public void setSchoolAvg(Double schoolAvg) { | |
65 | - this.schoolAvg = schoolAvg; | |
66 | - } | |
67 | - | |
68 | - public Double getAllDist() { | |
69 | - return allDist; | |
70 | - } | |
71 | - | |
72 | - public void setAllDist(Double allDist) { | |
73 | - this.allDist = allDist; | |
74 | - } | |
75 | - | |
76 | - public Double getSchoolDist() { | |
77 | - return schoolDist; | |
78 | - } | |
79 | - | |
80 | - public void setSchoolDist(Double schoolDist) { | |
81 | - this.schoolDist = schoolDist; | |
82 | - } | |
83 | - | |
84 | - public String getExamNumber() { | |
85 | - return examNumber; | |
86 | - } | |
87 | - | |
88 | - public void setExamNumber(String examNumber) { | |
89 | - this.examNumber = examNumber; | |
90 | - } | |
91 | -} |
src/main/java/com/jevon/wordDTO/second/Form7.java
... | ... | @@ -1,28 +0,0 @@ |
1 | -package com.jevon.wordDTO.second; | |
2 | - | |
3 | -/** | |
4 | - * @author chen | |
5 | - * @version 1.0 | |
6 | - * @date 2019/10/21 0021 14:58 | |
7 | - */ | |
8 | -public class Form7 { | |
9 | - | |
10 | - private String name ; | |
11 | - private Double percent ; | |
12 | - | |
13 | - public String getName() { | |
14 | - return name; | |
15 | - } | |
16 | - | |
17 | - public void setName(String name) { | |
18 | - this.name = name; | |
19 | - } | |
20 | - | |
21 | - public Double getPercent() { | |
22 | - return percent; | |
23 | - } | |
24 | - | |
25 | - public void setPercent(Double percent) { | |
26 | - this.percent = percent; | |
27 | - } | |
28 | -} |
src/main/java/com/jevon/wordDTO/second/Form8.java
... | ... | @@ -1,46 +0,0 @@ |
1 | -package com.jevon.wordDTO.second; | |
2 | - | |
3 | -/** | |
4 | - * @author chen | |
5 | - * @version 1.0 | |
6 | - * @date 2019/10/21 0021 15:14 | |
7 | - */ | |
8 | -public class Form8 { | |
9 | - | |
10 | - private String difficultName ; | |
11 | - private Double score ; | |
12 | - private Double allRate ; | |
13 | - private Double schoolRate ; | |
14 | - | |
15 | - public String getDifficultName() { | |
16 | - return difficultName; | |
17 | - } | |
18 | - | |
19 | - public void setDifficultName(String difficultName) { | |
20 | - this.difficultName = difficultName; | |
21 | - } | |
22 | - | |
23 | - public Double getScore() { | |
24 | - return score; | |
25 | - } | |
26 | - | |
27 | - public void setScore(Double score) { | |
28 | - this.score = score; | |
29 | - } | |
30 | - | |
31 | - public Double getAllRate() { | |
32 | - return allRate; | |
33 | - } | |
34 | - | |
35 | - public void setAllRate(Double allRate) { | |
36 | - this.allRate = allRate; | |
37 | - } | |
38 | - | |
39 | - public Double getSchoolRate() { | |
40 | - return schoolRate; | |
41 | - } | |
42 | - | |
43 | - public void setSchoolRate(Double schoolRate) { | |
44 | - this.schoolRate = schoolRate; | |
45 | - } | |
46 | -} |
src/main/java/com/jevon/wordDTO/second/From5.java
... | ... | @@ -1,91 +0,0 @@ |
1 | -package com.jevon.wordDTO.second; | |
2 | - | |
3 | -/** | |
4 | - * @author chen | |
5 | - * @version 1.0 | |
6 | - * @date 2019/10/21 0021 9:59 | |
7 | - */ | |
8 | -public class From5 { | |
9 | - | |
10 | - private String examNumber ; | |
11 | - private String difficultName ; | |
12 | - private Double score ; | |
13 | - private Double allRate ; | |
14 | - private Double schoolRate ; | |
15 | - private Double allAvg ; | |
16 | - private Double schoolAvg ; | |
17 | - private Double allDist ; | |
18 | - private Double schoolDist ; | |
19 | - | |
20 | - public String getExamNumber() { | |
21 | - return examNumber; | |
22 | - } | |
23 | - | |
24 | - public void setExamNumber(String examNumber) { | |
25 | - this.examNumber = examNumber; | |
26 | - } | |
27 | - | |
28 | - public Double getScore() { | |
29 | - return score; | |
30 | - } | |
31 | - | |
32 | - public void setScore(Double score) { | |
33 | - this.score = score; | |
34 | - } | |
35 | - | |
36 | - public Double getAllRate() { | |
37 | - return allRate; | |
38 | - } | |
39 | - | |
40 | - public void setAllRate(Double allRate) { | |
41 | - this.allRate = allRate; | |
42 | - } | |
43 | - | |
44 | - public Double getSchoolRate() { | |
45 | - return schoolRate; | |
46 | - } | |
47 | - | |
48 | - public void setSchoolRate(Double schoolRate) { | |
49 | - this.schoolRate = schoolRate; | |
50 | - } | |
51 | - | |
52 | - public Double getAllAvg() { | |
53 | - return allAvg; | |
54 | - } | |
55 | - | |
56 | - public void setAllAvg(Double allAvg) { | |
57 | - this.allAvg = allAvg; | |
58 | - } | |
59 | - | |
60 | - public Double getSchoolAvg() { | |
61 | - return schoolAvg; | |
62 | - } | |
63 | - | |
64 | - public void setSchoolAvg(Double schoolAvg) { | |
65 | - this.schoolAvg = schoolAvg; | |
66 | - } | |
67 | - | |
68 | - public Double getAllDist() { | |
69 | - return allDist; | |
70 | - } | |
71 | - | |
72 | - public void setAllDist(Double allDist) { | |
73 | - this.allDist = allDist; | |
74 | - } | |
75 | - | |
76 | - public Double getSchoolDist() { | |
77 | - return schoolDist; | |
78 | - } | |
79 | - | |
80 | - public void setSchoolDist(Double schoolDist) { | |
81 | - this.schoolDist = schoolDist; | |
82 | - } | |
83 | - | |
84 | - public String getDifficultName() { | |
85 | - return difficultName; | |
86 | - } | |
87 | - | |
88 | - public void setDifficultName(String difficultName) { | |
89 | - this.difficultName = difficultName; | |
90 | - } | |
91 | -} |
src/main/java/com/jevon/wordDTO/second/Table1.java
... | ... | @@ -1,28 +0,0 @@ |
1 | -package com.jevon.wordDTO.second; | |
2 | - | |
3 | -/** | |
4 | - * @author chen | |
5 | - * @version 1.0 | |
6 | - * @date 2019/10/21 0021 8:34 | |
7 | - */ | |
8 | -public class Table1 { | |
9 | - | |
10 | - private String score ; | |
11 | - private int number ; | |
12 | - | |
13 | - public String getScore() { | |
14 | - return score; | |
15 | - } | |
16 | - | |
17 | - public void setScore(String score) { | |
18 | - this.score = score; | |
19 | - } | |
20 | - | |
21 | - public int getNumber() { | |
22 | - return number; | |
23 | - } | |
24 | - | |
25 | - public void setNumber(int number) { | |
26 | - this.number = number; | |
27 | - } | |
28 | -} |
src/main/resources/mapping/AnalyseMapper.xml
... | ... | @@ -32,13 +32,15 @@ |
32 | 32 | </update> |
33 | 33 | |
34 | 34 | <select id="select" parameterType="com.jevon.model.Analyse" resultMap="BaseResultMap"> |
35 | - select * from sz_learn_analyse where 1=1 | |
36 | - <if test="courseName != 0"> | |
37 | - and course_name = #{courseName} | |
38 | - </if> | |
39 | - <if test="examName != null"> | |
40 | - and exam_name = #{examName} | |
41 | - </if> | |
35 | + select * from sz_learn_analyse | |
36 | + <where> | |
37 | + <if test="courseName != 0"> | |
38 | + and course_name = #{courseName} | |
39 | + </if> | |
40 | + <if test="examName != null"> | |
41 | + and exam_name = #{examName} | |
42 | + </if> | |
43 | + </where> | |
42 | 44 | </select> |
43 | 45 | |
44 | 46 | <select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap"> | ... | ... |
src/main/resources/mapping/DimensionalMapper.xml
... | ... | @@ -14,13 +14,15 @@ |
14 | 14 | </insert> |
15 | 15 | |
16 | 16 | <select id="select" parameterType="com.jevon.model.Dimensional" resultMap="BaseResultMap"> |
17 | - select * from sz_learn_dimensional where 1=1 | |
18 | - <if test="dimensionalType != 0"> | |
19 | - and dimensional_type = #{dimensionalType} | |
20 | - </if> | |
21 | - <if test="dimensionalName != null"> | |
22 | - and dimensional_name = #{dimensionalName} | |
23 | - </if> | |
17 | + select * from sz_learn_dimensional | |
18 | + <where> | |
19 | + <if test="dimensionalType != 0"> | |
20 | + and dimensional_type = #{dimensionalType} | |
21 | + </if> | |
22 | + <if test="dimensionalName != null"> | |
23 | + and dimensional_name = #{dimensionalName} | |
24 | + </if> | |
25 | + </where> | |
24 | 26 | </select> |
25 | 27 | |
26 | 28 | <select id="selectByAnalyse" parameterType="com.jevon.model.Dimensional" resultMap="BaseResultMap"> | ... | ... |
... | ... | @@ -0,0 +1,33 @@ |
1 | +<?xml version="1.0" encoding="UTF-8" ?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | |
3 | +<mapper namespace="com.jevon.mapper.LeagueMapper" > | |
4 | + <resultMap id="BaseResultMap" type="com.jevon.model.League" > | |
5 | + <id column="id" property="id" jdbcType="INTEGER" /> | |
6 | + <result column="analyse_id" property="analyseId" jdbcType="INTEGER" /> | |
7 | + <result column="league" property="league" jdbcType="VARCHAR" /> | |
8 | + <result column="school_name" property="schoolName" jdbcType="VARCHAR" /> | |
9 | + </resultMap> | |
10 | + | |
11 | + <insert id="insertBatch" parameterType="java.util.List"> | |
12 | + insert into sz_learn_league (analyse_id, league,school_name) | |
13 | + values | |
14 | + <foreach collection="list" item="emp" separator=","> | |
15 | + (#{emp.analyseId,jdbcType=INTEGER}, #{emp.league,jdbcType=INTEGER}, #{emp.schoolName,jdbcType=VARCHAR}) | |
16 | + </foreach> | |
17 | + </insert> | |
18 | + | |
19 | + <select id="selectByLeague" parameterType="com.jevon.model.League" resultMap="BaseResultMap"> | |
20 | + select * from sz_learn_league | |
21 | + <where> | |
22 | + <if test="analyseId != 0"> | |
23 | + and analyse_id = #{analyseId} | |
24 | + </if> | |
25 | + <if test="league != null"> | |
26 | + and league = #{league} | |
27 | + </if> | |
28 | + <if test="schoolName != null"> | |
29 | + and school_name = #{schoolName} | |
30 | + </if> | |
31 | + </where> | |
32 | + </select> | |
33 | +</mapper> | |
0 | 34 | \ No newline at end of file | ... | ... |
src/main/resources/mapping/StudentDetailMapper.xml
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
3 | 3 | <mapper namespace="com.jevon.mapper.StudentDetailMapper" > |
4 | 4 | <resultMap id="BaseResultMap" type="com.jevon.model.StudentDetail" > |
5 | - <id column="id" property="id" jdbcType="INTEGER" /> | |
5 | + <id column="id" property="id" jdbcType="BIGINT" /> | |
6 | 6 | <result column="open_id" property="analyseId" jdbcType="INTEGER" /> |
7 | 7 | <result column="school_name" property="schoolName" jdbcType="VARCHAR" /> |
8 | 8 | <result column="class_name" property="className" jdbcType="VARCHAR" /> |
... | ... | @@ -25,33 +25,54 @@ |
25 | 25 | </insert> |
26 | 26 | |
27 | 27 | <select id="selectSumScore" parameterType="com.jevon.model.StudentDetail" resultType="java.lang.Double"> |
28 | - SELECT sum(score) FROM sz_learn_student_detail where 1=1 | |
29 | - <if test="analyseId != 0"> | |
30 | - and analyse_id = #{analyseId} | |
31 | - </if> | |
32 | - <if test="schoolName != null"> | |
33 | - and school_name = #{schoolName} | |
34 | - </if> | |
35 | - <if test="examNumber != null"> | |
36 | - and exam_number = #{examNumber} | |
37 | - </if> | |
28 | + SELECT sum(score) FROM sz_learn_student_detail | |
29 | + <where> | |
30 | + <if test="analyseId != 0"> | |
31 | + and analyse_id = #{analyseId} | |
32 | + </if> | |
33 | + <if test="schoolName != null"> | |
34 | + and school_name = #{schoolName} | |
35 | + </if> | |
36 | + <if test="examNumber != null"> | |
37 | + and exam_number = #{examNumber} | |
38 | + </if> | |
39 | + <if test="schoolNames != null and schoolNames.size()>0"> | |
40 | + AND school_name IN | |
41 | + <foreach item="item" index="index" collection="schoolNames" open="(" close=")" separator=","> | |
42 | + #{item} | |
43 | + </foreach> | |
44 | + </if> | |
45 | + </where> | |
38 | 46 | </select> |
39 | 47 | |
40 | 48 | <select id="selectTrueByExamNumber" parameterType="com.jevon.model.StudentDetail" resultType="java.lang.Integer"> |
41 | - select count(*) from sz_learn_student_detail where 1=1 | |
42 | - <if test="analyseId != 0"> | |
43 | - and analyse_id = #{analyseId} | |
44 | - </if> | |
45 | - <if test="schoolName != null"> | |
46 | - and school_name = #{schoolName} | |
47 | - </if> | |
48 | - <if test="examNumber != null"> | |
49 | - and exam_number = #{examNumber} | |
50 | - </if> | |
51 | - and score = #{score} and student_number in | |
52 | - <foreach item="item" collection="studentNumbers" open="(" separator="," close=")"> | |
53 | - #{item} | |
54 | - </foreach> | |
49 | + select count(*) from sz_learn_student_detail | |
50 | + <where> | |
51 | + <if test="analyseId != 0"> | |
52 | + and analyse_id = #{analyseId} | |
53 | + </if> | |
54 | + <if test="schoolName != null"> | |
55 | + and school_name = #{schoolName} | |
56 | + </if> | |
57 | + <if test="examNumber != null"> | |
58 | + and exam_number = #{examNumber} | |
59 | + </if> | |
60 | + <if test="score != null"> | |
61 | + and score = #{score} | |
62 | + </if> | |
63 | + <if test="studentNumbers != null and studentNumbers.size()>0"> | |
64 | + AND student_number IN | |
65 | + <foreach item="item" index="index" collection="studentNumbers" open="(" close=")" separator=","> | |
66 | + #{item} | |
67 | + </foreach> | |
68 | + </if> | |
69 | + <if test="schoolNames != null and schoolNames.size()>0"> | |
70 | + AND school_name IN | |
71 | + <foreach item="item" index="index" collection="schoolNames" open="(" close=")" separator=","> | |
72 | + #{item} | |
73 | + </foreach> | |
74 | + </if> | |
75 | + </where> | |
55 | 76 | </select> |
56 | 77 | |
57 | 78 | </mapper> |
58 | 79 | \ No newline at end of file | ... | ... |
src/main/resources/mapping/StudentMapper.xml
... | ... | @@ -24,89 +24,152 @@ |
24 | 24 | </insert> |
25 | 25 | |
26 | 26 | <select id="selectByStudent" parameterType="com.jevon.model.Student" resultMap="BaseResultMap"> |
27 | - select * from sz_learn_student where 1=1 | |
28 | - <if test="analyseId != 0"> | |
29 | - and analyse_id = #{analyseId} | |
30 | - </if> | |
31 | - <if test="schoolName != null"> | |
32 | - and school_name = #{schoolName} | |
33 | - </if> | |
34 | - <if test="className != null"> | |
35 | - and class_name = #{className} | |
36 | - </if> | |
37 | - order by score desc | |
38 | - </select> | |
39 | - | |
40 | - <select id="selectCountByScore" parameterType="com.jevon.model.Student" resultType="java.lang.Integer"> | |
41 | - select count(1) from sz_learn_student where 1=1 | |
27 | + select * from sz_learn_student | |
28 | + <where> | |
42 | 29 | <if test="analyseId != 0"> |
43 | - and analyse_id = #{analyseId} | |
30 | + and analyse_id = #{analyseId} | |
44 | 31 | </if> |
45 | 32 | <if test="schoolName != null"> |
46 | - and school_name = #{schoolName} | |
33 | + and school_name = #{schoolName} | |
47 | 34 | </if> |
48 | 35 | <if test="className != null"> |
49 | - and class_name = #{className} | |
36 | + and class_name = #{className} | |
37 | + </if> | |
38 | + <if test="schoolNames != null and schoolNames.size()>0"> | |
39 | + AND school_name IN | |
40 | + <foreach item="item" index="index" collection="schoolNames" open="(" close=")" separator=","> | |
41 | + #{item} | |
42 | + </foreach> | |
50 | 43 | </if> |
51 | - and score <![CDATA[ >= ]]> #{begin} and score <![CDATA[ < ]]> #{end} | |
44 | + </where> | |
45 | + order by score desc | |
46 | + </select> | |
47 | + | |
48 | + <select id="selectCountByScore" parameterType="com.jevon.model.Student" resultType="java.lang.Integer"> | |
49 | + select count(1) from sz_learn_student | |
50 | + <where> | |
51 | + <if test="analyseId != 0"> | |
52 | + and analyse_id = #{analyseId} | |
53 | + </if> | |
54 | + <if test="schoolName != null"> | |
55 | + and school_name = #{schoolName} | |
56 | + </if> | |
57 | + <if test="className != null"> | |
58 | + and class_name = #{className} | |
59 | + </if> | |
60 | + <if test="begin != null"> | |
61 | + and score <![CDATA[ >= ]]> #{begin} | |
62 | + </if> | |
63 | + <if test="end != null"> | |
64 | + and score <![CDATA[ < ]]> #{end} | |
65 | + </if> | |
66 | + <if test="schoolNames != null and schoolNames.size()>0"> | |
67 | + AND school_name IN | |
68 | + <foreach item="item" index="index" collection="schoolNames" open="(" close=")" separator=","> | |
69 | + #{item} | |
70 | + </foreach> | |
71 | + </if> | |
72 | + </where> | |
52 | 73 | </select> |
53 | 74 | |
54 | 75 | <select id="selectClassNameBySchool" parameterType="com.jevon.model.Student" resultType="java.lang.String"> |
55 | - select DISTINCT(class_name) from sz_learn_student where 1=1 | |
56 | - and analyse_id = #{analyseId} | |
76 | + select DISTINCT(class_name) from sz_learn_student where analyse_id = #{analyseId} | |
57 | 77 | and school_name = #{schoolName} |
58 | 78 | </select> |
59 | 79 | |
80 | + <select id="selectSchoolNameByAnalyse" parameterType="java.lang.Integer" resultType="java.lang.String"> | |
81 | + select DISTINCT(school_name) from sz_learn_student where analyse_id = #{analyseId} | |
82 | + </select> | |
83 | + | |
60 | 84 | <select id="selectMaxScore" parameterType="com.jevon.model.Student" resultType="java.lang.Double"> |
61 | - select max(score) from sz_learn_student where 1=1 | |
62 | - <if test="analyseId != 0"> | |
63 | - and analyse_id = #{analyseId} | |
64 | - </if> | |
65 | - <if test="schoolName != null"> | |
66 | - and school_name = #{schoolName} | |
67 | - </if> | |
85 | + select max(score) from sz_learn_student | |
86 | + <where> | |
87 | + <if test="analyseId != 0"> | |
88 | + and analyse_id = #{analyseId} | |
89 | + </if> | |
90 | + <if test="schoolName != null"> | |
91 | + and school_name = #{schoolName} | |
92 | + </if> | |
93 | + <if test="schoolNames != null and schoolNames.size()>0"> | |
94 | + AND school_name IN | |
95 | + <foreach item="item" index="index" collection="schoolNames" open="(" close=")" separator=","> | |
96 | + #{item} | |
97 | + </foreach> | |
98 | + </if> | |
99 | + </where> | |
68 | 100 | </select> |
69 | 101 | |
70 | 102 | <select id="selectMinScore" parameterType="com.jevon.model.Student" resultType="java.lang.Double"> |
71 | - select min(score) from sz_learn_student where 1=1 | |
72 | - <if test="analyseId != 0"> | |
73 | - and analyse_id = #{analyseId} | |
74 | - </if> | |
75 | - <if test="schoolName != null"> | |
76 | - and school_name = #{schoolName} | |
77 | - </if> | |
103 | + select min(score) from sz_learn_student | |
104 | + <where> | |
105 | + <if test="analyseId != 0"> | |
106 | + and analyse_id = #{analyseId} | |
107 | + </if> | |
108 | + <if test="schoolName != null"> | |
109 | + and school_name = #{schoolName} | |
110 | + </if> | |
111 | + <if test="schoolNames != null and schoolNames.size()>0"> | |
112 | + AND school_name IN | |
113 | + <foreach item="item" index="index" collection="schoolNames" open="(" close=")" separator=","> | |
114 | + #{item} | |
115 | + </foreach> | |
116 | + </if> | |
117 | + </where> | |
78 | 118 | </select> |
79 | 119 | |
80 | 120 | <select id="selectAvgScore" parameterType="com.jevon.model.Student" resultType="java.lang.Double"> |
81 | - select avg(score) from sz_learn_student where 1=1 | |
82 | - <if test="analyseId != 0"> | |
83 | - and analyse_id = #{analyseId} | |
84 | - </if> | |
85 | - <if test="schoolName != null"> | |
86 | - and school_name = #{schoolName} | |
87 | - </if> | |
121 | + select avg(score) from sz_learn_student | |
122 | + <where> | |
123 | + <if test="analyseId != 0"> | |
124 | + and analyse_id = #{analyseId} | |
125 | + </if> | |
126 | + <if test="schoolName != null"> | |
127 | + and school_name = #{schoolName} | |
128 | + </if> | |
129 | + <if test="schoolNames != null and schoolNames.size()>0"> | |
130 | + AND school_name IN | |
131 | + <foreach item="item" index="index" collection="schoolNames" open="(" close=")" separator=","> | |
132 | + #{item} | |
133 | + </foreach> | |
134 | + </if> | |
135 | + </where> | |
88 | 136 | </select> |
89 | 137 | |
90 | 138 | <select id="selectModeNumber" parameterType="com.jevon.model.Student" resultType="java.lang.Double"> |
91 | 139 | SELECT score FROM sz_learn_student |
92 | - WHERE 1=1 | |
93 | - <if test="analyseId != 0"> | |
94 | - and analyse_id = #{analyseId} | |
95 | - </if> | |
96 | - <if test="schoolName != null"> | |
97 | - and school_name = #{schoolName} | |
98 | - </if> | |
140 | + <where> | |
141 | + <if test="analyseId != 0"> | |
142 | + and analyse_id = #{analyseId} | |
143 | + </if> | |
144 | + <if test="schoolName != null"> | |
145 | + and school_name = #{schoolName} | |
146 | + </if> | |
147 | + <if test="schoolNames != null and schoolNames.size()>0"> | |
148 | + AND school_name IN | |
149 | + <foreach item="item" index="index" collection="schoolNames" open="(" close=")" separator=","> | |
150 | + #{item} | |
151 | + </foreach> | |
152 | + </if> | |
153 | + </where> | |
99 | 154 | GROUP BY score |
100 | 155 | HAVING COUNT ( * ) >= ( |
101 | 156 | SELECT MAX( cnt ) FROM |
102 | 157 | ( |
103 | - SELECT COUNT ( * ) cnt FROM sz_learn_student WHERE 1=1 | |
104 | - <if test="analyseId != 0"> | |
105 | - and analyse_id = #{analyseId} | |
106 | - </if> | |
107 | - <if test="schoolName != null"> | |
108 | - and school_name = #{schoolName} | |
109 | - </if> | |
158 | + SELECT COUNT ( * ) cnt FROM sz_learn_student | |
159 | + <where> | |
160 | + <if test="analyseId != 0"> | |
161 | + and analyse_id = #{analyseId} | |
162 | + </if> | |
163 | + <if test="schoolName != null"> | |
164 | + and school_name = #{schoolName} | |
165 | + </if> | |
166 | + <if test="schoolNames != null and schoolNames.size()>0"> | |
167 | + AND school_name IN | |
168 | + <foreach item="item" index="index" collection="schoolNames" open="(" close=")" separator=","> | |
169 | + #{item} | |
170 | + </foreach> | |
171 | + </if> | |
172 | + </where> | |
110 | 173 | GROUP BY score ) tmp |
111 | 174 | ) |
112 | 175 | </select> |
... | ... | @@ -116,19 +179,32 @@ |
116 | 179 | avg(DISTINCT score) |
117 | 180 | FROM ( |
118 | 181 | select T1.score from sz_learn_student T1 , sz_learn_student T2 |
119 | - WHERE 1=1 | |
120 | - <if test="analyseId != 0"> | |
121 | - and T1.analyse_id = #{analyseId} | |
122 | - </if> | |
123 | - <if test="schoolName != null"> | |
124 | - and T1.school_name = #{schoolName} | |
125 | - </if> | |
126 | - <if test="analyseId != 0"> | |
127 | - and T2.analyse_id = #{analyseId} | |
128 | - </if> | |
129 | - <if test="schoolName != null"> | |
130 | - and T2.school_name = #{schoolName} | |
131 | - </if> | |
182 | + <where> | |
183 | + <if test="analyseId != 0"> | |
184 | + and T1.analyse_id = #{analyseId} | |
185 | + </if> | |
186 | + <if test="schoolName != null"> | |
187 | + and T1.school_name = #{schoolName} | |
188 | + </if> | |
189 | + <if test="analyseId != 0"> | |
190 | + and T2.analyse_id = #{analyseId} | |
191 | + </if> | |
192 | + <if test="schoolName != null"> | |
193 | + and T2.school_name = #{schoolName} | |
194 | + </if> | |
195 | + <if test="schoolNames != null and schoolNames.size()>0"> | |
196 | + AND T1.school_name IN | |
197 | + <foreach item="item" index="index" collection="schoolNames" open="(" close=")" separator=","> | |
198 | + #{item} | |
199 | + </foreach> | |
200 | + </if> | |
201 | + <if test="schoolNames != null and schoolNames.size()>0"> | |
202 | + AND T2.school_name IN | |
203 | + <foreach item="item" index="index" collection="schoolNames" open="(" close=")" separator=","> | |
204 | + #{item} | |
205 | + </foreach> | |
206 | + </if> | |
207 | + </where> | |
132 | 208 | GROUP BY |
133 | 209 | T1.score |
134 | 210 | HAVING |
... | ... | @@ -137,12 +213,20 @@ |
137 | 213 | </select> |
138 | 214 | |
139 | 215 | <select id="selectStdev" parameterType="com.jevon.model.Student" resultType="java.lang.Double"> |
140 | - select STDEV(score) from sz_learn_student where 1=1 | |
141 | - <if test="analyseId != 0"> | |
142 | - and analyse_id = #{analyseId} | |
143 | - </if> | |
144 | - <if test="schoolName != null"> | |
145 | - and school_name = #{schoolName} | |
146 | - </if> | |
216 | + select STDEVP(score) from sz_learn_student | |
217 | + <where> | |
218 | + <if test="analyseId != 0"> | |
219 | + and analyse_id = #{analyseId} | |
220 | + </if> | |
221 | + <if test="schoolName != null"> | |
222 | + and school_name = #{schoolName} | |
223 | + </if> | |
224 | + <if test="schoolNames != null and schoolNames.size()>0"> | |
225 | + AND school_name IN | |
226 | + <foreach item="item" index="index" collection="schoolNames" open="(" close=")" separator=","> | |
227 | + #{item} | |
228 | + </foreach> | |
229 | + </if> | |
230 | + </where> | |
147 | 231 | </select> |
148 | 232 | </mapper> |
149 | 233 | \ No newline at end of file | ... | ... |