wangliang hai 6 meses
pai
achega
634c00fc81

+ 3 - 0
distributed-print/src/main/java/com/qmth/distributed/print/api/obe/TCPaperStructController.java

@@ -92,6 +92,9 @@ public class TCPaperStructController {
                                               @ApiParam(value = "科目编码", required = true) @RequestParam Long courseId,
                                               @ApiParam(value = "考试id") @RequestParam(required = false) Long examId,
                                               @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber) {
+        if (Objects.isNull(examId) && Objects.isNull(paperNumber)) {
+            throw ExceptionResultEnum.ERROR.exception("请先同步成绩数据再导入试卷");
+        }
         tcFinalScoreService.getLock(cultureProgramId, courseId, paperNumber, examId);
         String lockKey = SystemConstant.REDIS_PAPER_STRUCT_PREFIX + SystemConstant.IMPORT + cultureProgramId + "_" + courseId + "_" + paperNumber + "_" + examId;
         boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_PAPER_STRUCT_TIME_OUT);