|
@@ -6,6 +6,7 @@ import com.ym.mec.common.constant.CommonConstants;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.util.Comparator;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -80,7 +81,7 @@ public class IndexBaseDto {
|
|
|
this.percent = activateNum.divide(total, CommonConstants.DECIMAL_PLACE, BigDecimal.ROUND_DOWN).multiply(new BigDecimal(100)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_DOWN);
|
|
|
}
|
|
|
}else{
|
|
|
- this.percent = total;
|
|
|
+ this.percent = indexMonthData.stream().max(Comparator.comparing(IndexBaseMonthData::getMonth)).get().getPercent();
|
|
|
}
|
|
|
}
|
|
|
}
|