|
@@ -390,7 +390,26 @@ public class CreatePdfUtil {
|
|
+ "_" + examDetail.getExamPlace()
|
|
+ "_" + examDetail.getExamPlace()
|
|
+ "_" + examDetailCourse.getCourseCode()
|
|
+ "_" + examDetailCourse.getCourseCode()
|
|
+ "_" + examDetailCourse.getPaperNumber();
|
|
+ "_" + examDetailCourse.getPaperNumber();
|
|
|
|
+
|
|
|
|
+ //抽取卷型
|
|
|
|
+ DrawRuleEnum drawRule = Objects.nonNull(examPrintPlan.getDrawRule()) ? examPrintPlan.getDrawRule() : DrawRuleEnum.ONE;
|
|
|
|
+ //未曝光卷型
|
|
|
|
+ String unexposedPaperType = examTaskDetail.getUnexposedPaperType();
|
|
|
|
+ //已曝光卷型
|
|
|
|
+ String exposedPaperType = examTaskDetail.getExposedPaperType();
|
|
|
|
+ if (drawRule == DrawRuleEnum.ONE) {
|
|
|
|
+ if (Objects.isNull(unexposedPaperType)) {
|
|
|
|
+ CreatePdfCacheUtil.deletePaperType(key);
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("当前没有未曝光的卷型");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if (Objects.isNull(exposedPaperType) && Objects.isNull(unexposedPaperType)) {
|
|
|
|
+ CreatePdfCacheUtil.deletePaperType(key);
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("当前没有未曝光的卷型");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
String paperType = null;
|
|
String paperType = null;
|
|
|
|
+ String[] paperTypes = null;
|
|
boolean lock = true;
|
|
boolean lock = true;
|
|
for (int i = 0; i < SystemConstant.MAX_RETRY_COUNT; i++) {
|
|
for (int i = 0; i < SystemConstant.MAX_RETRY_COUNT; i++) {
|
|
lock = redisUtil.lock(key, SystemConstant.REDIS_CACHE_TIME_OUT);
|
|
lock = redisUtil.lock(key, SystemConstant.REDIS_CACHE_TIME_OUT);
|
|
@@ -398,23 +417,9 @@ public class CreatePdfUtil {
|
|
try {
|
|
try {
|
|
paperType = CreatePdfCacheUtil.getPaperType(key);
|
|
paperType = CreatePdfCacheUtil.getPaperType(key);
|
|
if (Objects.isNull(paperType)) {
|
|
if (Objects.isNull(paperType)) {
|
|
- //抽取卷型
|
|
|
|
- DrawRuleEnum drawRule = Objects.nonNull(examPrintPlan.getDrawRule()) ? examPrintPlan.getDrawRule() : DrawRuleEnum.ONE;
|
|
|
|
- //未曝光卷型
|
|
|
|
- String unexposedPaperType = examTaskDetail.getUnexposedPaperType();
|
|
|
|
- //已曝光卷型
|
|
|
|
- String exposedPaperType = examTaskDetail.getExposedPaperType();
|
|
|
|
- String[] paperTypes = null;
|
|
|
|
if (drawRule == DrawRuleEnum.ONE) {
|
|
if (drawRule == DrawRuleEnum.ONE) {
|
|
- if (Objects.isNull(unexposedPaperType)) {
|
|
|
|
- throw ExceptionResultEnum.ERROR.exception("当前没有未曝光的卷型");
|
|
|
|
- } else {
|
|
|
|
- paperTypes = unexposedPaperType.split(",");
|
|
|
|
- }
|
|
|
|
|
|
+ paperTypes = unexposedPaperType.split(",");
|
|
} else {
|
|
} else {
|
|
- if (Objects.isNull(exposedPaperType) && Objects.isNull(unexposedPaperType)) {
|
|
|
|
- throw ExceptionResultEnum.ERROR.exception("当前没有未曝光的卷型");
|
|
|
|
- }
|
|
|
|
if (Objects.nonNull(unexposedPaperType)) {
|
|
if (Objects.nonNull(unexposedPaperType)) {
|
|
paperTypes = unexposedPaperType.split(",");
|
|
paperTypes = unexposedPaperType.split(",");
|
|
} else {
|
|
} else {
|