|
@@ -112,7 +112,7 @@ public class ExamReserveServiceImpl implements ExamReserveService {
|
|
|
|
|
|
// 考生剩余预约次数 = 允许预约次数 - 已完成预约次数
|
|
// 考生剩余预约次数 = 允许预约次数 - 已完成预约次数
|
|
int studentApplyNumber = applyTaskCacheService.getStudentApplyNumber(student.getId());
|
|
int studentApplyNumber = applyTaskCacheService.getStudentApplyNumber(student.getId());
|
|
- int studentApplyFinishCount = this.getStudentApplyFinishCount(student.getId());
|
|
|
|
|
|
+ int studentApplyFinishCount = applyTaskCacheService.getStudentApplyFinishCount(student.getId());
|
|
int unApplyNumber = studentApplyNumber - studentApplyFinishCount;
|
|
int unApplyNumber = studentApplyNumber - studentApplyFinishCount;
|
|
if (unApplyNumber < 1) {
|
|
if (unApplyNumber < 1) {
|
|
String msg = "当前学生无剩余可约时段次数,已完成预约" + studentApplyNumber + "次";
|
|
String msg = "当前学生无剩余可约时段次数,已完成预约" + studentApplyNumber + "次";
|
|
@@ -257,13 +257,6 @@ public class ExamReserveServiceImpl implements ExamReserveService {
|
|
log.warn("更新考生预约记录!applyId:{} cancel:{}", applyId, cancel);
|
|
log.warn("更新考生预约记录!applyId:{} cancel:{}", applyId, cancel);
|
|
}
|
|
}
|
|
|
|
|
|
- private int getStudentApplyFinishCount(Long studentId) {
|
|
|
|
- LambdaQueryWrapper<StudentApplyEntity> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
- wrapper.eq(StudentApplyEntity::getStudentId, studentId);
|
|
|
|
- wrapper.eq(StudentApplyEntity::getCancel, Boolean.FALSE);
|
|
|
|
- return studentApplyService.count(wrapper);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
private int getApplyAvailableCount(Long examSiteId, Long timePeriodId) {
|
|
private int getApplyAvailableCount(Long examSiteId, Long timePeriodId) {
|
|
// 当前预约时段剩余可约数量
|
|
// 当前预约时段剩余可约数量
|
|
int totalCount = applyTaskCacheService.getApplyTotalCount(examSiteId);
|
|
int totalCount = applyTaskCacheService.getApplyTotalCount(examSiteId);
|
|
@@ -433,7 +426,7 @@ public class ExamReserveServiceImpl implements ExamReserveService {
|
|
|
|
|
|
// 考生剩余预约次数 = 允许预约次数 - 已完成预约次数
|
|
// 考生剩余预约次数 = 允许预约次数 - 已完成预约次数
|
|
int studentApplyNumber = applyTaskCacheService.getStudentApplyNumber(student.getId());
|
|
int studentApplyNumber = applyTaskCacheService.getStudentApplyNumber(student.getId());
|
|
- int studentApplyFinishCount = this.getStudentApplyFinishCount(student.getId());
|
|
|
|
|
|
+ int studentApplyFinishCount = applyTaskCacheService.getStudentApplyFinishCount(student.getId());
|
|
int unApplyNumber = studentApplyNumber - studentApplyFinishCount;
|
|
int unApplyNumber = studentApplyNumber - studentApplyFinishCount;
|
|
|
|
|
|
ApplyTimePeriodResult result = new ApplyTimePeriodResult();
|
|
ApplyTimePeriodResult result = new ApplyTimePeriodResult();
|