|
@@ -206,6 +206,13 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
throw new StatusException("[cancel] 只能取消本教学点的考生");
|
|
throw new StatusException("[cancel] 只能取消本教学点的考生");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // 考生是否已经取消判断
|
|
|
|
+ ApplyRecordCacheBean studentApplyRecord = cacheService.getStudentApplyRecord(studentApplyEntity.getStudentId(), studentApplyEntity.getExamSiteId(),
|
|
|
|
+ studentApplyEntity.getTimePeriodId());
|
|
|
|
+ if (studentApplyRecord != null && studentApplyRecord.getCancel()) {
|
|
|
|
+ throw new StatusException("[cancel] 考生已经取消,请稍后查看");
|
|
|
|
+ }
|
|
|
|
+
|
|
String studentApplyLockKey = String.format(CacheConstants.LOCK_STUDENT_APPLY, studentApplyEntity.getStudentId());
|
|
String studentApplyLockKey = String.format(CacheConstants.LOCK_STUDENT_APPLY, studentApplyEntity.getStudentId());
|
|
RLock studentApplyLock = (RLock) concurrentService.getLock(studentApplyLockKey);
|
|
RLock studentApplyLock = (RLock) concurrentService.getLock(studentApplyLockKey);
|
|
try {
|
|
try {
|
|
@@ -1130,13 +1137,13 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<StudentApplyExport> listStudentApplyDetail(Long teachingId) {
|
|
|
|
|
|
+ public List<StudentApplyExport> listStudentApplyDetail(StudentApplyReq req) {
|
|
OrgInfo org = orgCacheService.currentOrg();
|
|
OrgInfo org = orgCacheService.currentOrg();
|
|
CurrentApplyTaskVO curApplyTask = cacheService.currentApplyTask(org.getOrgId());
|
|
CurrentApplyTaskVO curApplyTask = cacheService.currentApplyTask(org.getOrgId());
|
|
if (curApplyTask == null) {
|
|
if (curApplyTask == null) {
|
|
return Collections.emptyList();
|
|
return Collections.emptyList();
|
|
}
|
|
}
|
|
- return baseMapper.listStudentApplyDetail(teachingId, curApplyTask.getTaskId());
|
|
|
|
|
|
+ return baseMapper.listStudentApplyDetail(req, curApplyTask.getTaskId());
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -1159,12 +1166,12 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public void exportStudentApplyDetail(Long teachingId, Long operateId) {
|
|
|
|
|
|
+ public void exportStudentApplyDetail(StudentApplyReq req, Long operateId) {
|
|
//写入异步任务
|
|
//写入异步任务
|
|
Map<String, Object> taskMap = asyncTaskService.saveAsyncTask(AsyncTaskType.STUDENT_APPLY_EXPORT,
|
|
Map<String, Object> taskMap = asyncTaskService.saveAsyncTask(AsyncTaskType.STUDENT_APPLY_EXPORT,
|
|
operateId);
|
|
operateId);
|
|
- taskMap.computeIfAbsent("teachingId", v -> teachingId);
|
|
|
|
taskMap.computeIfAbsent("operateId", v -> operateId);
|
|
taskMap.computeIfAbsent("operateId", v -> operateId);
|
|
|
|
+ taskMap.computeIfAbsent("condition", v -> req);
|
|
try {
|
|
try {
|
|
studentApplyDetailExportService.exportTask(taskMap);
|
|
studentApplyDetailExportService.exportTask(taskMap);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|