|
@@ -115,6 +115,10 @@ public class TCFinalScoreController {
|
|
|
@ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber) throws IOException {
|
|
|
printCommonService.getLock(examId, courseCode, paperNumber);
|
|
|
String lockKey = SystemConstant.REDIS_FINAL_SCORE_DATA_FLOW_PREFIX + SystemConstant.IMPORT + examId + "_" + courseCode + "_" + paperNumber;
|
|
|
+ boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_LOCK_IMPORT_EXAM_DATA_TIME_OUT);
|
|
|
+ if (!lock) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("正在导入数据,请稍候再试!");
|
|
|
+ }
|
|
|
Map<String, String> map = null;
|
|
|
try {
|
|
|
map = tcFinalScoreService.finalScoreExcelImport(file, examId, courseCode, paperNumber);
|
|
@@ -140,6 +144,10 @@ public class TCFinalScoreController {
|
|
|
@ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber) throws IOException {
|
|
|
printCommonService.getLock(examId, courseCode, paperNumber);
|
|
|
String lockKey = SystemConstant.REDIS_FINAL_SCORE_DATA_FLOW_PREFIX + SystemConstant.SYNC + examId + "_" + courseCode + "_" + paperNumber;
|
|
|
+ boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_LOCK_IMPORT_EXAM_DATA_TIME_OUT);
|
|
|
+ if (!lock) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("正在同步数据,请稍候再试!");
|
|
|
+ }
|
|
|
Map<String, String> map = null;
|
|
|
try {
|
|
|
map = tcFinalScoreService.finalScoreSync(examId, courseCode, paperNumber);
|