| | |
| | | |
| | | //大屏展示考核得分 |
| | | @Override |
| | | //TODO:考虑limit bug |
| | | public Map<String, List<Map<String, Object>>> dashboard(DashboardQuery dashboardQuery) { |
| | | public Map<String, Map<String, Object>> dashboard(DashboardQuery dashboardQuery) { |
| | | Date now = new Date(); |
| | | dashboardQuery.setStartTime(DateUtils.getMouthStart(now)); |
| | | dashboardQuery.setEndTime(DateUtils.getMouthEnd(now)); |
| | | List<CheckScore> dashboard = scoreMapper.dashboard(dashboardQuery); |
| | | Map<String, List<Map<String, Object>>> resultMap = new HashMap<>(); |
| | | Map<String, Map<String, Object>> resultMap = new HashMap<>(); |
| | | |
| | | for (CheckScore checkScore : dashboard) { |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("value", checkScore.getScore()); |
| | | if (dashboardQuery.getDataScope() == 1) { |
| | | map.put("name", "省厅得分"); |
| | | } else { |
| | | map.put("name", "区县得分"); |
| | | } |
| | | list.add(map); |
| | | resultMap.put(checkScore.getDeptName(), list); |
| | | map.put("score", checkScore.getScore().setScale(2,RoundingMode.HALF_UP)); |
| | | resultMap.put(checkScore.getDeptName(), map); |
| | | } |
| | | return resultMap; |
| | | } |