| | |
| | | return scoreMapper.selectCheckScoreMap(checkScore).stream().collect(Collectors.groupingBy(CheckScore::getDeptId)); |
| | | } |
| | | |
| | | /** |
| | | * 查询考核积分卡片列表 |
| | | * |
| | | * @param checkScore 考核积分 |
| | | * @return 考核积分 |
| | | */ |
| | | @Override |
| | | @DataScope(deptAlias = "d",userAlias = "u") |
| | | public Map<Long, List<CheckScore>> selectCheckScoreChart(CheckScore checkScore) |
| | | { |
| | | //区县只能看已发布 |
| | | roleControl(checkScore); |
| | | |
| | | //查询成绩 |
| | | String date = checkScore.getDate(); |
| | | if(StringUtils.isEmpty(date)){ |
| | | //如果为空查本月的数据 |
| | | Calendar now = Calendar.getInstance(); |
| | | //取昨天 |
| | | now.add(Calendar.DATE, -1); |
| | | Date yesterday = now.getTime(); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM"); |
| | | date = simpleDateFormat.format(yesterday); |
| | | checkScore.setDate(date); |
| | | } |
| | | List<CheckScore> checkScores = scoreMapper.selectCheckScoreList(checkScore); |
| | | return checkScores.stream().collect(Collectors.groupingBy(CheckScore::getDeptId)); |
| | | } |
| | | |
| | | /** |
| | | * 区县详情 |