|
|
|
|
@ -72,16 +72,18 @@ public class RiskStatisticsService {
|
|
|
|
|
RiskStatisticsVo tmp = new RiskStatisticsVo(); |
|
|
|
|
tmp.setLabel(map.get("membersName").toString()); |
|
|
|
|
Object valueObj = map.get(type); |
|
|
|
|
if (valueObj instanceof Long) { |
|
|
|
|
tmp.setValue(((Long) valueObj).intValue()); |
|
|
|
|
} else if (valueObj instanceof BigDecimal) { |
|
|
|
|
tmp.setScore(((BigDecimal) valueObj).doubleValue()); |
|
|
|
|
} else if (valueObj instanceof Double) { |
|
|
|
|
tmp.setScore((Double) valueObj); |
|
|
|
|
} else if (valueObj instanceof Integer) { |
|
|
|
|
tmp.setValue((Integer) valueObj); |
|
|
|
|
} else { |
|
|
|
|
throw new IllegalArgumentException("Unsupported type: " + valueObj.getClass().getName()); |
|
|
|
|
if (valueObj != null) { |
|
|
|
|
if (valueObj instanceof Long) { |
|
|
|
|
tmp.setValue(((Long) valueObj).intValue()); |
|
|
|
|
} else if (valueObj instanceof BigDecimal) { |
|
|
|
|
tmp.setScore(((BigDecimal) valueObj).doubleValue()); |
|
|
|
|
} else if (valueObj instanceof Double) { |
|
|
|
|
tmp.setScore((Double) valueObj); |
|
|
|
|
} else if (valueObj instanceof Integer) { |
|
|
|
|
tmp.setValue((Integer) valueObj); |
|
|
|
|
} else { |
|
|
|
|
throw new IllegalArgumentException("Unsupported type: " + valueObj.getClass().getName()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
result.add(tmp); |
|
|
|
|
} |
|
|
|
|
|