| | |
| | | //设置部门 |
| | | // List<EmpBaseInfo> list = setDeptName(iPage.getRecords()); |
| | | List<EmpBaseInfo> list = iPage.getRecords(); |
| | | List<EmpBaseInfo> newList = new ArrayList<>(); |
| | | List<DicItem> dicItems = CastUtil.castList(redisService.get("dicItems"), DicItem.class); |
| | | list.forEach(p -> { |
| | | p.setSexName("1".equals(p.getSex()) ? "男" : "女"); |
| | |
| | | .orElse("")); |
| | | p.setCertificateListName(getCertificateListName(p.getCertificateList(),dicItems)); |
| | | }); |
| | | // if (StringUtils.isNotBlank(empBaseInfo.getCertificateList())) { |
| | | // String[] certificates = empBaseInfo.getCertificateList().split(","); |
| | | // list.forEach(k -> { |
| | | // String[] dbCertificates = k.getCertificateList().split(","); |
| | | // for (String certificate : certificates) { |
| | | // if (Arrays.asList(dbCertificates).contains(certificate)) { |
| | | // newList.add(k); |
| | | // break; |
| | | // } |
| | | // } |
| | | // }); |
| | | // iPage.setRecords(newList); |
| | | // } else { |
| | | // iPage.setRecords(list); |
| | | // } |
| | | iPage.setRecords(list); |
| | | return iPage; |
| | | } |
| | |
| | | public void accept(QueryWrapper<EmpBaseInfo> wrapper) { |
| | | for (int i = 0; i < certificates.length; i++) { |
| | | String ageBtn = certificates[i]; |
| | | wrapper.or().like("a.certificateList", ageBtn); |
| | | wrapper.or().gt("LOCATE('"+ageBtn+"',certificateList)",0); |
| | | } |
| | | } |
| | | }; |