| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | public class ExportPdfServiceImpl implements ExportPdfService { |
| | |
| | | } |
| | | //社保档位 |
| | | Map<String,String> insuranceGaers = new HashMap<>(); |
| | | for (DicItem m: empAccessoryMapper.getDictType("insuranceGaers")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("INSURANCETYPE")) { |
| | | insuranceGaers.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //社保是否已经报告 |
| | |
| | | .orElse("")); |
| | | empBaseInfo.setInsuranceTypeName(INSURANCETYPE.get(empBaseInfo.getInsuranceType()==null?"":empBaseInfo.getInsuranceType())); |
| | | empBaseInfo.setHandbookStatusName(handbookStatus.get(empBaseInfo.getHandbookStatus()==null?"":empBaseInfo.getHandbookStatus())); |
| | | empBaseInfo.setCertificateListName(certificateList.get(empBaseInfo.getCertificateList()==null?"":empBaseInfo.getCertificateList())); |
| | | empBaseInfo.setCertificateListName(getCertificateListName(empBaseInfo.getCertificateList(), certificateList)); |
| | | empBaseInfo.setEmpStatusName("0".equals(empBaseInfo.getEmpStatus()) ? "在职" : "离职"); |
| | | empBaseInfo.setEntryTypeName(dicItems.stream() |
| | | .filter(k -> DicCode.IN_OUT_TYPE.equals(k.getDicCode()) && k.getDicItemCode().equals(empBaseInfo.getEntryType())) |
| | |
| | | |
| | | List<EmpDimissionAttend> dimissionAttends = iEmpDimissionAttendService.findEmpDimissionattends(queryRequest, empDimissionAttend).getRecords(); |
| | | //入离职记录 |
| | | String[] dimissionLog = { "入职日期", "离职日期", "离职类型", "自离天数", "报备人", "备注"}; |
| | | String[] dimissionLog = { "部门/护卫点", "入职日期", "离职日期", "离职类型", "自离天数", "报备人", "备注"}; |
| | | EmpDimissionLog empDimissionLog=new EmpDimissionLog(); |
| | | empDimissionLog.setCertificateNumb(empNum); |
| | | empDimissionLog.setEmpId(empBaseInfo.getEmpId()); |
| | | empDimissionLog.setEmpStatus(empBaseInfo.getEmpStatus()); |
| | | List<Map<String, Object>> records1 = iEmpDimissionLogService.findEmpDimissionLogs(queryRequest, empDimissionLog).getRecords(); |
| | | for (Map<String, Object> objectMap:records1){ |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | private String getCertificateListName(String certificateList, Map<String,String> mapCertificate) { |
| | | String tempName; |
| | | List<String> nameList = new ArrayList<>(); |
| | | String[] tempList = certificateList.split(","); |
| | | // certificateList.get(empBaseInfo.getCertificateList() |
| | | if (tempList.length > 0) { |
| | | for (int i = 0, len = tempList.length; i < len; i++) { |
| | | String tempValue = tempList[i]; |
| | | tempName = mapCertificate.get(tempValue)==null?tempValue:mapCertificate.get(tempValue); |
| | | nameList.add(tempName); |
| | | } |
| | | tempName = nameList.stream().collect(Collectors.joining(", ")); |
| | | } else { |
| | | tempName = ""; |
| | | } |
| | | return tempName; |
| | | } |
| | | } |