|
@@ -113,7 +113,7 @@ public class ReportSubjectRangeController extends BaseExamController {
|
|
|
int examId = getSessionExamId(request);
|
|
|
List<ExamSubject> sList = getExamSubject(examId, wu);
|
|
|
if (StringUtils.isNotBlank(query.getSubjectCode()) && query.getRange() != null) {
|
|
|
- if (query.getObjective()) {
|
|
|
+ if (query.getObjective()!=null && query.getObjective()) {
|
|
|
ReportSubjectRange subjectRange = reportSubjectRangeService.findOne(examId, query.getSubjectCode());
|
|
|
if (subjectRange != null && subjectRange.getObjectiveScoreRange() != null
|
|
|
&& subjectRange.getObjectiveScore() != null && subjectRange.getRealityCount() != null) {
|
|
@@ -130,6 +130,9 @@ public class ReportSubjectRangeController extends BaseExamController {
|
|
|
}
|
|
|
model.addAttribute("locked",
|
|
|
lockService.isLocked(LockType.SCORE_CALCULATE, examId, query.getSubjectCode()));
|
|
|
+ model.addAttribute("showObjective",subjectService.find(examId,query.getSubjectCode()).getObjectiveScore()>0);
|
|
|
+ }else if(!sList.isEmpty()){
|
|
|
+ model.addAttribute("showObjective",sList.get(0).getObjectiveScore()>0);
|
|
|
}
|
|
|
model.addAttribute("oldSubjectCode", query.getSubjectCode());
|
|
|
model.addAttribute("subjectList", sList);
|
|
@@ -191,6 +194,10 @@ public class ReportSubjectRangeController extends BaseExamController {
|
|
|
writer.write(new ByteArrayInputStream(subjective), subjectName, "主观题分析.xlsx");
|
|
|
byte[] group = fileService.downloadReport(examId, subjectName, "分组统计分析", FormatType.XLSX);
|
|
|
writer.write(new ByteArrayInputStream(group), subjectName, "分组统计分析.xlsx");
|
|
|
+ if(fileService.reportExist(examId, subjectName, "课程客观题分段统计", FormatType.XLSX)){
|
|
|
+ byte[] objectiveRange = fileService.downloadReport(examId, subjectName, "课程客观题分段统计", FormatType.XLSX);
|
|
|
+ writer.write(new ByteArrayInputStream(objectiveRange), subjectName, "课程客观题分段统计.xlsx");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -208,10 +215,10 @@ public class ReportSubjectRangeController extends BaseExamController {
|
|
|
Map<Integer, Set<String>> map = new HashMap<Integer, Set<String>>();
|
|
|
map.put(examId, subjectSet);
|
|
|
if (objective) {
|
|
|
- ScoreReportThread thread = new ScoreReportThread(map, reportService, false);
|
|
|
+ ScoreReportObjectiveThread thread = new ScoreReportObjectiveThread(map, reportService, false);
|
|
|
taskExecutor.submit(thread);
|
|
|
} else {
|
|
|
- ScoreReportObjectiveThread thread = new ScoreReportObjectiveThread(map, reportService, false);
|
|
|
+ ScoreReportThread thread = new ScoreReportThread(map, reportService, false);
|
|
|
taskExecutor.submit(thread);
|
|
|
}
|
|
|
}
|