| | |
| | | import cc.mrbird.febs.server.hr.service.IEmpDimissionLogService; |
| | | import cc.mrbird.febs.server.hr.service.IEmpJobChangeService; |
| | | import cc.mrbird.febs.server.hr.util.PoiExportExcel; |
| | | import cn.hutool.core.collection.ListUtil; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | |
| | | */ |
| | | private List<EmpBaseInfo> setDeptName(List<EmpBaseInfo> empBaseInfoList) { |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | if(null == depts){ |
| | | depts =remoteDeptService.setDeptRedis(); |
| | | } |
| | | for (EmpBaseInfo empBaseInfo : empBaseInfoList) { |
| | | // 设置部门 |
| | | empBaseInfo.setDeptName(depts.stream() |
| | |
| | | empBaseInfo.setEmpNumb(list.get(1).toString()); |
| | | |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | if(null == depts){ |
| | | depts =remoteDeptService.setDeptRedis(); |
| | | } |
| | | if(null == depts){ |
| | | depts =remoteDeptService.setDeptRedis(); |
| | | } |
| | | empBaseInfo.setDeptName(list.get(2).toString()); |
| | | Dept dept = depts.stream().filter(d -> d.getDeptName().equals(list.get(2).toString())).findFirst().orElse(null); |
| | | if (null == dept) { |