| | |
| | | .findFirst() |
| | | .map(DicItem::getDicItemName) |
| | | .orElse("")); |
| | | p.setCertificateListName(getCertificateListName(p.getCertificateList(),dicItems)); |
| | | }); |
| | | iPage.setRecords(list); |
| | | return iPage; |
| | |
| | | public boolean verifyCertificateNumb(EmpBaseInfo empBaseInfo) { |
| | | QueryWrapper<EmpBaseInfo> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.lambda().eq(EmpBaseInfo::getCertificateNumb, empBaseInfo.getCertificateNumb()) |
| | | .ne(EmpBaseInfo::getDelFlag, 1);; |
| | | .ne(EmpBaseInfo::getDelFlag, 1); |
| | | ; |
| | | if (empBaseInfo.getEmpId()!=null) { |
| | | queryWrapper.lambda().ne(EmpBaseInfo::getEmpId, empBaseInfo.getEmpId()); |
| | | } |
| | |
| | | public List<EmpBaseInfo> listAll(QueryWrapper<EmpBaseInfo> wrapper) { |
| | | return this.baseMapper.listAll(wrapper); |
| | | } |
| | | |
| | | private String getCertificateListName(String certificateList, List<DicItem> dicItems) { |
| | | String tempName; |
| | | List<String> nameList = new ArrayList<>(); |
| | | String[] tempList = certificateList.split(","); |
| | | if (tempList.length > 0) { |
| | | for (int i = 0, len = tempList.length; i < len; i++) { |
| | | String tempValue = tempList[i]; |
| | | tempName = dicItems.stream() |
| | | .filter(k -> DicCode.CERTIFICATE_LIST.equals(k.getDicCode()) && k.getDicItemCode().equals(tempValue)) |
| | | .findFirst() |
| | | .map(DicItem::getDicItemName) |
| | | .orElse(tempValue); |
| | | nameList.add(tempName); |
| | | } |
| | | tempName = nameList.stream().collect(Collectors.joining(", ")); |
| | | } else { |
| | | tempName = ""; |
| | | } |
| | | return tempName; |
| | | } |
| | | } |