|
@@ -149,6 +149,8 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
private GroupEventSource groupEventSource;
|
|
|
@Autowired
|
|
|
private WebFeignService webFeignService;
|
|
|
+ @Autowired
|
|
|
+ private StudentService studentService;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Long, StudentRegistration> getDAO() {
|
|
@@ -330,21 +332,8 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.APPLY);
|
|
|
|
|
|
Organization organization = organizationDao.get(studentRegistration.getOrganId());
|
|
|
- if(organization.getGradeType().equals(GradeTypeEnum.SIX_PLUS)){
|
|
|
- for (SixPlusGradeEnum value : SixPlusGradeEnum.values()) {
|
|
|
- if(value.getCode().equals(studentRegistration.getCurrentGradeNum())){
|
|
|
- studentRegistration.setCurrentGrade(value.getDesc());
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }else {
|
|
|
- for (FivePlusGradeEnum value : FivePlusGradeEnum.values()) {
|
|
|
- if(value.getCode().equals(studentRegistration.getCurrentGradeNum())){
|
|
|
- studentRegistration.setCurrentGrade(value.getDesc());
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ String studentGrade = studentService.getStudentGrade(organization.getGradeType(), studentRegistration.getCurrentGradeNum());
|
|
|
+ studentRegistration.setCurrentGrade(studentGrade);
|
|
|
|
|
|
if (hasReg != null) {
|
|
|
studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.APPLY);
|
|
@@ -430,7 +419,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
studentPaymentOrderDetail4goodsGroup.setPaymentOrderId(studentPaymentOrder.getId());
|
|
|
studentPaymentOrderDetail4goodsGroup.setKitGroupPurchaseType(goodsGroup.getKitGroupPurchaseType());
|
|
|
studentPaymentOrderDetailList.add(studentPaymentOrderDetail4goodsGroup);
|
|
|
- if (OrderDetailTypeEnum.MUSICAL.equals(type) && KitGroupPurchaseTypeEnum.GROUP.equals(goodsGroup.getKitGroupPurchaseType())) {
|
|
|
+ if (OrderDetailTypeEnum.MUSICAL.equals(type)) {
|
|
|
maintenanceGoodsId = goodsGroup.getGoodsIdList();
|
|
|
}
|
|
|
}
|
|
@@ -456,7 +445,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
}
|
|
|
if (buyMaintenance) {
|
|
|
if ("".equals(maintenanceGoodsId)) {
|
|
|
- throw new BizException("团购乐器才能购买乐保,请核查");
|
|
|
+ throw new BizException("有乐器才能购买乐保,请核查");
|
|
|
}
|
|
|
BigDecimal maintenancePrice = new BigDecimal(sysConfigDao.findConfigValue("maintenance_price"));
|
|
|
StudentPaymentOrderDetail maintenanceOrderDetail = new StudentPaymentOrderDetail();
|
|
@@ -555,7 +544,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
studentPaymentOrderDetail4goodsGroup.setPaymentOrderId(studentPaymentOrder.getId());
|
|
|
studentPaymentOrderDetail4goodsGroup.setKitGroupPurchaseType(goodsGroup.getKitGroupPurchaseType());
|
|
|
studentPaymentOrderDetailList.add(studentPaymentOrderDetail4goodsGroup);
|
|
|
- if (OrderDetailTypeEnum.MUSICAL.equals(type) && KitGroupPurchaseTypeEnum.GROUP.equals(goodsGroup.getKitGroupPurchaseType())) {
|
|
|
+ if (OrderDetailTypeEnum.MUSICAL.equals(type)) {
|
|
|
maintenanceGoodsId = goodsGroup.getGoodsIdList();
|
|
|
}
|
|
|
}
|
|
@@ -581,7 +570,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
}
|
|
|
if (buyMaintenance) {
|
|
|
if ("".equals(maintenanceGoodsId)) {
|
|
|
- throw new BizException("团购乐器才能购买乐保,请核查");
|
|
|
+ throw new BizException("有乐器才能购买乐保,请核查");
|
|
|
}
|
|
|
BigDecimal maintenancePrice = new BigDecimal(sysConfigDao.findConfigValue("maintenance_price"));
|
|
|
StudentPaymentOrderDetail maintenanceOrderDetail = new StudentPaymentOrderDetail();
|
|
@@ -1035,7 +1024,10 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
List<StudentPaymentOrderDetail> orderDetails = studentPaymentOrderDetailService.getOrderDetail(studentPaymentOrder.getId());
|
|
|
|
|
|
List<StudentPaymentOrderDetail> allDetails = studentPaymentOrderDetailDao.getOrderDetailByOrderId(studentPaymentOrder.getId());
|
|
|
- BigDecimal courseFee = allDetails.stream().filter(o -> !o.getType().getCode().equals("MUSICAL")).filter(o -> !o.getType().getCode().equals("ACCESSORIES")).map(o -> o.getPrice().subtract(o.getRemitFee() == null ? BigDecimal.ZERO : o.getRemitFee()))
|
|
|
+ BigDecimal courseFee = allDetails.stream().filter(o -> !o.getType().getCode().equals("MUSICAL"))
|
|
|
+ .filter(o -> !o.getType().getCode().equals("ACCESSORIES"))
|
|
|
+ .filter(o -> !o.getType().getCode().equals("MAINTENANCE"))
|
|
|
+ .map(o -> o.getPrice().subtract(o.getRemitFee() == null ? BigDecimal.ZERO : o.getRemitFee()))
|
|
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
|
//累加充值金额
|
|
@@ -1396,6 +1388,9 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
student.setParentsName(studentRegistration.getParentsName());
|
|
|
student.setIdCardNo(studentRegistration.getIdCardNo());
|
|
|
student.setGender(studentRegistration.getGender());
|
|
|
+ Organization organization = organizationDao.get(studentRegistration.getOrganId());
|
|
|
+ String studentGrade = studentService.getStudentGrade(organization.getGradeType(), studentRegistration.getCurrentGradeNum());
|
|
|
+ studentRegistration.setCurrentGrade(studentGrade);
|
|
|
update(studentRegistration);
|
|
|
studentRegistrationDao.updateUser(student.getUserId(),student.getName(), student.getParentsName(), student.getIdCardNo(), student.getGender(),studentRegistration.getCertificateType());
|
|
|
//更新年级信息
|