From 22c6e470be5e11387ee07189c9f05ea0304acb1c Mon Sep 17 00:00:00 2001 From: luyan Date: Fri, 4 Aug 2023 13:13:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E8=81=8C=E5=85=9A=E5=91=98=E6=8A=A5?= =?UTF-8?q?=E9=81=93=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=AF=BC=E5=87=BA=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=9B=E4=BF=AE=E6=94=B9=E5=88=97=E8=A1=A8=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E9=A1=B9=E7=9B=AE=EF=BC=8C=E5=B1=95=E7=A4=BA=E6=8A=A5?= =?UTF-8?q?=E9=81=93=E6=97=B6=E9=97=B4=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epdc/user/dto/party/ReportPartyDTO.java | 17 +++++++++++++++++ .../party/controller/ReportPartyController.java | 2 +- .../epdc/party/entity/ReportPartyEntity.java | 7 +++++++ .../esua/epdc/party/excel/ReportPartyExcel.java | 17 +++++++++++------ .../service/impl/ReportPartyServiceImpl.java | 5 +++-- 5 files changed, 39 insertions(+), 9 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/ReportPartyDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/ReportPartyDTO.java index 4c0317aad..a77943a56 100755 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/ReportPartyDTO.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/ReportPartyDTO.java @@ -19,7 +19,9 @@ package com.elink.esua.epdc.user.dto.party; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; +import java.util.Date; /** @@ -42,16 +44,19 @@ public class ReportPartyDTO implements Serializable { /** * 党员姓名 */ + @NotBlank(message = "姓名不能为空") private String name; /** * 身份证号码 */ + @NotBlank(message = "身份证号码不能为空") private String idCard; /** * 联系电话 */ + @NotBlank(message = "手机号码不能为空") private String mobile; /** @@ -72,11 +77,13 @@ public class ReportPartyDTO implements Serializable { /** * 居住小区名称 */ + @NotBlank(message = "小区名称不能为空") private String homeName; /** * 现工作单位 */ + @NotBlank(message = "现工作单位不能为空") private String workUnit; /** @@ -97,21 +104,25 @@ public class ReportPartyDTO implements Serializable { /** * 是否党员 0、否 1、是 */ + @NotBlank(message = "是否党员不能为空") private Integer party; /** * 是否愿意加入志愿者 0、否 1、是 */ + @NotBlank(message = "是否愿意加入志愿者不能为空") private Integer volunteer; /** * 是否愿意加入网格员 0、否 1、是 */ + @NotBlank(message = "是否愿意加入网格员不能为空") private Integer gridStaff; /** * 是否愿意加入业务委员会 0、否 1、是 */ + @NotBlank(message = "是否愿意加入业务委员会不能为空") private Integer owners; /** @@ -147,5 +158,11 @@ public class ReportPartyDTO implements Serializable { /** * 包联社区 */ + @NotBlank(message = "包联单位不能为空") private String[] couplingCommunity; + + /** + * 报到时间 + */ + private Date createdTime; } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/ReportPartyController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/ReportPartyController.java index 8bbc4ed86..ed7aadba4 100755 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/ReportPartyController.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/ReportPartyController.java @@ -104,7 +104,7 @@ public class ReportPartyController { @GetMapping("export") public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { List list = reportPartyService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, ReportPartyExcel.class); + ExcelUtils.exportExcelToTarget(response, "在职党员报道明细表", list, ReportPartyExcel.class); } } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/ReportPartyEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/ReportPartyEntity.java index bdece00b5..ba26e03b6 100755 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/ReportPartyEntity.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/ReportPartyEntity.java @@ -22,6 +22,8 @@ import com.elink.esua.epdc.commons.mybatis.entity.DeptScope; import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; + /** * 党员报道 * @@ -124,4 +126,9 @@ public class ReportPartyEntity extends DeptScope { * 包联社区 */ private String couplingCommunity; + + /** + * 报到时间 + */ + private Date createdTime; } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/ReportPartyExcel.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/ReportPartyExcel.java index 18b61f7d3..eb6664919 100755 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/ReportPartyExcel.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/ReportPartyExcel.java @@ -20,6 +20,8 @@ package com.elink.esua.epdc.party.excel; import cn.afterturn.easypoi.excel.annotation.Excel; import lombok.Data; +import java.util.Date; + /** * 党员报道 * @@ -38,8 +40,8 @@ public class ReportPartyExcel { @Excel(name = "联系电话") private String mobile; - @Excel(name = "社区id") - private Long deptId; + @Excel(name = "社区名称") + private String allDeptNames; @Excel(name = "居住小区名称") private String homeName; @@ -53,19 +55,22 @@ public class ReportPartyExcel { @Excel(name = "工作单位行业") private String workIndustry; + @Excel(name = "报到时间", format = "yyyy-MM-dd HH:mm:ss") + private Date createdTime; + @Excel(name = "特长") private String specialty; - @Excel(name = "是否党员 0、否 1、是") + @Excel(name = "是否党员", replace = {"否_0", "是_1"}) private Integer party; - @Excel(name = "是否愿意加入志愿者 0、否 1、是") + @Excel(name = "是否愿意加入志愿者", replace = {"否_0", "是_1"}) private Integer volunteer; - @Excel(name = "是否愿意加入网格员 0、否 1、是") + @Excel(name = "是否愿意加入网格员", replace = {"否_0", "是_1"}) private Integer gridStaff; - @Excel(name = "是否愿意加入业务委员会 0、否 1、是") + @Excel(name = "是否愿意加入业务委员会", replace = {"否_0", "是_1"}) private Integer owners; } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/ReportPartyServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/ReportPartyServiceImpl.java index f90fd14a1..f52284c42 100755 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/ReportPartyServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/ReportPartyServiceImpl.java @@ -83,11 +83,13 @@ public class ReportPartyServiceImpl extends BaseServiceImpl wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); wrapper.like(StringUtils.isNotBlank(name), FieldConstant.NAME_HUMP, name); wrapper.like(StringUtils.isNotBlank(idCard), FieldConstant.ID_CARD, idCard); wrapper.like(StringUtils.isNotBlank(mobile), FieldConstant.MOBILE_HUMP, mobile); + wrapper.likeLeft(StringUtils.isNotBlank(deptId), "PARENT_DEPT_IDS", deptId); return wrapper; } @@ -172,7 +174,7 @@ public class ReportPartyServiceImpl extends BaseServiceImpl