|
@@ -1337,7 +1337,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
student.setAnswer(getCetAnswer(structs, pages, student.getSubjectCode()));
|
|
student.setAnswer(getCetAnswer(structs, pages, student.getSubjectCode()));
|
|
AnswerCardEntity card = getCard(cardMap, student.getExamId(), student.getCardNumber());
|
|
AnswerCardEntity card = getCard(cardMap, student.getExamId(), student.getCardNumber());
|
|
Set<String> sliceSet = new LinkedHashSet<>();
|
|
Set<String> sliceSet = new LinkedHashSet<>();
|
|
- setCardStatus(student, card, pages, pmap);
|
|
|
|
|
|
+ setCardStatus(paperTypeBarcodeContents, student, card, pages, pmap);
|
|
int index = 0;
|
|
int index = 0;
|
|
for (PaperPageCetVo p : pages) {
|
|
for (PaperPageCetVo p : pages) {
|
|
if (CollectionUtils.isNotEmpty(p.getSlicePath())) {
|
|
if (CollectionUtils.isNotEmpty(p.getSlicePath())) {
|
|
@@ -1394,13 +1394,13 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
return card;
|
|
return card;
|
|
}
|
|
}
|
|
|
|
|
|
- private void setCardStatus(ExportCetVo student, AnswerCardEntity card, List<PaperPageCetVo> pages,
|
|
|
|
- Map<Long, PaperCetVo> pmap) {
|
|
|
|
|
|
+ private void setCardStatus(List<String> paperTpeCodes, ExportCetVo student, AnswerCardEntity card,
|
|
|
|
+ List<PaperPageCetVo> pages, Map<Long, PaperCetVo> pmap) {
|
|
int subject = Integer.valueOf(student.getSubjectCode());
|
|
int subject = Integer.valueOf(student.getSubjectCode());
|
|
if (subject > 2) {
|
|
if (subject > 2) {
|
|
setCardStatusSmall(student, card, pages, pmap);
|
|
setCardStatusSmall(student, card, pages, pmap);
|
|
} else {
|
|
} else {
|
|
- setCardStatusCet(student, card, pages, pmap);
|
|
|
|
|
|
+ setCardStatusCet(paperTpeCodes, student, card, pages, pmap);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1419,14 +1419,14 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
student.setCardSecond(0);
|
|
student.setCardSecond(0);
|
|
}
|
|
}
|
|
|
|
|
|
- private void setCardStatusCet(ExportCetVo student, AnswerCardEntity card, List<PaperPageCetVo> pages,
|
|
|
|
- Map<Long, PaperCetVo> pmap) {
|
|
|
|
|
|
+ private void setCardStatusCet(List<String> paperTpeCodes, ExportCetVo student, AnswerCardEntity card,
|
|
|
|
+ List<PaperPageCetVo> pages, Map<Long, PaperCetVo> pmap) {
|
|
if (card.getPaperCount() == 1) {
|
|
if (card.getPaperCount() == 1) {
|
|
PaperPageCetVo p = pages.get(0);
|
|
PaperPageCetVo p = pages.get(0);
|
|
if (ExamStatus.ABSENT.equals(student.getExamStatus())) {
|
|
if (ExamStatus.ABSENT.equals(student.getExamStatus())) {
|
|
if (pmap.get(p.getPaperId()).getQuestionFilled()) {
|
|
if (pmap.get(p.getPaperId()).getQuestionFilled()) {
|
|
student.setCardFirst(1);
|
|
student.setCardFirst(1);
|
|
- } else if (isPaperTypeValid(p.getPaperType())) {
|
|
|
|
|
|
+ } else if (isPaperTypeValid(paperTpeCodes, p.getPaperType())) {
|
|
student.setCardFirst(7);
|
|
student.setCardFirst(7);
|
|
} else if (isPaperTypeEmpty(p.getPaperType())) {
|
|
} else if (isPaperTypeEmpty(p.getPaperType())) {
|
|
student.setCardFirst(0);
|
|
student.setCardFirst(0);
|
|
@@ -1434,7 +1434,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
student.setCardFirst(7);
|
|
student.setCardFirst(7);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- if (isPaperTypeValid(p.getPaperType())) {
|
|
|
|
|
|
+ if (isPaperTypeValid(paperTpeCodes, p.getPaperType())) {
|
|
student.setCardFirst(0);
|
|
student.setCardFirst(0);
|
|
} else {
|
|
} else {
|
|
student.setCardFirst(7);
|
|
student.setCardFirst(7);
|
|
@@ -1452,7 +1452,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
if (ExamStatus.ABSENT.equals(student.getExamStatus())) {
|
|
if (ExamStatus.ABSENT.equals(student.getExamStatus())) {
|
|
if (pmap.get(fp.getPaperId()).getQuestionFilled()) {
|
|
if (pmap.get(fp.getPaperId()).getQuestionFilled()) {
|
|
student.setCardFirst(1);
|
|
student.setCardFirst(1);
|
|
- } else if (isPaperTypeValid(fp.getPaperType())) {
|
|
|
|
|
|
+ } else if (isPaperTypeValid(paperTpeCodes, fp.getPaperType())) {
|
|
student.setCardFirst(7);
|
|
student.setCardFirst(7);
|
|
} else if (isPaperTypeEmpty(fp.getPaperType())) {
|
|
} else if (isPaperTypeEmpty(fp.getPaperType())) {
|
|
student.setCardFirst(0);
|
|
student.setCardFirst(0);
|
|
@@ -1460,7 +1460,10 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
student.setCardFirst(7);
|
|
student.setCardFirst(7);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- if (isPaperTypeValid(fp.getPaperType())) {
|
|
|
|
|
|
+ if ("考生94".equals(student.getName())) {
|
|
|
|
+ System.out.println();
|
|
|
|
+ }
|
|
|
|
+ if (isPaperTypeValid(paperTpeCodes, fp.getPaperType())) {
|
|
student.setCardFirst(0);
|
|
student.setCardFirst(0);
|
|
} else {
|
|
} else {
|
|
student.setCardFirst(7);
|
|
student.setCardFirst(7);
|
|
@@ -1469,7 +1472,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
if (ExamStatus.ABSENT.equals(student.getExamStatus())) {
|
|
if (ExamStatus.ABSENT.equals(student.getExamStatus())) {
|
|
if (pmap.get(sp.getPaperId()).getQuestionFilled()) {
|
|
if (pmap.get(sp.getPaperId()).getQuestionFilled()) {
|
|
student.setCardSecond(1);
|
|
student.setCardSecond(1);
|
|
- } else if (isPaperTypeValid(fp.getPaperType())) {
|
|
|
|
|
|
+ } else if (isPaperTypeValid(paperTpeCodes, fp.getPaperType())) {
|
|
student.setCardSecond(7);
|
|
student.setCardSecond(7);
|
|
} else if (isPaperTypeEmpty(fp.getPaperType())) {
|
|
} else if (isPaperTypeEmpty(fp.getPaperType())) {
|
|
student.setCardSecond(0);
|
|
student.setCardSecond(0);
|
|
@@ -1477,7 +1480,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
student.setCardSecond(7);
|
|
student.setCardSecond(7);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- if (isPaperTypeValid(fp.getPaperType())) {
|
|
|
|
|
|
+ if (isPaperTypeValid(paperTpeCodes, fp.getPaperType())) {
|
|
student.setCardSecond(0);
|
|
student.setCardSecond(0);
|
|
} else {
|
|
} else {
|
|
student.setCardSecond(7);
|
|
student.setCardSecond(7);
|
|
@@ -1499,7 +1502,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
- private boolean isPaperTypeValid(StringResult sr) {
|
|
|
|
|
|
+ private boolean isPaperTypeValid(List<String> paperTpeCodes, StringResult sr) {
|
|
if (sr == null) {
|
|
if (sr == null) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
@@ -1509,6 +1512,12 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
if ("#".equals(sr.getResult()) || "?".equals(sr.getResult())) {
|
|
if ("#".equals(sr.getResult()) || "?".equals(sr.getResult())) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
+ if (CollectionUtils.isEmpty(paperTpeCodes)) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ if (!paperTpeCodes.contains(sr.getResult())) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|