From 538bdd36e4e0c43333e8090dab575cfa87af8f80 Mon Sep 17 00:00:00 2001
From: yubo <autumnal_wind@yeah.net>
Date: 星期二, 10 三月 2026 21:25:30 +0800
Subject: [PATCH] feat(hr): 添加员工导出和字典映射支持

---
 febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/controller/EmpBaseInfoController.java |   86 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 85 insertions(+), 1 deletions(-)

diff --git a/febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/controller/EmpBaseInfoController.java b/febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/controller/EmpBaseInfoController.java
index eb19d36..dfeef64 100644
--- a/febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/controller/EmpBaseInfoController.java
+++ b/febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/controller/EmpBaseInfoController.java
@@ -22,7 +22,6 @@
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
@@ -292,4 +291,89 @@
             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 = "退休提醒人员基本信息翻页列表")
+    @GetMapping("retire/alert")
+    @PreAuthorize("hasAuthority('empBaseinfo:list')")
+    public FebsResponse retirementAlertEmpBaseInfoList(QueryRequest request, EmpBaseInfo empBaseinfo) {
+        Map<String, Object> dataTable = FebsUtil.getDataTable(this.empBaseInfoService.findRetirementEmpBaseInfos(request, empBaseinfo));
+        return new FebsResponse().data(dataTable);
+    }
+
+    @ApiOperation(value = "退休解骋")
+    @PostMapping("retire/dismiss")
+    @PreAuthorize("hasAuthority('empBaseinfo:dimission')")
+    public void retireDismissionEmp(EmpDimissionLog empDimissionLog) throws FebsException {
+        try {
+            empDimissionLog.setDimissionDate(new Date());
+
+            this.empBaseInfoService.closeEmpArchives(empDimissionLog);
+        } catch (Exception e) {
+            String message = "退休解骋员工失败";
+            log.error(message, e);
+            throw new FebsException(message);
+        }
+    }
+    @ApiOperation(value = "转正提醒人员基本信息翻页列表")
+    @GetMapping("probation/alert")
+    @PreAuthorize("hasAuthority('empBaseinfo:list')")
+    public FebsResponse probationAlertEmpBaseInfoList(QueryRequest request, EmpBaseInfo empBaseinfo) {
+        Map<String, Object> dataTable = FebsUtil.getDataTable(this.empBaseInfoService.findProbationEmpBaseInfos(request, empBaseinfo));
+        return new FebsResponse().data(dataTable);
+    }
+    @ApiOperation(value = "设置人员转正信息")
+    @PostMapping("probation/change")
+    @PreAuthorize("hasAuthority('empBaseinfo:dimission')")
+    public void probationChangeEmpBaseInfo(EmpBaseInfo empBaseinfo) {
+        this.empBaseInfoService.probationEmpBaseInfo(empBaseinfo);
+    }
+    @ApiOperation(value = "导出员工")
+    @PostMapping(value = "export/insurance")
+    @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);
+    }
+
+    @ApiOperation(value = "导出退休提醒员工")
+    @PostMapping(value = "export/retirement")
+    @ControllerEndpoint(operation = "导出退休提醒数据", exceptionMessage = "导出Excel失败")
+    public void exportRetirementWithField(QueryRequest request, HttpServletResponse response, String exportField, EmpBaseInfo empBaseinfo) throws IOException {
+        request.setPageSize(25535);
+        request.setPageNum(1);
+        List<EmpBaseInfo> exportList = this.empBaseInfoService.findRetirementEmpBaseInfos(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);
+    }
+    @ApiOperation(value = "导出转正提醒员工")
+    @PostMapping(value = "export/probation")
+    @ControllerEndpoint(operation = "导出转正提醒数据", exceptionMessage = "导出Excel失败")
+    public void exportProbationWithField(QueryRequest request, HttpServletResponse response, String exportField, EmpBaseInfo empBaseinfo) throws IOException {
+        request.setPageSize(25535);
+        request.setPageNum(1);
+        List<EmpBaseInfo> exportList = this.empBaseInfoService.findProbationEmpBaseInfos(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);
+    }
+
 }

--
Gitblit v1.8.0