| | |
| | | Map<String, BigDecimal> mapData = (Map<String, BigDecimal>) obj;
|
| | | BigDecimal sum = mapData.remove("sum");
|
| | | for (Entry<String, BigDecimal> entry : mapData.entrySet()) {
|
| | | sortMap.put(entry.getKey() + "-" + index, new BigDecimal(100).multiply(entry.getValue())
|
| | | .divide(sum, 2, BigDecimal.ROUND_HALF_UP).doubleValue());
|
| | | if (!"name".equals(entry.getKey())) {
|
| | | sortMap.put(entry.getKey() + "-" + index, new BigDecimal(100).multiply(entry.getValue())
|
| | | .divide(sum, 2, BigDecimal.ROUND_HALF_UP).doubleValue());
|
| | | |
| | | }
|
| | | }
|
| | | }
|
| | | break;
|