diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PopulationInformationController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PopulationInformationController.java index d62f4eab..513770cb 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PopulationInformationController.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PopulationInformationController.java @@ -106,7 +106,11 @@ public class PopulationInformationController { @GetMapping("export") public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { List list = populationInformationService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, PopulationInformationExcel.class); + String fileName = "居民-人口信息导出"; + if(list.size()>0){ + fileName = fileName.concat("("+list.size()+"条)"); + } + ExcelUtils.exportExcelToTarget(response, fileName, list, PopulationInformationExcel.class); } /** * @Description 判断身份证是否合法 diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/PopulationInformationExcel.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/PopulationInformationExcel.java index 183041bc..18d1816b 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/PopulationInformationExcel.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/PopulationInformationExcel.java @@ -31,22 +31,34 @@ import java.util.Date; @Data public class PopulationInformationExcel { - @Excel(name = "主键") - private String id; + /*@Excel(name = "主键") + private String id;*/ + + @Excel(name = "辖区范围") + private String gridNames; @Excel(name = "姓名") private String residentsName; - @Excel(name = "性别 (0:女 1:男)") + @Excel(name = "性别",replace = {"女_0","男_1"}) private String residentsSex; + @Excel(name = "联系电话") + private String residentsPhone; + + @Excel(name = "身份证号码") + private String residentsIdentityNo; + @Excel(name = "民族") private String residentsNation; - @Excel(name = "出生年/月") - private Date residentsBirthday; + @Excel(name = "户籍地") + private String householdRegistrationPlace; - @Excel(name = "文化程度") + /*@Excel(name = "出生年/月") + private Date residentsBirthday;*/ + + /*@Excel(name = "文化程度") private String educationLevel; @Excel(name = "政治面貌 (0:群众 1:党员)") @@ -58,11 +70,7 @@ public class PopulationInformationExcel { @Excel(name = "组织关系所在地") private String organizationalRelationshipLocation; - @Excel(name = "身份证号码") - private String residentsIdentityNo; - @Excel(name = "联系电话") - private String residentsPhone; @Excel(name = "身体状况 (0:病残 1:健康)") private String bodyStatus; @@ -76,9 +84,6 @@ public class PopulationInformationExcel { @Excel(name = "服兵役 (0:否 1:是)") private String militaryService; - @Excel(name = "户籍地") - private String householdRegistrationPlace; - @Excel(name = "就业情况 (0:在岗 1:就业)") private String employmentStatus; @@ -158,7 +163,7 @@ public class PopulationInformationExcel { private String allDeptIds; @Excel(name = "所有部门名称") - private String allDeptNames; + private String allDeptNames;*/ } \ No newline at end of file