|
@@ -57,11 +57,12 @@ public class ScoreExporter {
|
|
|
SqlUtil sqlUtil;
|
|
|
|
|
|
private int level = 4,//动态报表开始列固定从4开始
|
|
|
+ score = 6,//打分报表固定从6开始
|
|
|
levelInterval = 2,//分档列固定从2开始
|
|
|
scoreInterval = 1;//分数列固定从1开始
|
|
|
|
|
|
private final String LEADER = "科组长定档",
|
|
|
- AVG_SOCRE = "平均成绩",
|
|
|
+ AVG_SOCRE = "最终成绩",
|
|
|
FINAL = "最终档位",
|
|
|
UPLOAD = "是否上传",
|
|
|
MISSING = "是否缺考",
|
|
@@ -72,6 +73,8 @@ public class ScoreExporter {
|
|
|
EXAM_NUMBER = "准考证号",
|
|
|
NAME = "姓名",
|
|
|
AREA_NAME = "考区",
|
|
|
+ SCHOOL = "学校",
|
|
|
+ EXAM_ROOM = "考场",
|
|
|
SOURCE_NAME = "生源地",
|
|
|
SC_NAME = "色彩",
|
|
|
SM_NAME = "素描",
|
|
@@ -173,7 +176,7 @@ public class ScoreExporter {
|
|
|
index.getAndIncrement();
|
|
|
drawExcelFixedHead(sheet, style, row, new HeaderNode(SHIFT, 1, 1, index.get(), index.get()));
|
|
|
} else if (type == 1) {//type为1:分数报表
|
|
|
- //平均成绩
|
|
|
+ //最终成绩
|
|
|
drawExcelFixedHead(sheet, style, row, new HeaderNode(AVG_SOCRE, 1, 1, index.get(), index.get()));
|
|
|
}
|
|
|
}
|
|
@@ -226,12 +229,26 @@ public class ScoreExporter {
|
|
|
CellRangeAddress region3 = new CellRangeAddress(0, 1, (short) 2, (short) 2);
|
|
|
sheet.addMergedRegion(region3);
|
|
|
sheet.setColumnWidth(2, 30 * 256);
|
|
|
- //生源地
|
|
|
+ //学校
|
|
|
Cell cell3 = row.createCell(3);
|
|
|
- cell3.setCellValue(SOURCE_NAME);
|
|
|
+ cell3.setCellValue(SCHOOL);
|
|
|
cell3.setCellStyle(style);
|
|
|
CellRangeAddress region4 = new CellRangeAddress(0, 1, (short) 3, (short) 3);
|
|
|
sheet.addMergedRegion(region4);
|
|
|
+ sheet.setColumnWidth(3, 30 * 256);
|
|
|
+ //考场
|
|
|
+ Cell cell4 = row.createCell(4);
|
|
|
+ cell4.setCellValue(EXAM_ROOM);
|
|
|
+ cell4.setCellStyle(style);
|
|
|
+ CellRangeAddress region5 = new CellRangeAddress(0, 1, (short) 4, (short) 4);
|
|
|
+ sheet.addMergedRegion(region5);
|
|
|
+ sheet.setColumnWidth(4, 30 * 256);
|
|
|
+ //生源地
|
|
|
+ Cell cell5 = row.createCell(5);
|
|
|
+ cell5.setCellValue(SOURCE_NAME);
|
|
|
+ cell5.setCellStyle(style);
|
|
|
+ CellRangeAddress region6 = new CellRangeAddress(0, 1, (short) 5, (short) 5);
|
|
|
+ sheet.addMergedRegion(region6);
|
|
|
if (!imageConfig.isCustomSubject()) {
|
|
|
//色彩
|
|
|
int size = 0;
|
|
@@ -240,18 +257,18 @@ public class ScoreExporter {
|
|
|
}
|
|
|
int scSumCount = 0;
|
|
|
if (type == 2) {
|
|
|
- scSumCount = level + size + 5;
|
|
|
+ scSumCount = score + size + 7;
|
|
|
} else {
|
|
|
- scSumCount = level + size;
|
|
|
+ scSumCount = score + size;
|
|
|
}
|
|
|
- Cell cell4 = row.createCell(level);
|
|
|
- cell4.setCellValue(SC_NAME);
|
|
|
- cell4.setCellStyle(style);
|
|
|
- if (level != scSumCount) {
|
|
|
- CellRangeAddress region5 = new CellRangeAddress(0, 0, (short) level, scSumCount);
|
|
|
- sheet.addMergedRegion(region5);
|
|
|
+ Cell cell6 = row.createCell(score);
|
|
|
+ cell6.setCellValue(SC_NAME);
|
|
|
+ cell6.setCellStyle(style);
|
|
|
+ if (score != scSumCount) {
|
|
|
+ CellRangeAddress region7 = new CellRangeAddress(0, 0, (short) score, scSumCount);
|
|
|
+ sheet.addMergedRegion(region7);
|
|
|
}
|
|
|
- LOGGER.info("level:{},scSumCount:{}", level, scSumCount);
|
|
|
+ LOGGER.info("level:{},scSumCount:{}", score, scSumCount);
|
|
|
|
|
|
//素描
|
|
|
scSumCount = scSumCount + 1;//起始列+1
|
|
@@ -261,16 +278,16 @@ public class ScoreExporter {
|
|
|
}
|
|
|
int smSumCount = 0;
|
|
|
if (type == 2) {
|
|
|
- smSumCount = scSumCount + size + 5;//最终列+1,因为从0开始
|
|
|
+ smSumCount = scSumCount + size + 7;//最终列+1,因为从0开始
|
|
|
} else {
|
|
|
smSumCount = scSumCount + size;
|
|
|
}
|
|
|
- Cell cell5 = row.createCell(scSumCount);
|
|
|
- cell5.setCellValue(SM_NAME);
|
|
|
- cell5.setCellStyle(style);
|
|
|
+ Cell cell7 = row.createCell(scSumCount);
|
|
|
+ cell7.setCellValue(SM_NAME);
|
|
|
+ cell7.setCellStyle(style);
|
|
|
if (scSumCount != smSumCount) {
|
|
|
- CellRangeAddress region6 = new CellRangeAddress(0, 0, (short) scSumCount, smSumCount);
|
|
|
- sheet.addMergedRegion(region6);
|
|
|
+ CellRangeAddress region8 = new CellRangeAddress(0, 0, (short) scSumCount, smSumCount);
|
|
|
+ sheet.addMergedRegion(region8);
|
|
|
}
|
|
|
LOGGER.info("scSumCount:{},smSumCount:{}", scSumCount, smSumCount);
|
|
|
//速写
|
|
@@ -281,16 +298,16 @@ public class ScoreExporter {
|
|
|
}
|
|
|
int sxSumCount = 0;
|
|
|
if (type == 2) {
|
|
|
- sxSumCount = smSumCount + size + 5;//最终列+1,因为从0开始
|
|
|
+ sxSumCount = smSumCount + size + 7;//最终列+1,因为从0开始
|
|
|
} else {
|
|
|
sxSumCount = smSumCount + size;
|
|
|
}
|
|
|
- Cell cell6 = row.createCell(smSumCount);
|
|
|
- cell6.setCellValue(SX_NAME);
|
|
|
- cell6.setCellStyle(style);
|
|
|
+ Cell cell8 = row.createCell(smSumCount);
|
|
|
+ cell8.setCellValue(SX_NAME);
|
|
|
+ cell8.setCellStyle(style);
|
|
|
if (smSumCount != sxSumCount) {
|
|
|
- CellRangeAddress region7 = new CellRangeAddress(0, 0, (short) smSumCount, sxSumCount);
|
|
|
- sheet.addMergedRegion(region7);
|
|
|
+ CellRangeAddress region9 = new CellRangeAddress(0, 0, (short) smSumCount, sxSumCount);
|
|
|
+ sheet.addMergedRegion(region9);
|
|
|
}
|
|
|
LOGGER.info("smSumCount:{},sxSumCount:{}", smSumCount, sxSumCount);
|
|
|
} else {
|
|
@@ -301,19 +318,19 @@ public class ScoreExporter {
|
|
|
}
|
|
|
int customSumCount = 0;
|
|
|
if (type == 2) {
|
|
|
- customSumCount = level + size + 1;
|
|
|
+ customSumCount = score + size + 1;
|
|
|
} else {
|
|
|
- customSumCount = level + size;
|
|
|
+ customSumCount = score + size;
|
|
|
}
|
|
|
MarkSubject markSubject = markSubjectRepo.findOne(workId + "-" + Subject.CUSTOM.name());
|
|
|
- Cell cell4 = row.createCell(level);
|
|
|
- cell4.setCellValue(markSubject.getName());
|
|
|
- cell4.setCellStyle(style);
|
|
|
- if (level != customSumCount) {
|
|
|
- CellRangeAddress region5 = new CellRangeAddress(0, 0, (short) level, customSumCount);
|
|
|
- sheet.addMergedRegion(region5);
|
|
|
+ Cell cell6 = row.createCell(score);
|
|
|
+ cell6.setCellValue(markSubject.getName());
|
|
|
+ cell6.setCellStyle(style);
|
|
|
+ if (score != customSumCount) {
|
|
|
+ CellRangeAddress region7 = new CellRangeAddress(0, 0, (short) score, customSumCount);
|
|
|
+ sheet.addMergedRegion(region7);
|
|
|
}
|
|
|
- LOGGER.info("level:{},customSumCount:{}", level, customSumCount);
|
|
|
+ LOGGER.info("level:{},customSumCount:{}", score, customSumCount);
|
|
|
}
|
|
|
return sheet;
|
|
|
}
|
|
@@ -505,9 +522,9 @@ public class ScoreExporter {
|
|
|
//测试-导出分数成绩表
|
|
|
StringBuilder sbAll = null;
|
|
|
if (!imageConfig.isCustomSubject()) {
|
|
|
- String scSql = "select temp.*, IFNULL(mt.`result`,0) as result, p.source_name as sourceName, p.exam_number as examNumber, p.student_name as studentName, t.area_name as areaName, IFNULL(p.score,0) as level,p.mark_by_leader as markByLeader from mark_task as mt , (select mu.id, mu.name as teacherName, mu.`role`, mu.subject, mu.work_id as workId from mark_user as mu where mu.work_id = ? and mu.`role` = 'MARKER'and (mu.mark_right = 1 or mu.mark_right = 2) and mu.subject = 'SC'and mu.enabled = 1) temp, paper p, student t where mt.marker_id = temp.id and mt.paper_id = p.id and t.exam_number = p.exam_number and mt.work_id = ? and mt.stage = 2 and p.is_missing = false UNION ALL select temp.*, 0 as result, p.source_name as sourceName, p.exam_number as examNumber, p.student_name as studentName, t.area_name as areaName, IFNULL(p.score,0) as level, p.mark_by_leader as markByLeader from paper p, (select mu.id, mu.name as teacherName, mu.`role`, mu.subject, mu.work_id as workId from mark_user as mu where mu.work_id = ? and mu.`role` = 'MARKER' and (mu.mark_right = 1 or mu.mark_right = 2) and mu.subject = 'SC' and mu.enabled = 1) temp, student t where p.is_missing = true and p.work_id = ? and p.subject = 'SC' and t.exam_number = p.exam_number ";
|
|
|
- String smSql = "select temp.*, IFNULL(mt.`result`,0) as result, p.source_name as sourceName, p.exam_number as examNumber, p.student_name as studentName, t.area_name as areaName, IFNULL(p.score,0) as level,p.mark_by_leader as markByLeader from mark_task as mt , (select mu.id, mu.name as teacherName, mu.`role`, mu.subject, mu.work_id as workId from mark_user as mu where mu.work_id = ? and mu.`role` = 'MARKER'and (mu.mark_right = 1 or mu.mark_right = 2) and mu.subject = 'SM'and mu.enabled = 1) temp, paper p, student t where mt.marker_id = temp.id and mt.paper_id = p.id and t.exam_number = p.exam_number and mt.work_id = ? and mt.stage = 2 and p.is_missing = false UNION ALL select temp.*, 0 as result, p.source_name as sourceName, p.exam_number as examNumber, p.student_name as studentName, t.area_name as areaName, IFNULL(p.score,0) as level, p.mark_by_leader as markByLeader from paper p, (select mu.id, mu.name as teacherName, mu.`role`, mu.subject, mu.work_id as workId from mark_user as mu where mu.work_id = ? and mu.`role` = 'MARKER' and (mu.mark_right = 1 or mu.mark_right = 2) and mu.subject = 'SM' and mu.enabled = 1) temp, student t where p.is_missing = true and p.work_id = ? and p.subject = 'SM' and t.exam_number = p.exam_number ";
|
|
|
- String sxSql = "select temp.*, IFNULL(mt.`result`,0) as result, p.source_name as sourceName, p.exam_number as examNumber, p.student_name as studentName, t.area_name as areaName, IFNULL(p.score,0) as level,p.mark_by_leader as markByLeader from mark_task as mt , (select mu.id, mu.name as teacherName, mu.`role`, mu.subject, mu.work_id as workId from mark_user as mu where mu.work_id = ? and mu.`role` = 'MARKER'and (mu.mark_right = 1 or mu.mark_right = 2) and mu.subject = 'SX'and mu.enabled = 1) temp, paper p, student t where mt.marker_id = temp.id and mt.paper_id = p.id and t.exam_number = p.exam_number and mt.work_id = ? and mt.stage = 2 and p.is_missing = false UNION ALL select temp.*, 0 as result, p.source_name as sourceName, p.exam_number as examNumber, p.student_name as studentName, t.area_name as areaName, IFNULL(p.score,0) as level, p.mark_by_leader as markByLeader from paper p, (select mu.id, mu.name as teacherName, mu.`role`, mu.subject, mu.work_id as workId from mark_user as mu where mu.work_id = ? and mu.`role` = 'MARKER' and (mu.mark_right = 1 or mu.mark_right = 2) and mu.subject = 'SX' and mu.enabled = 1) temp, student t where p.is_missing = true and p.work_id = ? and p.subject = 'SX' and t.exam_number = p.exam_number ";
|
|
|
+ String scSql = "select temp.*, IFNULL(mt.`result`,0) as result, p.source_name as sourceName, p.exam_number as examNumber, p.student_name as studentName, t.area_name as areaName, t.school, t.exam_room examRoom, IFNULL(p.score,0) as level,p.mark_by_leader as markByLeader from mark_task as mt , (select mu.id, mu.name as teacherName, mu.`role`, mu.subject, mu.work_id as workId from mark_user as mu where mu.work_id = ? and mu.`role` = 'MARKER'and (mu.mark_right = 1 or mu.mark_right = 2) and mu.subject = 'SC'and mu.enabled = 1) temp, paper p, student t where mt.marker_id = temp.id and mt.paper_id = p.id and t.exam_number = p.exam_number and mt.work_id = ? and mt.stage = 2 and p.is_missing = false UNION ALL select temp.*, 0 as result, p.source_name as sourceName, p.exam_number as examNumber, p.student_name as studentName, t.area_name as areaName, t.school, t.exam_room examRoom, IFNULL(p.score,0) as level, p.mark_by_leader as markByLeader from paper p, (select mu.id, mu.name as teacherName, mu.`role`, mu.subject, mu.work_id as workId from mark_user as mu where mu.work_id = ? and mu.`role` = 'MARKER' and (mu.mark_right = 1 or mu.mark_right = 2) and mu.subject = 'SC' and mu.enabled = 1) temp, student t where p.is_missing = true and p.work_id = ? and p.subject = 'SC' and t.exam_number = p.exam_number ";
|
|
|
+ String smSql = "select temp.*, IFNULL(mt.`result`,0) as result, p.source_name as sourceName, p.exam_number as examNumber, p.student_name as studentName, t.area_name as areaName, t.school, t.exam_room examRoom, IFNULL(p.score,0) as level,p.mark_by_leader as markByLeader from mark_task as mt , (select mu.id, mu.name as teacherName, mu.`role`, mu.subject, mu.work_id as workId from mark_user as mu where mu.work_id = ? and mu.`role` = 'MARKER'and (mu.mark_right = 1 or mu.mark_right = 2) and mu.subject = 'SM'and mu.enabled = 1) temp, paper p, student t where mt.marker_id = temp.id and mt.paper_id = p.id and t.exam_number = p.exam_number and mt.work_id = ? and mt.stage = 2 and p.is_missing = false UNION ALL select temp.*, 0 as result, p.source_name as sourceName, p.exam_number as examNumber, p.student_name as studentName, t.area_name as areaName, t.school, t.exam_room examRoom, IFNULL(p.score,0) as level, p.mark_by_leader as markByLeader from paper p, (select mu.id, mu.name as teacherName, mu.`role`, mu.subject, mu.work_id as workId from mark_user as mu where mu.work_id = ? and mu.`role` = 'MARKER' and (mu.mark_right = 1 or mu.mark_right = 2) and mu.subject = 'SM' and mu.enabled = 1) temp, student t where p.is_missing = true and p.work_id = ? and p.subject = 'SM' and t.exam_number = p.exam_number ";
|
|
|
+ String sxSql = "select temp.*, IFNULL(mt.`result`,0) as result, p.source_name as sourceName, p.exam_number as examNumber, p.student_name as studentName, t.area_name as areaName, t.school, t.exam_room examRoom, IFNULL(p.score,0) as level,p.mark_by_leader as markByLeader from mark_task as mt , (select mu.id, mu.name as teacherName, mu.`role`, mu.subject, mu.work_id as workId from mark_user as mu where mu.work_id = ? and mu.`role` = 'MARKER'and (mu.mark_right = 1 or mu.mark_right = 2) and mu.subject = 'SX'and mu.enabled = 1) temp, paper p, student t where mt.marker_id = temp.id and mt.paper_id = p.id and t.exam_number = p.exam_number and mt.work_id = ? and mt.stage = 2 and p.is_missing = false UNION ALL select temp.*, 0 as result, p.source_name as sourceName, p.exam_number as examNumber, p.student_name as studentName, t.area_name as areaName, t.school, t.exam_room examRoom, IFNULL(p.score,0) as level, p.mark_by_leader as markByLeader from paper p, (select mu.id, mu.name as teacherName, mu.`role`, mu.subject, mu.work_id as workId from mark_user as mu where mu.work_id = ? and mu.`role` = 'MARKER' and (mu.mark_right = 1 or mu.mark_right = 2) and mu.subject = 'SX' and mu.enabled = 1) temp, student t where p.is_missing = true and p.work_id = ? and p.subject = 'SX' and t.exam_number = p.exam_number ";
|
|
|
//拼装问号
|
|
|
scSql = sqlUtil.sqlPrint(scSql, workId, workId, workId, workId);
|
|
|
smSql = sqlUtil.sqlPrint(smSql, workId, workId, workId, workId);
|
|
@@ -517,7 +534,7 @@ public class ScoreExporter {
|
|
|
sbAll = new StringBuilder(sqlUtil.sqlUnionAll(sbAll.toString()));//union all
|
|
|
sbAll = sbAll.append(sxSql);
|
|
|
} else {
|
|
|
- String customSql = "select temp.*, IFNULL(mt.`result`,0) as result, p.source_name as sourceName, p.exam_number as examNumber, p.student_name as studentName, t.area_name as areaName, IFNULL(p.score,0) as level,p.mark_by_leader as markByLeader from mark_task as mt , (select mu.id, mu.name as teacherName, mu.`role`, mu.subject, mu.work_id as workId from mark_user as mu where mu.work_id = ? and mu.`role` = 'MARKER'and (mu.mark_right = 1 or mu.mark_right = 2) and mu.subject = 'CUSTOM'and mu.enabled = 1) temp, paper p, student t where mt.marker_id = temp.id and mt.paper_id = p.id and t.exam_number = p.exam_number and mt.work_id = ? and mt.stage = 2 and p.is_missing = false UNION ALL select temp.*, 0 as result, p.source_name as sourceName, p.exam_number as examNumber, p.student_name as studentName, t.area_name as areaName, IFNULL(p.score,0) as level, p.mark_by_leader as markByLeader from paper p, (select mu.id, mu.name as teacherName, mu.`role`, mu.subject, mu.work_id as workId from mark_user as mu where mu.work_id = ? and mu.`role` = 'MARKER' and (mu.mark_right = 1 or mu.mark_right = 2) and mu.subject = 'CUSTOM' and mu.enabled = 1) temp, student t where p.is_missing = true and p.work_id = ? and p.subject = 'CUSTOM' and t.exam_number = p.exam_number ";
|
|
|
+ String customSql = "select temp.*, IFNULL(mt.`result`,0) as result, p.source_name as sourceName, p.exam_number as examNumber, p.student_name as studentName, t.area_name as areaName, t.school, t.exam_room examRoom, IFNULL(p.score,0) as level,p.mark_by_leader as markByLeader from mark_task as mt , (select mu.id, mu.name as teacherName, mu.`role`, mu.subject, mu.work_id as workId from mark_user as mu where mu.work_id = ? and mu.`role` = 'MARKER'and (mu.mark_right = 1 or mu.mark_right = 2) and mu.subject = 'CUSTOM'and mu.enabled = 1) temp, paper p, student t where mt.marker_id = temp.id and mt.paper_id = p.id and t.exam_number = p.exam_number and mt.work_id = ? and mt.stage = 2 and p.is_missing = false UNION ALL select temp.*, 0 as result, p.source_name as sourceName, p.exam_number as examNumber, p.student_name as studentName, t.area_name as areaName, t.school, t.exam_room examRoom, IFNULL(p.score,0) as level, p.mark_by_leader as markByLeader from paper p, (select mu.id, mu.name as teacherName, mu.`role`, mu.subject, mu.work_id as workId from mark_user as mu where mu.work_id = ? and mu.`role` = 'MARKER' and (mu.mark_right = 1 or mu.mark_right = 2) and mu.subject = 'CUSTOM' and mu.enabled = 1) temp, student t where p.is_missing = true and p.work_id = ? and p.subject = 'CUSTOM' and t.exam_number = p.exam_number ";
|
|
|
customSql = sqlUtil.sqlPrint(customSql, workId, workId, workId, workId);
|
|
|
sbAll = new StringBuilder(customSql);
|
|
|
}
|
|
@@ -548,19 +565,19 @@ public class ScoreExporter {
|
|
|
Map<String, ExportLevelResultDTO> scMap = subjectMap.get(Subject.SC.toString());
|
|
|
int size = 0;
|
|
|
if (Objects.nonNull(scMap) && scMap.size() > 0) {
|
|
|
- drawExcelTeacher(scoreInterval, scMap, sheet, style, dynamicHeadRow, new AtomicInteger(level));
|
|
|
+ drawExcelTeacher(scoreInterval, scMap, sheet, style, dynamicHeadRow, new AtomicInteger(score));
|
|
|
size = scMap.size();
|
|
|
}
|
|
|
//SM表头
|
|
|
Map<String, ExportLevelResultDTO> smMap = subjectMap.get(Subject.SM.toString());
|
|
|
if (Objects.nonNull(smMap) && smMap.size() > 0) {
|
|
|
- drawExcelTeacher(scoreInterval, smMap, sheet, style, dynamicHeadRow, new AtomicInteger(level + size + scoreInterval));
|
|
|
+ drawExcelTeacher(scoreInterval, smMap, sheet, style, dynamicHeadRow, new AtomicInteger(score + size + scoreInterval));
|
|
|
size = size + smMap.size();
|
|
|
}
|
|
|
//SX表头
|
|
|
Map<String, ExportLevelResultDTO> sxMap = subjectMap.get(Subject.SX.toString());
|
|
|
if (Objects.nonNull(sxMap) && sxMap.size() > 0) {
|
|
|
- drawExcelTeacher(scoreInterval, sxMap, sheet, style, dynamicHeadRow, new AtomicInteger(level + size + scoreInterval * 2));
|
|
|
+ drawExcelTeacher(scoreInterval, sxMap, sheet, style, dynamicHeadRow, new AtomicInteger(score + size + scoreInterval * 2));
|
|
|
}
|
|
|
//加载excel数据
|
|
|
AtomicInteger cellIndex = new AtomicInteger(0);
|
|
@@ -577,6 +594,10 @@ public class ScoreExporter {
|
|
|
cellIndex.getAndIncrement();
|
|
|
drawExcelFixedHead(finalSheet, style, hssfRow, new HeaderNode(listv.getAreaName(), firstRow, firstRow, cellIndex.get(), cellIndex.get()));
|
|
|
cellIndex.getAndIncrement();
|
|
|
+ drawExcelFixedHead(finalSheet, style, hssfRow, new HeaderNode(listv.getSchool(), firstRow, firstRow, cellIndex.get(), cellIndex.get()));
|
|
|
+ cellIndex.getAndIncrement();
|
|
|
+ drawExcelFixedHead(finalSheet, style, hssfRow, new HeaderNode(listv.getExamRoom(), firstRow, firstRow, cellIndex.get(), cellIndex.get()));
|
|
|
+ cellIndex.getAndIncrement();
|
|
|
drawExcelFixedHead(finalSheet, style, hssfRow, new HeaderNode(listv.getSourceName(), firstRow, firstRow, cellIndex.get(), cellIndex.get()));
|
|
|
cellIndex.getAndIncrement();
|
|
|
Map<String, ExportLevelResultDTO> map = studentAnswerMap.get(listv.getExamNumber());
|
|
@@ -586,19 +607,19 @@ public class ScoreExporter {
|
|
|
ExportLevelResultDTO exportLevelResultDTO = scMap.get(v.getTeacherName());
|
|
|
drawExcelFixedHead(finalSheet, style, hssfRow, new HeaderNode(v.getResult(), firstRow, firstRow, exportLevelResultDTO.getFirstCol(), exportLevelResultDTO.getFirstCol()));
|
|
|
if (Objects.nonNull(v.getLevel())) {
|
|
|
- drawExcelFixedHead(finalSheet, style, hssfRow, new HeaderNode(v.getLevel(), firstRow, firstRow, level + (scMap == null ? 0 : scMap.size()), level + (scMap == null ? 0 : scMap.size())));
|
|
|
+ drawExcelFixedHead(finalSheet, style, hssfRow, new HeaderNode(v.getLevel(), firstRow, firstRow, score + (scMap == null ? 0 : scMap.size()), score + (scMap == null ? 0 : scMap.size())));
|
|
|
}
|
|
|
} else if (k.contains(Subject.SM.toString())) {
|
|
|
ExportLevelResultDTO exportLevelResultDTO = smMap.get(v.getTeacherName());
|
|
|
drawExcelFixedHead(finalSheet, style, hssfRow, new HeaderNode(v.getResult(), firstRow, firstRow, exportLevelResultDTO.getFirstCol(), exportLevelResultDTO.getFirstCol()));
|
|
|
if (Objects.nonNull(v.getLevel())) {
|
|
|
- drawExcelFixedHead(finalSheet, style, hssfRow, new HeaderNode(v.getLevel(), firstRow, firstRow, level + (scMap == null ? 0 : scMap.size()) + (smMap == null ? 0 : smMap.size()) + scoreInterval, level + (scMap == null ? 0 : scMap.size()) + (smMap == null ? 0 : smMap.size()) + scoreInterval));
|
|
|
+ drawExcelFixedHead(finalSheet, style, hssfRow, new HeaderNode(v.getLevel(), firstRow, firstRow, score + (scMap == null ? 0 : scMap.size()) + (smMap == null ? 0 : smMap.size()) + scoreInterval, score + (scMap == null ? 0 : scMap.size()) + (smMap == null ? 0 : smMap.size()) + scoreInterval));
|
|
|
}
|
|
|
} else if (k.contains(Subject.SX.toString())) {
|
|
|
ExportLevelResultDTO exportLevelResultDTO = sxMap.get(v.getTeacherName());
|
|
|
drawExcelFixedHead(finalSheet, style, hssfRow, new HeaderNode(v.getResult(), firstRow, firstRow, exportLevelResultDTO.getFirstCol(), exportLevelResultDTO.getFirstCol()));
|
|
|
if (Objects.nonNull(v.getLevel())) {
|
|
|
- drawExcelFixedHead(finalSheet, style, hssfRow, new HeaderNode(v.getLevel(), firstRow, firstRow, level + (scMap == null ? 0 : scMap.size()) + (smMap == null ? 0 : smMap.size()) + (sxMap == null ? 0 : sxMap.size()) + scoreInterval * 2, level + (scMap == null ? 0 : scMap.size()) + (smMap == null ? 0 : smMap.size()) + (sxMap == null ? 0 : sxMap.size()) + scoreInterval * 2));
|
|
|
+ drawExcelFixedHead(finalSheet, style, hssfRow, new HeaderNode(v.getLevel(), firstRow, firstRow, score + (scMap == null ? 0 : scMap.size()) + (smMap == null ? 0 : smMap.size()) + (sxMap == null ? 0 : sxMap.size()) + scoreInterval * 2, score + (scMap == null ? 0 : scMap.size()) + (smMap == null ? 0 : smMap.size()) + (sxMap == null ? 0 : sxMap.size()) + scoreInterval * 2));
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -669,10 +690,10 @@ public class ScoreExporter {
|
|
|
subjectMap.put(exportLevelResultDTO.getSubject(), m);
|
|
|
}
|
|
|
if (studentAnswerMap.containsKey(exportLevelResultDTO.getExamNumber())) {
|
|
|
- studentAnswerMap.get(exportLevelResultDTO.getExamNumber()).put(exportLevelResultDTO.getSubject() + ":" + exportLevelResultDTO.getTeacherName(), new ExportLevelResultDTO(exportLevelResultDTO.getResult(), exportLevelResultDTO.getMarkByLeader(), exportLevelResultDTO.getLevel(), exportLevelResultDTO.getTeacherName(), exportLevelResultDTO.getUpload(), exportLevelResultDTO.getMissing(), exportLevelResultDTO.getSample(), exportLevelResultDTO.getOneClick(), exportLevelResultDTO.getIsShift()));
|
|
|
+ studentAnswerMap.get(exportLevelResultDTO.getExamNumber()).put(exportLevelResultDTO.getSubject() + ":" + exportLevelResultDTO.getTeacherName(), new ExportLevelResultDTO(exportLevelResultDTO.getResult(), exportLevelResultDTO.getMarkByLeader(), exportLevelResultDTO.getLevel(), exportLevelResultDTO.getTeacherName(), exportLevelResultDTO.getUpload(), exportLevelResultDTO.getMissing(), exportLevelResultDTO.getSample(), exportLevelResultDTO.getOneClick(), exportLevelResultDTO.getIsShift(), exportLevelResultDTO.getSchool(), exportLevelResultDTO.getExamRoom()));
|
|
|
} else {
|
|
|
Map<String, ExportLevelResultDTO> m = new HashMap<>();
|
|
|
- m.put(exportLevelResultDTO.getSubject() + ":" + exportLevelResultDTO.getTeacherName(), new ExportLevelResultDTO(exportLevelResultDTO.getResult(), exportLevelResultDTO.getMarkByLeader(), exportLevelResultDTO.getLevel(), exportLevelResultDTO.getTeacherName(), exportLevelResultDTO.getUpload(), exportLevelResultDTO.getMissing(), exportLevelResultDTO.getSample(), exportLevelResultDTO.getOneClick(), exportLevelResultDTO.getIsShift()));
|
|
|
+ m.put(exportLevelResultDTO.getSubject() + ":" + exportLevelResultDTO.getTeacherName(), new ExportLevelResultDTO(exportLevelResultDTO.getResult(), exportLevelResultDTO.getMarkByLeader(), exportLevelResultDTO.getLevel(), exportLevelResultDTO.getTeacherName(), exportLevelResultDTO.getUpload(), exportLevelResultDTO.getMissing(), exportLevelResultDTO.getSample(), exportLevelResultDTO.getOneClick(), exportLevelResultDTO.getIsShift(), exportLevelResultDTO.getSchool(), exportLevelResultDTO.getExamRoom()));
|
|
|
studentAnswerMap.put(exportLevelResultDTO.getExamNumber(), m);
|
|
|
}
|
|
|
}
|