| | |
| | | import cc.mrbird.febs.common.core.entity.system.DicItem; |
| | | import cc.mrbird.febs.server.hr.entity.*; |
| | | import cc.mrbird.febs.server.hr.feign.IRemoteDicItemService; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpAccessoryMapper; |
| | | import cc.mrbird.febs.server.hr.po.AvailableResult; |
| | | import cc.mrbird.febs.server.hr.po.User; |
| | | import cc.mrbird.febs.server.hr.service.*; |
| | |
| | | private IEmpAccidentCasesService iEmpAccidentCasesService; |
| | | |
| | | @Autowired |
| | | private EmpAccessoryMapper empAccessoryMapper; |
| | | @Autowired |
| | | private IRemoteDicItemService iRemoteDicItemService; |
| | | Logger logger = LoggerFactory.getLogger(ExportPdfServiceImpl.class); |
| | | @Override |
| | |
| | | try { |
| | | //体检类型 |
| | | Map<String,String> physicalExamType = new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("PHYSICALEXAMTYPE")) { |
| | | List<DicItem> list=empAccessoryMapper.getDictType("PHYSICALEXAMTYPE"); |
| | | for (DicItem m: list) { |
| | | physicalExamType.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //心电图 |
| | | Map<String,String> ecg = new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("ECG")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("ECG")) { |
| | | ecg.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //合同状态 |
| | | Map<String,String> contractstatus = new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("CONTRACTSTATUS")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("CONTRACTSTATUS")) { |
| | | contractstatus.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //调岗类型 |
| | | Map<String,String> changeType = new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("changeType")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("changeType")) { |
| | | changeType.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //请假类型 |
| | | Map<String,String> leavetype = new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("LEAVETYPE")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("LEAVETYPE")) { |
| | | leavetype.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //入离职类型 |
| | | Map<String,String> lztype = new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("LZTYPE")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("LZTYPE")) { |
| | | lztype.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //社保档位 |
| | | Map<String,String> insuranceGaers = new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("insuranceGaers")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("insuranceGaers")) { |
| | | insuranceGaers.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //社保是否已经报告 |
| | | Map<String,String> reportStatus = new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("reportStatus")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("reportStatus")) { |
| | | reportStatus.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //社保状态 |
| | | Map<String,String> applayStatus = new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("applayStatus")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("applayStatus")) { |
| | | applayStatus.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //是否住院 |
| | | Map<String,String> hospitalizatioFlag = new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("hospitalizatioFlag")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("hospitalizatioFlag")) { |
| | | hospitalizatioFlag.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //仲裁类型 |
| | | Map<String,String> zctype = new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("ZCTYPE")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("ZCTYPE")) { |
| | | zctype.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //结案状态 |
| | | Map<String,String> settleStatus = new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("settleStatus")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("settleStatus")) { |
| | | settleStatus.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //性别 |
| | | Map<String,String> sex = new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("sex")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("sex")) { |
| | | sex.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //员工类别 |
| | | Map<String,String> empType = new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("EMPTYPE")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("EMPTYPE")) { |
| | | empType.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //民族 |
| | | Map<String,String> NATION = new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("NATION")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("NATION")) { |
| | | NATION.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //婚姻状态 |
| | | Map<String,String> MARRIAGE = new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("MARRIAGE")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("MARRIAGE")) { |
| | | MARRIAGE.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //政治面貌 |
| | | Map<String,String> PLITICAL = new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("PLITICAL")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("PLITICAL")) { |
| | | PLITICAL.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //最高学历 |
| | | Map<String,String> EDUCATION= new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("EDUCATION")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("EDUCATION") ) { |
| | | EDUCATION.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //籍贯 |
| | |
| | | }*/ |
| | | //保险类型 |
| | | Map<String,String> INSURANCETYPE= new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("INSURANCETYPE")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("INSURANCETYPE")) { |
| | | INSURANCETYPE.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //员工手册 |
| | | Map<String,String> handbookStatus= new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("handbookStatus")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("handbookStatus") ) { |
| | | handbookStatus.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //相关证件 |
| | | Map<String,String> certificateList= new HashMap<>(); |
| | | for (DicItem m: (List<DicItem>)iRemoteDicItemService.dictType("certificateList")) { |
| | | for (DicItem m: empAccessoryMapper.getDictType("certificateList")) { |
| | | certificateList.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | //相关证件 |
| | | Map<String,String> archivesStatus= new HashMap<>(); |
| | | for (DicItem m: empAccessoryMapper.getDictType("archivesStatus")) { |
| | | archivesStatus.put(m.getDicItemCode(),m.getDicItemName()); |
| | | } |
| | | |
| | | logger.info(">>>>>>>>>>开始导出pdf>>>>>>>>>>"); |
| | | //基本信息 |
| | | String[] baseinfo = { "档案号", "姓名", "性别", "部门(护卫点)", "岗位", "员工类别", "民族", "年龄", "婚姻状态", "身份证有效期" |
| | |
| | | |
| | | List<EmpBaseInfo> empBaseInfoList = iEmpBaseInfoService.findEmpBaseInfos(queryRequest, baseInfo).getRecords(); |
| | | for (EmpBaseInfo empBaseInfo: empBaseInfoList){ |
| | | empBaseInfo.setArchivesStatusName(archivesStatus.get(empBaseInfo.getArchivesStatus()==null?"":empBaseInfo.getArchivesStatus())); |
| | | empBaseInfo.setSexName(sex.get(empBaseInfo.getSex()==null?"":empBaseInfo.getSex())); |
| | | empBaseInfo.setEmpTypeName(empType.get(empBaseInfo.getEmpType()==null?"":empBaseInfo.getEmpType())); |
| | | empBaseInfo.setNationName(NATION.get(empBaseInfo.getNation()==null?"":empBaseInfo.getNation())); |