|
@@ -194,7 +194,7 @@ public class LibraryController extends BaseExamController {
|
|
obj.accumulate("message", "打回评卷任务失败");
|
|
obj.accumulate("message", "打回评卷任务失败");
|
|
log.error("back library error", e);
|
|
log.error("back library error", e);
|
|
} finally {
|
|
} finally {
|
|
- lockService.unlock(LockType.STUDENT, library.getStudentId());
|
|
|
|
|
|
+ lockService.unlock(LockType.STUDENT, library.getStudentId());
|
|
lockService.unwatch(LockType.GROUP, library.getExamId(), library.getSubjectCode(),
|
|
lockService.unwatch(LockType.GROUP, library.getExamId(), library.getSubjectCode(),
|
|
library.getGroupNumber());
|
|
library.getGroupNumber());
|
|
lockService.unwatch(LockType.EXAM_SUBJECT, library.getExamId(), library.getSubjectCode());
|
|
lockService.unwatch(LockType.EXAM_SUBJECT, library.getExamId(), library.getSubjectCode());
|
|
@@ -364,9 +364,10 @@ public class LibraryController extends BaseExamController {
|
|
lockService.watch(LockType.GROUP, library.getExamId(), library.getSubjectCode(),
|
|
lockService.watch(LockType.GROUP, library.getExamId(), library.getSubjectCode(),
|
|
library.getGroupNumber());
|
|
library.getGroupNumber());
|
|
lockService.waitlock(LockType.STUDENT, library.getStudentId());
|
|
lockService.waitlock(LockType.STUDENT, library.getStudentId());
|
|
- if ( libraryService.hasApplied(library, wu.getId())
|
|
|
|
- && (library.getStatus().equals(LibraryStatus.MARKED)|| library.getStatus().equals(LibraryStatus.INSPECTED))
|
|
|
|
- && markService.rejectLibrary(library,rejectResult.getQuestionList(), wu.getId(), rejectResult.getReason())) {
|
|
|
|
|
|
+ if (((libraryService.hasApplied(library, wu.getId())
|
|
|
|
+ && (library.getStatus().equals(LibraryStatus.MARKED)) || library.getStatus().equals(
|
|
|
|
+ LibraryStatus.INSPECTED)) && markService.rejectLibrary(library,
|
|
|
|
+ rejectResult.getQuestionList(), wu.getId(), rejectResult.getReason()))) {
|
|
libraryService.releaseByLibrary(library);
|
|
libraryService.releaseByLibrary(library);
|
|
obj.accumulate("success", true);
|
|
obj.accumulate("success", true);
|
|
} else {
|
|
} else {
|
|
@@ -378,7 +379,7 @@ public class LibraryController extends BaseExamController {
|
|
obj.accumulate("message", "打回评卷任务失败");
|
|
obj.accumulate("message", "打回评卷任务失败");
|
|
log.error("back library error", e);
|
|
log.error("back library error", e);
|
|
} finally {
|
|
} finally {
|
|
- lockService.unlock(LockType.STUDENT, library.getStudentId());
|
|
|
|
|
|
+ lockService.unlock(LockType.STUDENT, library.getStudentId());
|
|
lockService.unwatch(LockType.GROUP, library.getExamId(), library.getSubjectCode(),
|
|
lockService.unwatch(LockType.GROUP, library.getExamId(), library.getSubjectCode(),
|
|
library.getGroupNumber());
|
|
library.getGroupNumber());
|
|
lockService.unwatch(LockType.EXAM_SUBJECT, library.getExamId(), library.getSubjectCode());
|
|
lockService.unwatch(LockType.EXAM_SUBJECT, library.getExamId(), library.getSubjectCode());
|