|
@@ -527,6 +527,9 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
studentPaymentOrder.setVersion(0);
|
|
|
String code = studentRegistration.getNoneNeedCloudTeacher().equals(1) ? "200" : "205";
|
|
|
studentPaymentOrder.setPaymentAccountNo(code);
|
|
|
+ if (code.equals("205") && !"".equals(maintenanceGoodsId)) {
|
|
|
+ studentPaymentOrder.setClassGroupId(206);
|
|
|
+ }
|
|
|
studentPaymentOrderService.update(studentPaymentOrder);
|
|
|
}
|
|
|
return studentPaymentOrder;
|
|
@@ -1087,7 +1090,10 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
}
|
|
|
studentRegistration.setPaymentStatus(YES);
|
|
|
studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.NORMAL);
|
|
|
- studentRegistration.setPayingStatus(0);
|
|
|
+
|
|
|
+ if (studentPaymentOrder.getClassGroupId() == null || !studentPaymentOrder.getClassGroupId().equals(206)) {
|
|
|
+ studentRegistration.setPayingStatus(0);
|
|
|
+ }
|
|
|
|
|
|
List<StudentPaymentOrderDetail> orderDetails = studentPaymentOrderDetailService.getOrderDetail(studentPaymentOrder.getId());
|
|
|
|
|
@@ -1838,21 +1844,21 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
int registerNum = studentRegistrationDao.getRegisterNum(queryInfo.getMusicGroupId());
|
|
|
pageInfo.setRegNum(registerNum);
|
|
|
RegisterDto registerOrPreMinTime = studentRegistrationDao.getRegisterOrPreMinTime(queryInfo.getMusicGroupId());
|
|
|
- if(registerOrPreMinTime != null && registerOrPreMinTime.getMinPayTime() != null){
|
|
|
+ if (registerOrPreMinTime != null && registerOrPreMinTime.getMinPayTime() != null) {
|
|
|
Date startTime = DateUtil.trunc(registerOrPreMinTime.getMinPayTime());
|
|
|
Date endTime = DateUtil.getLastTimeWithDay(startTime);
|
|
|
int firstPayNum = studentRegistrationDao.getFirstPayNum(queryInfo.getMusicGroupId(), startTime, endTime);
|
|
|
- int totalPayNum = studentRegistrationDao.getFirstPayNum(queryInfo.getMusicGroupId(), startTime,null);
|
|
|
+ int totalPayNum = studentRegistrationDao.getFirstPayNum(queryInfo.getMusicGroupId(), startTime, null);
|
|
|
pageInfo.setFirstDayPayNum(firstPayNum);
|
|
|
pageInfo.setPayNum(totalPayNum);
|
|
|
- pageInfo.setPayScale(new BigDecimal(firstPayNum).multiply(new BigDecimal(100)).divide(new BigDecimal(totalPayNum),2,BigDecimal.ROUND_HALF_UP));
|
|
|
+ pageInfo.setPayScale(new BigDecimal(firstPayNum).multiply(new BigDecimal(100)).divide(new BigDecimal(totalPayNum), 2, BigDecimal.ROUND_HALF_UP));
|
|
|
}
|
|
|
|
|
|
pageInfo.setTotal(count);
|
|
|
params.put("offset", pageInfo.getOffset());
|
|
|
if (queryInfo.getPage() <= pageInfo.getTotalPage()) {
|
|
|
- Date firstPreTime = registerOrPreMinTime != null ?registerOrPreMinTime.getMinPerRegisterTime():null;
|
|
|
- Date firstPayTime = registerOrPreMinTime != null ?registerOrPreMinTime.getMinPayTime():null;
|
|
|
+ Date firstPreTime = registerOrPreMinTime != null ? registerOrPreMinTime.getMinPerRegisterTime() : null;
|
|
|
+ Date firstPayTime = registerOrPreMinTime != null ? registerOrPreMinTime.getMinPayTime() : null;
|
|
|
dataList = studentRegistrationDao.getRegisterOrPreList(params);
|
|
|
for (RegisterDto registerDto : dataList) {
|
|
|
if (DateUtil.dateToString(registerDto.getPerRegisterTime()).equals("2099-12-31") ||
|
|
@@ -1887,7 +1893,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
public Boolean setNoneCloudTeacher(Long id) {
|
|
|
StudentRegistration studentRegistration = studentRegistrationDao.get(id);
|
|
|
if (!studentRegistration.getPayingStatus().equals(2)) {
|
|
|
- throw new BizException("该学生不在预约中");
|
|
|
+ throw new BizException("该学生不在审核中");
|
|
|
}
|
|
|
if (studentRegistration.getNoneNeedCloudTeacher().equals(1)) {
|
|
|
throw new BizException("该学生已设置");
|
|
@@ -1898,4 +1904,29 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Boolean addPaidNum(Long id) {
|
|
|
+ StudentRegistration studentRegistration = studentRegistrationDao.get(id);
|
|
|
+ if (!studentRegistration.getPayingStatus().equals(2)) {
|
|
|
+ throw new BizException("该学生不在审核");
|
|
|
+ }
|
|
|
+ if (!studentRegistration.getPaymentStatus().equals(YES)) {
|
|
|
+ throw new BizException("该学生状态已更新,请刷新查看");
|
|
|
+ }
|
|
|
+ studentRegistration.setPayingStatus(0);
|
|
|
+ studentRegistrationDao.update(studentRegistration);
|
|
|
+
|
|
|
+
|
|
|
+ MusicGroupSubjectPlan musicOneSubjectClassPlan = musicGroupSubjectPlanService.getMusicOneSubjectClassPlan(studentRegistration.getMusicGroupId(), studentRegistration.getActualSubjectId());
|
|
|
+ int paidNum = musicOneSubjectClassPlan.getPaidStudentNum() == null ? 0 : musicOneSubjectClassPlan.getPaidStudentNum();
|
|
|
+ int paidZeroNum = musicOneSubjectClassPlan.getPaidZeroNum() == null ? 0 : musicOneSubjectClassPlan.getPaidZeroNum();
|
|
|
+ musicOneSubjectClassPlan.setPaidZeroNum(paidZeroNum + 1);
|
|
|
+ musicOneSubjectClassPlan.setPaidStudentNum(paidNum + 1);
|
|
|
+ int count = musicGroupSubjectPlanService.update(musicOneSubjectClassPlan);
|
|
|
+ if (count <= 0) {
|
|
|
+ throw new BizException("缴费人数更新失败,请重试");
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|