| | |
| | | package com.ruoyi.lavorissue.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | |
| | | throw new IllegalArgumentException("无效的部门或岗位ID"); |
| | | } |
| | | if(dept.getType() == 2){ |
| | | return laborConfMapper.selectList(Wrappers.lambdaQuery(LaborConf.class) |
| | | .eq(LaborConf::getDeptPositionId, deptId)); |
| | | List<Long> ids = new ArrayList<>(); |
| | | ids.add(deptId); |
| | | return laborConfMapper.list(ids); |
| | | } |
| | | |
| | | // 2. 递归获取当前部门及所有子部门的ID集合 |
| | |
| | | if(CollectionUtils.isEmpty(deptPositions)){ |
| | | return Collections.emptyList(); |
| | | } |
| | | return laborConfMapper.selectList(Wrappers.lambdaQuery(LaborConf.class) |
| | | .in(LaborConf::getDeptPositionId, deptPositions.stream() |
| | | .map(DeptPosition::getId) |
| | | .collect(Collectors.toSet()))); |
| | | return laborConfMapper.list(deptPositions.stream() |
| | | .map(DeptPosition::getId) |
| | | .collect(Collectors.toList())); |
| | | } |
| | | |
| | | /** |