123456
2024-07-17 23adbd6fd679e293c4c8118713b9e1e8b0a463bb
performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOutputWorkingHoursServiceImpl.java
@@ -67,7 +67,7 @@
        auxiliaryOutputWorkingHoursDto.setDateTime(null);
        auxiliaryOutputWorkingHoursDto.setWeek(null);
        Map<String, Object> map = new HashMap<>();
        List<Integer> ids = null;
        List<Integer> ids = new ArrayList<>();
        map.put("head", PrintChina.printChina(AuxiliaryOutputWorkingHoursDto.class));
        //判断组长,组员,管理员权限
        Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectAuxiliaryOutputWorkingHours");
@@ -82,13 +82,17 @@
            } 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(",");
@@ -169,7 +173,7 @@
    public void exportWorkingHours(HttpServletResponse response) throws IOException {
        List<AuxiliaryOutputWorkingHoursDto> auxiliaryOutputWorkingHoursDtos = new ArrayList<>();
        List<AuxiliaryWorkingHoursDayDto> auxiliaryWorkingHoursDayDtos = new ArrayList<>();
        List<Integer> ids = null;
        List<Integer> ids = new ArrayList<>();
        //判断是组长还是组员还是管理员
        Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectAuxiliaryOutputWorkingHours");
        User user = userMapper.selectById(map1.get("userId"));