Merge remote-tracking branch 'origin/master'
| | |
| | | List<EmpBaseInfo> allRoles = empBaseInfoService.list(wrapper); |
| | | return new FebsResponse().data(allRoles); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出员工") |
| | | @RequestMapping(value = "export",method= RequestMethod.POST) |
| | | @ControllerEndpoint(operation = "导出用户数据", exceptionMessage = "导出Excel失败") |
| | |
| | | List<EmpBaseInfo> records = this.empBaseInfoService.findZsEmpBaseInfos(request, empBaseinfo).getRecords(); |
| | | ExcelKit.$Export(EmpBaseInfo.class, response).downXlsx(records, false); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出员工") |
| | | @RequestMapping(value = "exportWithField",method= RequestMethod.POST) |
| | | @ControllerEndpoint(operation = "导出用户数据", exceptionMessage = "导出Excel失败") |
| | | public void exportWithField(QueryRequest request, HttpServletResponse response, String exportField,EmpBaseInfo empBaseinfo) throws IOException { |
| | | request.setPageSize(25535); |
| | | request.setPageNum(1); |
| | | List<EmpBaseInfo> exportList = this.empBaseInfoService.findZsEmpBaseInfos(request, empBaseinfo).getRecords(); |
| | | List<Map<String, Object>> listMapDicItem = new ArrayList(); |
| | | List<Map<String, Object>> allList = PoiExportExcel.getDataList(exportField, exportList, listMapDicItem); |
| | | String fileName = "在职员工列表"; |
| | | Date currentDate = new Date(); |
| | | String dateStr = DateUtil.formatDate(currentDate); |
| | | boolean result = PoiExportExcel.exportCommonExcel(response, fileName + dateStr, fileName, allList); |
| | | } |
| | | |
| | | @ApiOperation(value = "导入员工") |
| | | @PostMapping("importEmp") |
| | |
| | | @TableField("deptId") |
| | | private Long deptId = 0L; |
| | | |
| | | @FieldInfo(name = "deptName", type = "varchar", explain = "部门名称") |
| | | @FieldInfo(name = "deptName", type = "varchar", explain = "部门(护卫点)") |
| | | @TableField("deptName") |
| | | @ExcelField(value = "护卫点(部门)") |
| | | private String deptName = ""; |
| | |
| | | @ExcelField(value = "员工类别", writeConverterExp = "1=正式工,2=临时工") |
| | | private String empType = ""; |
| | | |
| | | @FieldInfo(name = "empTypeName", type = "varchar", explain = "员工类别,员工类别字典表") |
| | | @FieldInfo(name = "empTypeName", type = "varchar", explain = "员工类别") |
| | | @TableField(exist = false) |
| | | private String empTypeName = ""; |
| | | |
| | |
| | | @TableField("handbookStatus") |
| | | @ExcelField(value = "员工手册", writeConverterExp = "0=未发,1=已发") |
| | | private String handbookStatus = ""; |
| | | |
| | | @FieldInfo(name = "handbookStatusName", type = "varchar", explain = "员工手册") |
| | | @TableField(exist = false) |
| | | @ExcelField(value = "员工手册") |
| | | private String handbookStatusName = ""; |
| | | |
| | | @FieldInfo(name = "urgencyPhone", type = "varchar", explain = "紧急联系电话") |
| | | @TableField("urgencyPhone") |
| | |
| | | @TableField("empCardStatus") |
| | | @ExcelField(value = "工作证", writeConverterExp = "0=未发,1=已发") |
| | | private String empCardStatus = ""; |
| | | |
| | | @FieldInfo(name = "empCardStatusName", type = "varchar", explain = "工作证") |
| | | @TableField(exist = false) |
| | | @ExcelField(value = "工作证") |
| | | private String empCardStatusName = ""; |
| | | |
| | | @FieldInfo(name = "certificateList", type = "varchar", explain = "相关证件") |
| | | @TableField("certificateList") |
| | |
| | | list.forEach(p -> { |
| | | p.setSexName("1".equals(p.getSex()) ? "男" : "女"); |
| | | p.setArchivesStatusName("0".equals(p.getArchivesStatus()) ? "未移交" : "已移交"); |
| | | p.setEmpCardStatusName("1".equals(p.getEmpCardStatus()) ? "未发" : "已发"); |
| | | p.setHandbookStatusName("1".equals(p.getHandbookStatus()) ? "未发" : "已发"); |
| | | //保险类型 |
| | | p.setInsuranceTypeName(dicItems.stream() |
| | | .filter(k -> DicCode.INSURANCETYPE.equals(k.getDicCode()) && k.getDicItemCode().equals(p.getInsuranceType())) |