|
@@ -756,6 +756,9 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
|
|
|
|
private void checkOpenTime(Long orgId) {
|
|
private void checkOpenTime(Long orgId) {
|
|
CurrentApplyTaskVO task = cacheService.currentApplyTask(orgId);
|
|
CurrentApplyTaskVO task = cacheService.currentApplyTask(orgId);
|
|
|
|
+ if(task == null) {
|
|
|
|
+ throw new StatusException("未有开启的任务");
|
|
|
|
+ }
|
|
Date startTime = new Date(task.getSelfApplyStartTime());
|
|
Date startTime = new Date(task.getSelfApplyStartTime());
|
|
Date endTime = new Date(task.getOpenApplyEndTime());
|
|
Date endTime = new Date(task.getOpenApplyEndTime());
|
|
Date now = new Date();
|
|
Date now = new Date();
|
|
@@ -834,6 +837,11 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
public void autoLayout(Long teachingId) {
|
|
public void autoLayout(Long teachingId) {
|
|
OrgInfo org = orgCacheService.currentOrg();
|
|
OrgInfo org = orgCacheService.currentOrg();
|
|
CurrentApplyTaskVO applyTask = cacheService.currentApplyTask(org.getOrgId());
|
|
CurrentApplyTaskVO applyTask = cacheService.currentApplyTask(org.getOrgId());
|
|
|
|
+ if(applyTask == null) {
|
|
|
|
+ log.warn("[autoLayout] 未有开启的任务");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
String autoLayoutLockKey = String.format(CacheConstants.LOCK_ARRANGE_EXAM, DateUtil.formatShortDateString(new Date()));
|
|
String autoLayoutLockKey = String.format(CacheConstants.LOCK_ARRANGE_EXAM, DateUtil.formatShortDateString(new Date()));
|
|
RLock autoLayoutLock = (RLock) concurrentService.getLock(autoLayoutLockKey);
|
|
RLock autoLayoutLock = (RLock) concurrentService.getLock(autoLayoutLockKey);
|
|
|
|
|