| | |
| | | throw new FebsException("已存在此身份证号:" + empBaseinfo.getCertificateNumb()); |
| | | } |
| | | try { |
| | | empBaseinfo.setEntryType("20"); |
| | | this.empBaseInfoService.createEmpBaseInfo(empBaseinfo); |
| | | } catch (Exception e) { |
| | | String message = "新增员工基本信息失败"; |
| | |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "社保提醒人员基本信息翻页列表") |
| | | @GetMapping("insurance/alert") |
| | | @PreAuthorize("hasAuthority('empBaseinfo:list')") |
| | | public FebsResponse insuranceAlertEmpBaseInfoList(QueryRequest request, EmpBaseInfo empBaseinfo) { |
| | | Map<String, Object> dataTable = FebsUtil.getDataTable(this.empBaseInfoService.findInsuranceEmpBaseInfos(request, empBaseinfo)); |
| | | return new FebsResponse().data(dataTable); |
| | | } |
| | | @ApiOperation(value = "导出员工") |
| | | @RequestMapping(value = "export/insurance",method= RequestMethod.POST) |
| | | @ControllerEndpoint(operation = "导出社保提醒数据", exceptionMessage = "导出Excel失败") |
| | | public void exportInsuranceWithField(QueryRequest request, HttpServletResponse response, String exportField,EmpBaseInfo empBaseinfo) throws IOException { |
| | | request.setPageSize(25535); |
| | | request.setPageNum(1); |
| | | List<EmpBaseInfo> exportList = this.empBaseInfoService.findInsuranceEmpBaseInfos(request, empBaseinfo).getRecords(); |
| | | List<Map<String, Object>> allList = PoiExportExcel.getDataList(exportField, exportList, null); |
| | | String fileName = "社保四险员工列表"; |
| | | Date currentDate = new Date(); |
| | | String dateStr = DateUtil.formatDate(currentDate); |
| | | boolean result = PoiExportExcel.exportCommonExcel(response, fileName + dateStr, fileName, allList); |
| | | } |
| | | } |