add - ems业态能耗分析表格加占比

master
yinq 1 month ago
parent d328c6e6d3
commit 6ccd1f3ee6

@ -927,6 +927,10 @@ public class EnergyPreviewServiceImpl implements IEnergyPreviewService {
result.put("lineDnbList", new ArrayList<>());
}
result.put("pieMap", pieMap);
for (HashMap<String, String> hashMap : tableList) {
BigDecimal decimal = new BigDecimal(hashMap.get("expend")).multiply(new BigDecimal(100));//占比
hashMap.put("rate", decimal.divide(totalExpend, 2 ,RoundingMode.HALF_UP).toPlainString() + "%");
}
HashMap<String, String> tableMap = new HashMap<>();
tableMap.put("businessName", "总用电量");
tableMap.put("expend", totalExpend.toPlainString());

Loading…
Cancel
Save