|
@@ -121,9 +121,9 @@ public class ChildrenDayReserveServiceImpl extends BaseServiceImpl<Integer, Chil
|
|
|
dataList = childrenDayReserveDao.queryChildrenStatistics(params);
|
|
|
//获取乐团在读人数
|
|
|
List<String> musicGroupIds = dataList.stream().map(e -> e.getMusicGroupId()).collect(Collectors.toList());
|
|
|
- Map<String,Long> normalNum = MapUtil.convertIntegerMap(studentRegistrationService.countNormalNum(musicGroupIds));
|
|
|
- dataList.forEach(e->{
|
|
|
- e.setNormalNum(normalNum.get(e.getMusicGroupId())==null?0:normalNum.get(e.getMusicGroupId()).intValue());
|
|
|
+ Map<String, Long> normalNum = MapUtil.convertIntegerMap(studentRegistrationService.countNormalNum(musicGroupIds));
|
|
|
+ dataList.forEach(e -> {
|
|
|
+ e.setNormalNum(normalNum.get(e.getMusicGroupId()) == null ? 0 : normalNum.get(e.getMusicGroupId()).intValue());
|
|
|
});
|
|
|
}
|
|
|
if (count == 0) {
|
|
@@ -201,7 +201,7 @@ public class ChildrenDayReserveServiceImpl extends BaseServiceImpl<Integer, Chil
|
|
|
throw new BizException("您已购买过乐理考级专项训练课,请勿重复选择");
|
|
|
}
|
|
|
//检查器乐考级等级是否重复
|
|
|
- if (degreePayDto.getMusicGradeLevel() != null) {
|
|
|
+ if (degreePayDto.getMusicGradeLevel() != null && degreePayDto.getMusicGradeLevel() > 0) {
|
|
|
if (degreePayDto.getSubject() == null) {
|
|
|
throw new BizException("请选择考级声部");
|
|
|
}
|
|
@@ -213,7 +213,7 @@ public class ChildrenDayReserveServiceImpl extends BaseServiceImpl<Integer, Chil
|
|
|
}
|
|
|
|
|
|
//检查乐理考级等级是否重复
|
|
|
- if (degreePayDto.getTheoryLevel() != null) {
|
|
|
+ if (degreePayDto.getTheoryLevel() != null && degreePayDto.getTheoryLevel() > 0) {
|
|
|
List<ChildrenDayDegreeDetail> hasList = details.stream().filter(e -> e.getType().equals(2))
|
|
|
.filter(e -> e.getLevel().equals(degreePayDto.getMusicGradeLevel())).collect(Collectors.toList());
|
|
|
if (hasList.size() > 0) {
|
|
@@ -242,14 +242,14 @@ public class ChildrenDayReserveServiceImpl extends BaseServiceImpl<Integer, Chil
|
|
|
|
|
|
//器乐考级费用
|
|
|
BigDecimal gradeFee = BigDecimal.ZERO;
|
|
|
- if (degreePayDto.getMusicGradeLevel() != null) {
|
|
|
+ if (degreePayDto.getMusicGradeLevel() != null && degreePayDto.getMusicGradeLevel() > 0) {
|
|
|
gradeFee = degreeLevelFees.stream().filter(e -> e.getLevel().equals(degreePayDto.getMusicGradeLevel())).map(DegreeLevelFee::getGrade).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
orderAmount = orderAmount.add(gradeFee);
|
|
|
}
|
|
|
|
|
|
//乐理考级费用
|
|
|
BigDecimal theoryLevelFee = BigDecimal.ZERO;
|
|
|
- if (degreePayDto.getTheoryLevel() != null) {
|
|
|
+ if (degreePayDto.getTheoryLevel() != null && degreePayDto.getTheoryLevel() > 0) {
|
|
|
theoryLevelFee = degreeLevelFees.stream().filter(e -> e.getLevel().equals(degreePayDto.getTheoryLevel())).map(DegreeLevelFee::getTheory).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
orderAmount = orderAmount.add(theoryLevelFee);
|
|
|
}
|