|
@@ -144,6 +144,8 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
private MusicGroupPaymentCalenderActivityService musicGroupPaymentCalenderActivityService;
|
|
|
@Autowired
|
|
|
private MusicGroupPaymentCalenderMemberService musicGroupPaymentCalenderMemberService;
|
|
|
+ @Autowired
|
|
|
+ private MusicGroupPaymentCalenderRepairService musicGroupPaymentCalenderRepairService;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Long, StudentRegistration> getDAO() {
|
|
@@ -523,10 +525,9 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public StudentPaymentOrder addOrder(StudentRegistration studentRegistration, StudentPaymentOrder studentPaymentOrder,
|
|
|
- MusicGroupApplyGoodsDto goodsDto,RegisterPayDto registerPayDto) throws Exception {
|
|
|
+ MusicGroupApplyGoodsDto goodsDto,RegisterPayDto registerPayDto) {
|
|
|
Date date = new Date();
|
|
|
ArrayList<StudentPaymentOrderDetail> studentPaymentOrderDetailList = new ArrayList<>();
|
|
|
- Integer tenantId = TenantContextHolder.getTenantId();
|
|
|
//乐器及打包辅件
|
|
|
String maintenanceGoodsId = "";
|
|
|
List<MusicGroupSubjectGoodsGroup> goodsGroups = goodsDto.getGoodsGroups();
|
|
@@ -610,17 +611,13 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
|
|
|
//乐保
|
|
|
if (registerPayDto.getBuyMaintenance()) {
|
|
|
- if ("".equals(maintenanceGoodsId)) {
|
|
|
+ if (StringUtils.isEmpty(maintenanceGoodsId)) {
|
|
|
throw new BizException("有乐器才能购买乐保,请核查");
|
|
|
}
|
|
|
- String configValue = sysTenantConfigService.getTenantConfigValue(SysConfigService.ONE_YEAR_MUSICAL_REPAIR_AMOUNT, tenantId);
|
|
|
- if(StringUtils.isEmpty(configValue)){
|
|
|
- throw new BizException("乐保价格异常,请联系指导老师");
|
|
|
- }
|
|
|
- BigDecimal maintenancePrice = new BigDecimal(configValue);
|
|
|
+ MusicGroupPaymentCalenderRepair calenderRepair = musicGroupPaymentCalenderRepairService.findByCalenderId(studentPaymentOrder.getCalenderId());
|
|
|
StudentPaymentOrderDetail maintenanceOrderDetail = new StudentPaymentOrderDetail();
|
|
|
maintenanceOrderDetail.setType(MAINTENANCE);
|
|
|
- maintenanceOrderDetail.setPrice(maintenancePrice);
|
|
|
+ maintenanceOrderDetail.setPrice(calenderRepair.getActualAmount());
|
|
|
maintenanceOrderDetail.setRemitFee(BigDecimal.ZERO);
|
|
|
maintenanceOrderDetail.setCreateTime(date);
|
|
|
maintenanceOrderDetail.setUpdateTime(date);
|