|
@@ -83,8 +83,15 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
|
|
|
throw new BizException("机构不存在");
|
|
|
}
|
|
|
|
|
|
- ExamRegistration registration = examRegistrationDao.getRegistration(examinationBasic.getId(), examRegistration.getStudentId(), examRegistration.getSubjectId(), examSubjectSong.getLevel());
|
|
|
- if(registration != null && !registration.getStatus().equals(StudentRegistrationStatusEnum.PAY_WAIT)){
|
|
|
+ List<StudentRegistrationStatusEnum> statusEnumList = new ArrayList<>();
|
|
|
+ statusEnumList.add(StudentRegistrationStatusEnum.AUDIT_WAIT);
|
|
|
+ statusEnumList.add(StudentRegistrationStatusEnum.AUDIT_REJECT);
|
|
|
+ statusEnumList.add(StudentRegistrationStatusEnum.AUDIT_PASS);
|
|
|
+
|
|
|
+ ExamRegistration registration = examRegistrationDao.getRegistration(examinationBasic.getId(),
|
|
|
+ examRegistration.getStudentId(), examRegistration.getSubjectId(), examSubjectSong.getLevel(),
|
|
|
+ statusEnumList);
|
|
|
+ if (registration != null) {
|
|
|
throw new BizException("该考级相同专业及等级您已报名,请勿重复报名");
|
|
|
}
|
|
|
|
|
@@ -112,15 +119,13 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
|
|
|
examRegistration.setCreateTime(nowDate);
|
|
|
examRegistration.setUpdateTime(nowDate);
|
|
|
|
|
|
- ExamRegistrationPayment examIngOrder = examRegistrationPaymentService.getExamIngOrder(examinationBasic.getId(), examRegistration.getStudentId());
|
|
|
- if (examIngOrder != null) {
|
|
|
- examIngOrder.setTransStatus(TransStatusEnum.CLOSE);
|
|
|
- examIngOrder.setMemo("用户主动放弃支付");
|
|
|
- if (examRegistrationPaymentService.update(examIngOrder) <= 0) {
|
|
|
- throw new BizException("未支付订单关闭失败");
|
|
|
- }
|
|
|
- ExamRegistration examReg = examRegistrationDao.get(examIngOrder.getExamRegistrationId());
|
|
|
- examRegistration.setId(examReg.getId());
|
|
|
+ statusEnumList.clear();
|
|
|
+ statusEnumList.add(StudentRegistrationStatusEnum.AUDIT_WAIT);
|
|
|
+ registration = examRegistrationDao.getRegistration(examinationBasic.getId(),
|
|
|
+ examRegistration.getStudentId(), null, null,
|
|
|
+ statusEnumList);
|
|
|
+ if (registration != null) {
|
|
|
+ examRegistration.setId(registration.getId());
|
|
|
examRegistrationDao.update(examRegistration);
|
|
|
} else {
|
|
|
examRegistrationDao.insert(examRegistration);
|
|
@@ -163,7 +168,7 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
|
|
|
Map<String, Object> params = new HashMap<String, Object>();
|
|
|
MapUtil.populateMap(params, queryInfo);
|
|
|
|
|
|
- if(Objects.nonNull(queryInfo.getExamId())){
|
|
|
+ if (Objects.nonNull(queryInfo.getExamId())) {
|
|
|
List<Integer> nextLevelOrganIds = organizationService.getChildOrganIds(queryInfo.getOrganId(), true);
|
|
|
params.put("organIds", nextLevelOrganIds);
|
|
|
params.put("organId", null);
|