|
@@ -508,28 +508,29 @@ public class CreatePdfUtil {
|
|
|
String unexposedPaperType = examTaskDetail.getUnexposedPaperType();
|
|
|
//已曝光卷型
|
|
|
String exposedPaperType = examTaskDetail.getExposedPaperType();
|
|
|
- // 单次抽取套数
|
|
|
- int drawCount = examTaskDetail.getDrawCount().intValue();
|
|
|
+
|
|
|
if (drawRule == DrawRuleEnum.ONE) {
|
|
|
if (Objects.isNull(unexposedPaperType) || Objects.equals(unexposedPaperType.trim(), "")) {
|
|
|
- CreatePdfCacheUtil.deletePaperType(key);
|
|
|
+// CreatePdfCacheUtil.deletePaperType(key);
|
|
|
throw ExceptionResultEnum.PAPER_ERROR.exception();
|
|
|
}
|
|
|
} else {
|
|
|
if ((Objects.isNull(exposedPaperType) || Objects.equals(exposedPaperType.trim(), "")) && (Objects.isNull(unexposedPaperType) || Objects.equals(unexposedPaperType.trim(), ""))) {
|
|
|
- CreatePdfCacheUtil.deletePaperType(key);
|
|
|
+// CreatePdfCacheUtil.deletePaperType(key);
|
|
|
throw ExceptionResultEnum.PAPER_ERROR.exception();
|
|
|
}
|
|
|
}
|
|
|
+ // 单次抽取套数
|
|
|
+ int drawCount = examTaskDetail.getDrawCount().intValue();
|
|
|
String paperType = null;
|
|
|
- String[] paperTypes = null;
|
|
|
+ String[] paperTypes;
|
|
|
boolean lock = true;
|
|
|
for (int i = 0; i < SystemConstant.MAX_RETRY_COUNT; i++) {
|
|
|
lock = redisUtil.lock(key, SystemConstant.REDIS_CACHE_TIME_OUT);
|
|
|
if (lock) {
|
|
|
try {
|
|
|
paperType = CreatePdfCacheUtil.getPaperType(key);
|
|
|
- if (Objects.isNull(paperType) || (StringUtils.isNotBlank(unexposedPaperType) && !unexposedPaperType.contains(paperType))) {
|
|
|
+ if (StringUtils.isBlank(paperType)) {
|
|
|
if (drawRule == DrawRuleEnum.ONE) {
|
|
|
paperTypes = unexposedPaperType.split(",");
|
|
|
if (paperTypes.length - drawCount < 0) {
|