| | |
| | | //设置部门 |
| | | // 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()) ? "男" : "女"); |
| | |
| | | .findFirst() |
| | | .map(DicItem::getDicItemName) |
| | | .orElse("")); |
| | | p.setCertificateListName(getCertificateListName(p.getCertificateList(),dicItems)); |
| | | 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; |
| | | } |
| | |
| | | } |
| | | |
| | | if (StringUtils.isNotBlank(list.get(11).toString())) { |
| | | empBaseInfo.setEntryDate(DateUtil.parseDate(list.get(11).toString())); |
| | | empBaseInfo.setEntryDate(DateUtil.parse(list.get(11).toString())); |
| | | } |
| | | |
| | | //最高学历 |
| | |
| | | p.setEmpTypeName("1".equals(p.getEmpType()) ? "正式工" : "临时工"); |
| | | } |
| | | if (StringUtils.isNotBlank(p.getDimissionType())) { |
| | | if ("1".equals(p.getDimissionType())) { |
| | | p.setDimissionTypeName("正常离职"); |
| | | } else if ("2".equals(p.getDimissionType())) { |
| | | p.setDimissionTypeName("自动离职"); |
| | | } else if ("3".equals(p.getDimissionType())) { |
| | | p.setDimissionTypeName("公司劝退"); |
| | | } else if ("4".equals(p.getDimissionType())) { |
| | | p.setDimissionTypeName("公司辞退"); |
| | | } else if ("5".equals(p.getDimissionType())) { |
| | | p.setDimissionTypeName("试用期内"); |
| | | } |
| | | // if ("1".equals(p.getDimissionType())) { |
| | | // p.setDimissionTypeName("正常离职"); |
| | | // } else if ("2".equals(p.getDimissionType())) { |
| | | // p.setDimissionTypeName("自动离职"); |
| | | // } else if ("3".equals(p.getDimissionType())) { |
| | | // p.setDimissionTypeName("公司劝退"); |
| | | // } else if ("4".equals(p.getDimissionType())) { |
| | | // p.setDimissionTypeName("公司辞退"); |
| | | // } else if ("5".equals(p.getDimissionType())) { |
| | | // p.setDimissionTypeName("试用期内"); |
| | | // } |
| | | p.setDimissionTypeName(dicItems.stream() |
| | | .filter(k -> DicCode.IN_OUT_TYPE.equals(k.getDicCode()) && k.getDicItemCode().equals(p.getDimissionType())) |
| | | .findFirst() |
| | | .map(DicItem::getDicItemName) |
| | | .orElse("")); |
| | | } |
| | | p.setInsuranceTypeName("1".equals(p.getInsuranceType()) ? "(深户)五险一档" : "(非深户)五险一档"); |
| | | p.setArchivesStatusName("0".equals(p.getArchivesStatus()) ? "未移交" : "已移交"); |
| | |
| | | @Override |
| | | public void accept(QueryWrapper<EmpBaseInfo> wrapper) { |
| | | for (int i = 0; i < certificates.length; i++) { |
| | | String ageBtn = certificates[i]; |
| | | wrapper.or().like("a.certificateList", ageBtn); |
| | | String ageBtn = "|" + certificates[i] + "|"; |
| | | wrapper.gt("LOCATE('"+ageBtn+"',CONCAT('|',replace( certificateList, ',', '|,|'),'|'))",0); |
| | | } |
| | | } |
| | | }; |
| | |
| | | |
| | | @Override |
| | | public boolean updateSeniority() { |
| | | return empBaseInfoMapper.updateSeniority()>0; |
| | | return empBaseInfoMapper.updateSeniority() > 0; |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateDeptName() { |
| | | return empBaseInfoMapper.updateDeptName() > 0; |
| | | } |
| | | } |