|
@@ -1,12 +1,14 @@
|
|
package cn.com.qmth.stmms.biz.report.utils.module;
|
|
package cn.com.qmth.stmms.biz.report.utils.module;
|
|
|
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
|
+import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
import net.sf.json.JSONObject;
|
|
import net.sf.json.JSONObject;
|
|
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
|
|
|
|
+import cn.com.qmth.stmms.biz.exam.dao.ExamStudentDao;
|
|
import cn.com.qmth.stmms.biz.exam.model.ExamStudent;
|
|
import cn.com.qmth.stmms.biz.exam.model.ExamStudent;
|
|
import cn.com.qmth.stmms.biz.report.model.ReportSubjectClass;
|
|
import cn.com.qmth.stmms.biz.report.model.ReportSubjectClass;
|
|
import cn.com.qmth.stmms.biz.report.service.ReportSubjectClassService;
|
|
import cn.com.qmth.stmms.biz.report.service.ReportSubjectClassService;
|
|
@@ -45,9 +47,14 @@ public class SubjectClassRangeModule implements Module {
|
|
String subjectCode = s[0];
|
|
String subjectCode = s[0];
|
|
String className = s[1];
|
|
String className = s[1];
|
|
ReportSubjectClass r = service.findOne(this.context.getExamId(), subjectCode, className);
|
|
ReportSubjectClass r = service.findOne(this.context.getExamId(), subjectCode, className);
|
|
|
|
+ ExamStudentDao studentDao = SpringContextHolder.getBean(ExamStudentDao.class);
|
|
JSONObject rangeLevel = new JSONObject();
|
|
JSONObject rangeLevel = new JSONObject();
|
|
- rangeLevel.accumulate("highScore", counter.countGeAndLt(100 - context.getHighValueConfig(), null));
|
|
|
|
- rangeLevel.accumulate("lowScore", counter.countGeAndLt(null, context.getLowValueConfig()));
|
|
|
|
|
|
+ double highCount = Math.ceil(context.getHighValueConfig() * r.getRealityCount() * 0.01);
|
|
|
|
+ double lowCount = Math.ceil(context.getLowValueConfig() * r.getRealityCount() * 0.01);
|
|
|
|
+ List<Double> highScore = studentDao.findHighCountTotalSocreByExamIdAndSubjectCodeAndClass(context.getExamId(), subjectCode,className, (int)highCount);
|
|
|
|
+ List<Double> lowScore = studentDao.findLowCountTotalSocreByExamIdAndSubjectCodeAndClass(context.getExamId(), subjectCode,className, (int)lowCount);
|
|
|
|
+ rangeLevel.accumulate("highScore", highScore.isEmpty()?0:highScore.get(highScore.size()-1));
|
|
|
|
+ rangeLevel.accumulate("lowScore", lowScore.isEmpty()?0:lowScore.get(lowScore.size()-1));
|
|
r.setRangeLevel(rangeLevel.toString());
|
|
r.setRangeLevel(rangeLevel.toString());
|
|
|
|
|
|
JSONObject scoreRange = new JSONObject();
|
|
JSONObject scoreRange = new JSONObject();
|