|
@@ -273,7 +273,13 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
convertStudentNumData.setTotalNum(convertStudentNum.stream().map(IndexBaseMonthData::getTotalNum).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
convertStudentNumData.setActivateNum(convertStudentNum.stream().map(IndexBaseMonthData::getActivateNum).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
|
|
|
- if(preStudentNumData.getActivateNum().compareTo(BigDecimal.ZERO)==0){
|
|
|
+ if(true){
|
|
|
+ if(paymentStudentNumData.getActivateNum().compareTo(BigDecimal.ZERO)==0){
|
|
|
+ convertStudentNumData.setPercent(BigDecimal.ZERO);
|
|
|
+ }else{
|
|
|
+ convertStudentNumData.setPercent(convertStudentNumData.getActivateNum().divide(paymentStudentNumData.getActivateNum(), CommonConstants.DECIMAL_PLACE, BigDecimal.ROUND_DOWN).multiply(new BigDecimal(100)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_DOWN));
|
|
|
+ }
|
|
|
+ }else if(preStudentNumData.getActivateNum().compareTo(BigDecimal.ZERO)==0){
|
|
|
studentNumData.setPercent(BigDecimal.ZERO);
|
|
|
paymentStudentNumData.setPercent(BigDecimal.ZERO);
|
|
|
convertStudentNumData.setPercent(BigDecimal.ZERO);
|