| | |
| | | } else { |
| | | //管理员(不添加限制条件所有人都可以看) |
| | | } |
| | | } else { |
| | | } |
| | | else { |
| | | //是组长 |
| | | //查询组长下的组员 |
| | | List<User> users = userMapper.selectList(Wrappers.<User>lambdaQuery().like(User::getDepartLimsId, user.getDepartLimsId())); |
| | | if (ObjectUtils.isNotEmpty(users)) { |
| | | ids.addAll(users.stream().map(User::getId).distinct().collect(Collectors.toList())); |
| | | } |
| | | } |
| | | if (ids.size()==0){ |
| | | ids=null; |
| | | } |
| | | if (ObjectUtils.isNotEmpty(dates) && ObjectUtils.isNotEmpty(week)){ |
| | | String[] split = dates.replaceAll("\\[", "").replaceAll("]", "").replaceAll("\"", "").split(","); |
| | |
| | | //导出 |
| | | @Override |
| | | public void exportWorkingHours(HttpServletResponse response) throws IOException { |
| | | List<AuxiliaryOutputWorkingHoursDto> auxiliaryOutputWorkingHoursDtos = null; |
| | | List<AuxiliaryWorkingHoursDayDto> auxiliaryWorkingHoursDayDtos = null; |
| | | List<Integer> ids = null; |
| | | List<AuxiliaryOutputWorkingHoursDto> auxiliaryOutputWorkingHoursDtos = new ArrayList<>(); |
| | | List<AuxiliaryWorkingHoursDayDto> auxiliaryWorkingHoursDayDtos = new ArrayList<>(); |
| | | List<Integer> ids = new ArrayList<>(); |
| | | //判断是组长还是组员还是管理员 |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectAuxiliaryOutputWorkingHours"); |
| | | User user = userMapper.selectById(map1.get("userId")); |
| | |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系 |
| | | String fileName = URLEncoder.encode("工时管理导出", "UTF-8"); |
| | | String fileName = URLEncoder.encode("日工时管理导出", "UTF-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | try { |
| | | // 新建ExcelWriter |