Browse Source

修改灵敏感知大屏3

main
sjh 1 year ago
parent
commit
6222d0fac8
  1. 22
      src/main/java/com/biutag/supervision/service/RiskStatisticsService.java

22
src/main/java/com/biutag/supervision/service/RiskStatisticsService.java

@ -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);
}

Loading…
Cancel
Save