|
|
@ -451,11 +451,13 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni |
|
|
|
* @date 2020/8/27 1:30 下午 |
|
|
|
*/ |
|
|
|
public MaxAndMinBigDecimalResultDTO getMaxAndMinBigDecimal(List<BigDecimal> list) { |
|
|
|
BigDecimal max = Collections.max(list); |
|
|
|
BigDecimal min = Collections.min(list); |
|
|
|
MaxAndMinBigDecimalResultDTO result = new MaxAndMinBigDecimalResultDTO(); |
|
|
|
result.setMax(max); |
|
|
|
result.setMin(min); |
|
|
|
if(!CollectionUtils.isEmpty(list)) { |
|
|
|
BigDecimal max = Collections.max(list); |
|
|
|
BigDecimal min = Collections.min(list); |
|
|
|
result.setMax(max); |
|
|
|
result.setMin(min); |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|