diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 5dbc9f0cf2..948e607ed1 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -26,6 +26,7 @@ public enum EpmetErrorCode { MOBILE_GET_CODE_ERROR(8104,"获取验证码失败"), MESSAGE_SMS_SEND_ERROR(8105, "短信发送失败"), NOT_DEL_GRID(8106,"该网格存在工作人员,不允许删除"), + ORG_IS_NOT_NULL(8107,"党组织关系不能为空"), CANNOT_AUDIT_WARM(8201, "请完善居民信息"), NOT_DEL_AGENCY(8202, "该机关存在下级机关,不允许删除"), diff --git a/epmet-module/epmet-message/epmet-message-server/docker-compose.yml b/epmet-module/epmet-message/epmet-message-server/docker-compose.yml index 76db1b8a99..4acd697b6a 100644 --- a/epmet-module/epmet-message/epmet-message-server/docker-compose.yml +++ b/epmet-module/epmet-message/epmet-message-server/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-message-server: container_name: epmet-message-server-dev - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/epmet-message-server:0.3.1 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/epmet-message-server:0.3.2 ports: - "8085:8085" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-message/epmet-message-server/pom.xml b/epmet-module/epmet-message/epmet-message-server/pom.xml index b713085343..46bb33b442 100644 --- a/epmet-module/epmet-message/epmet-message-server/pom.xml +++ b/epmet-module/epmet-message/epmet-message-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.1 + 0.3.2 com.epmet epmet-message diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/UserMessageController.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/UserMessageController.java index 3c9a2ba01a..9f2ca4aea9 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/UserMessageController.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/UserMessageController.java @@ -132,4 +132,15 @@ public class UserMessageController { public Result> getMyMessageList(@RequestBody MymessageFormDTO params){ return userMessageService.getMyMessageList(params); } + + /** + * @param msgList + * @return com.epmet.commons.tools.utils.Result + * @Author sun + * @Description 批量插入未读消息 + **/ + @PostMapping("saveusermessagelist") + public Result saveUserMessageList(@RequestBody List msgList) { + return userMessageService.saveUserMessageList(msgList); + } } \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/UserMessageService.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/UserMessageService.java index 1555f73aed..ca08d47299 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/UserMessageService.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/UserMessageService.java @@ -127,4 +127,12 @@ public interface UserMessageService extends BaseService { * @return */ Result> getMyMessageList(MymessageFormDTO param); + + /** + * @param msgList + * @return com.epmet.commons.tools.utils.Result + * @Author sun + * @Description 批量插入未读消息 + **/ + Result saveUserMessageList(List msgList); } \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/UserMessageServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/UserMessageServiceImpl.java index 8354b9166c..e5f3a2ba9e 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/UserMessageServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/UserMessageServiceImpl.java @@ -165,4 +165,10 @@ public class UserMessageServiceImpl extends BaseServiceImpl>().ok(ConvertUtils.sourceToTarget(myMessageList, UserMessageDTO.class)); } + @Override + public Result saveUserMessageList(List msgList) { + List entityList = ConvertUtils.sourceToTarget(msgList, UserMessageEntity.class); + insertBatch(entityList); + return new Result(); + } } \ No newline at end of file diff --git a/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/form/CertifiedDetailFormDTO.java b/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/form/CertifiedDetailFormDTO.java new file mode 100644 index 0000000000..51dd48ddd8 --- /dev/null +++ b/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/form/CertifiedDetailFormDTO.java @@ -0,0 +1,34 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Auther zxc + * @Create 2020-04-27 13:33 + * 已认证党员详情 + */ +@Data +public class CertifiedDetailFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 党员认证信息表ID + */ + @NotBlank(message = "党员认证信息表ID不能为空") + private String partyMemberId; + + /** + * 党员自动审核表ID + */ + private String autoId; + + /** + * 党员人工审核表ID + */ + private String manualId; + +} diff --git a/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/CertifiedDetailResultDTO.java b/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/CertifiedDetailResultDTO.java new file mode 100644 index 0000000000..a14c38629e --- /dev/null +++ b/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/CertifiedDetailResultDTO.java @@ -0,0 +1,72 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Auther zxc + * @Create 2020-04-27 13:37 + * 已认证党员详情 + */ +@Data +public class CertifiedDetailResultDTO implements Serializable { + + private static final long serialVersionUID = -1L; + + /** + * 用户id + */ + private String userId; + + /** + * 真实姓名 + */ + private String realName; + + /** + * 联系手机号 + */ + private String mobile; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 认证网格:XXX街道-XXX社区-XXX网格 + */ + private String gridFullPath; + + /** + * 认证方式:自动认证auto、人工认证manual + */ + private String certifyType; + + /** + * 认证时间(提交认证的时间) + */ + private Long applyTime; + + /** + * 注册时间(进入本平台的时间) + */ + private Long certifyTime; + + /** + * 工作单位/所处街道 + */ + private String extraOrganization; + + /** + * 证明联系人 + */ + private String contactPeople; + + /** + * 证明联系人手机号 + */ + private String contactMobile; + +} diff --git a/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/CertifiedResultDTO.java b/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/CertifiedResultDTO.java index f7540d8b0b..ca3e6fd8c1 100644 --- a/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/CertifiedResultDTO.java +++ b/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/CertifiedResultDTO.java @@ -32,11 +32,26 @@ public class CertifiedResultDTO implements Serializable { /** * applyTime 申请时间 */ - private Integer applyTime; + private Long applyTime; /** * 提交网格:XXX街道-XXX社区-XXX网格 */ private String gridFullPath; + /** + * 党员认证信息表id + */ + private String partyMemberId; + + /** + * 党员自动审核表ID + */ + private String autoId; + + /** + * 党员人工审核表ID + */ + private String manualId; + } diff --git a/epmet-module/gov-grid/gov-grid-server/docker-compose.yml b/epmet-module/gov-grid/gov-grid-server/docker-compose.yml index 3dd48a1e3b..298855f42a 100644 --- a/epmet-module/gov-grid/gov-grid-server/docker-compose.yml +++ b/epmet-module/gov-grid/gov-grid-server/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-grid-server: container_name: gov-grid-server-dev - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/gov-grid-server:0.3.3 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/gov-grid-server:0.3.5 ports: - "8097:8097" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-grid/gov-grid-server/pom.xml b/epmet-module/gov-grid/gov-grid-server/pom.xml index 965969714d..2fba18c767 100644 --- a/epmet-module/gov-grid/gov-grid-server/pom.xml +++ b/epmet-module/gov-grid/gov-grid-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - 0.3.3 + 0.3.5 com.epmet gov-grid @@ -102,7 +102,7 @@ 0 - 127.0.0.1 + 192.168.1.130 6379 123456 diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiPartyMemberController.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiPartyMemberController.java index 18e000ed9a..86b3380ce0 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiPartyMemberController.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiPartyMemberController.java @@ -5,10 +5,19 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.AuditedPartyMemberFormDTO; import com.epmet.dto.form.AuditingPartyMemberFormDTO; +import com.epmet.dto.form.CertifiedDetailFormDTO; import com.epmet.dto.form.CertifiedFormDTO; +import com.epmet.dto.result.CertifiedDetailResultDTO; import com.epmet.dto.result.CertifiedResultDTO; import com.epmet.dto.result.AuditedPartyMemberResultDTO; import com.epmet.dto.result.AuditingPartyMemberResultDTO; +import com.epmet.resi.partymember.dto.partymember.form.AuditingDetailFromDTO; +import com.epmet.resi.partymember.dto.partymember.form.AutoFailedDetailFromDTO; +import com.epmet.resi.partymember.dto.partymember.form.PartyMemberConfirmFromDTO; +import com.epmet.resi.partymember.dto.partymember.form.RejectedDetailFromDTO; +import com.epmet.resi.partymember.dto.partymember.result.AuditingDetailResultDTO; +import com.epmet.resi.partymember.dto.partymember.result.AutoFailedDetailResultDTO; +import com.epmet.resi.partymember.dto.partymember.result.RejectedDetailResultDTO; import com.epmet.service.ResiPartyMemberService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -65,6 +74,66 @@ public class ResiPartyMemberController { public Result> certifiedList(@LoginUser TokenDto tokenDto, @RequestBody CertifiedFormDTO certifiedFormDTO){ return resiPartyMemberService.certifiedList(certifiedFormDTO); } + + /** + * + * @Description 已认证党员详情 + * @param: formDTO + * @Author zxc + * @CreatedTime 2020/4/27 13:54 + */ + @PostMapping(value = "/certifieddetail") + public Result certifiedDetail(@RequestBody CertifiedDetailFormDTO formDTO){ + return new Result().ok(resiPartyMemberService.certifiedDetail(formDTO)); + } + + /** + * 审核党员 + * + * @param fromDTO 参数 + * @return Result + * @author zhaoqifeng + */ + @PostMapping("audit") + public Result manualConfirmResult(@RequestBody PartyMemberConfirmFromDTO fromDTO) { + return resiPartyMemberService.manualConfirmResult(fromDTO); + } + + /** + * 待审核详情 + * + * @param fromDTO 参数 + * @return Result + * @author zhaoqifeng + */ + @PostMapping("auditingdetail") + public Result auditingDetail(@RequestBody AuditingDetailFromDTO fromDTO) { + return resiPartyMemberService.auditingDetail(fromDTO); + } + + /** + * 自动审核失败详情 + * + * @param fromDTO 参数 + * @return Result + * @author zhaoqifeng + */ + @PostMapping("autofaileddetail") + public Result autoFailedDetail(@RequestBody AutoFailedDetailFromDTO fromDTO) { + return resiPartyMemberService.autoFailedDetail(fromDTO); + } + + /** + * 拒绝详情 + * + * @param fromDTO 参数 + * @return Result + * @author zhaoqifeng + */ + @PostMapping("rejecteddetail") + public Result rejectedDetail(@RequestBody RejectedDetailFromDTO fromDTO) { + return resiPartyMemberService.rejectedDetail(fromDTO); + } } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java index c26f3978e6..c5be8fc73a 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java @@ -2,13 +2,13 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.CertifiedDetailFormDTO; import com.epmet.dto.form.CertifiedFormDTO; +import com.epmet.dto.result.CertifiedDetailResultDTO; import com.epmet.dto.result.CertifiedResultDTO; import com.epmet.feign.fallback.ResiPartymemberFeignClientFallBack; -import com.epmet.resi.partymember.dto.partymember.form.ReviewedParyMemberFormDTO; -import com.epmet.resi.partymember.dto.partymember.form.UnderReviewParyMemberFormDTO; -import com.epmet.resi.partymember.dto.partymember.result.ReviewedParyMemberResultDTO; -import com.epmet.resi.partymember.dto.partymember.result.UnderReviewParyMemberResultDTO; +import com.epmet.resi.partymember.dto.partymember.form.*; +import com.epmet.resi.partymember.dto.partymember.result.*; import com.epmet.resi.partymember.dto.warmhearted.form.*; import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmAuditResultDTO; import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedAuditedResultDTO; @@ -99,4 +99,53 @@ public interface ResiPartymemberFeignClient { @PostMapping(value = "/resi/partymember/partymemberinfo/certified") Result> certified(@RequestBody CertifiedFormDTO certifiedFormDTO); + /** + * + * @Description 已认证党员详情 + * @param: formDTO + * @Author zxc + * @CreatedTime 2020/4/27 15:22 + */ + @PostMapping(value = "/resi/partymember/partymemberinfo/certifieddetail") + Result certifiedDetail(@RequestBody CertifiedDetailFormDTO formDTO); + + /** + * 审核党员 + * + * @param fromDTO 参数 + * @return Result + * @author zhaoqifeng + */ + @PostMapping("/resi/partymember/confirm/audit") + Result manualConfirmResult(@RequestBody PartyMemberConfirmFromDTO fromDTO); + + /** + * 待审核详情 + * + * @param fromDTO 参数 + * @return Result + * @author zhaoqifeng + */ + @PostMapping("/resi/partymember/confirm/auditingdetail") + Result auditingDetail(@RequestBody AuditingDetailFromDTO fromDTO); + /** + * 自动审核失败详情 + * + * @param fromDTO 参数 + * @return Result + * @author zhaoqifeng + */ + @PostMapping("/resi/partymember/confirm/autofaileddetail") + Result autoFailedDetail(@RequestBody AutoFailedDetailFromDTO fromDTO); + + /** + * 拒绝详情 + * + * @param fromDTO 参数 + * @return Result + * @author zhaoqifeng + */ + @PostMapping("/resi/partymember/confirm/rejecteddetail") + Result rejectedDetail(@RequestBody RejectedDetailFromDTO fromDTO); + } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/ResiPartymemberFeignClientFallBack.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/ResiPartymemberFeignClientFallBack.java index 81621574bd..acab85141f 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/ResiPartymemberFeignClientFallBack.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/ResiPartymemberFeignClientFallBack.java @@ -3,13 +3,13 @@ package com.epmet.feign.fallback; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.CertifiedDetailFormDTO; import com.epmet.dto.form.CertifiedFormDTO; +import com.epmet.dto.result.CertifiedDetailResultDTO; import com.epmet.dto.result.CertifiedResultDTO; import com.epmet.feign.ResiPartymemberFeignClient; -import com.epmet.resi.partymember.dto.partymember.form.ReviewedParyMemberFormDTO; -import com.epmet.resi.partymember.dto.partymember.form.UnderReviewParyMemberFormDTO; -import com.epmet.resi.partymember.dto.partymember.result.ReviewedParyMemberResultDTO; -import com.epmet.resi.partymember.dto.partymember.result.UnderReviewParyMemberResultDTO; +import com.epmet.resi.partymember.dto.partymember.form.*; +import com.epmet.resi.partymember.dto.partymember.result.*; import com.epmet.resi.partymember.dto.warmhearted.form.*; import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmAuditResultDTO; import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedAuditedResultDTO; @@ -64,4 +64,29 @@ public class ResiPartymemberFeignClientFallBack implements ResiPartymemberFeignC return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "certified", certifiedFormDTO); } + @Override + public Result certifiedDetail(CertifiedDetailFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "certifiedDetail", formDTO); + } + + @Override + public Result manualConfirmResult(PartyMemberConfirmFromDTO fromDTO) { + return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "manualConfirmResult", fromDTO); + } + + @Override + public Result auditingDetail(AuditingDetailFromDTO fromDTO) { + return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "auditingDetail", fromDTO); + } + + @Override + public Result autoFailedDetail(AutoFailedDetailFromDTO fromDTO) { + return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "autoFailedDetail", fromDTO); + } + + @Override + public Result rejectedDetail(RejectedDetailFromDTO fromDTO) { + return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "rejectedDetail", fromDTO); + } + } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiPartyMemberService.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiPartyMemberService.java index 7efe7528f3..f0a2bdb58e 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiPartyMemberService.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiPartyMemberService.java @@ -1,16 +1,26 @@ package com.epmet.service; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.AuditedPartyMemberFormDTO; import com.epmet.dto.form.AuditingPartyMemberFormDTO; +import com.epmet.dto.form.CertifiedDetailFormDTO; import com.epmet.dto.form.CertifiedFormDTO; +import com.epmet.dto.result.CertifiedDetailResultDTO; import com.epmet.dto.result.CertifiedResultDTO; -import org.springframework.web.bind.annotation.RequestBody; import java.util.List; import com.epmet.dto.result.AuditedPartyMemberResultDTO; import com.epmet.dto.result.AuditingPartyMemberResultDTO; +import org.springframework.web.bind.annotation.RequestBody; +import com.epmet.resi.partymember.dto.partymember.form.AuditingDetailFromDTO; +import com.epmet.resi.partymember.dto.partymember.form.AutoFailedDetailFromDTO; +import com.epmet.resi.partymember.dto.partymember.form.PartyMemberConfirmFromDTO; +import com.epmet.resi.partymember.dto.partymember.form.RejectedDetailFromDTO; +import com.epmet.resi.partymember.dto.partymember.result.AuditingDetailResultDTO; +import com.epmet.resi.partymember.dto.partymember.result.AutoFailedDetailResultDTO; +import com.epmet.resi.partymember.dto.partymember.result.RejectedDetailResultDTO; import java.util.List; @@ -36,6 +46,7 @@ public interface ResiPartyMemberService { * @Date 2020/4/26 23:32 **/ Result> audited(AuditedPartyMemberFormDTO formDTO); + /** * * @Description 获取已认证党员 @@ -45,4 +56,50 @@ public interface ResiPartyMemberService { * @CreatedTime 2020/4/26 16:18 */ Result> certifiedList(CertifiedFormDTO certifiedFormDTO); + + + /** + * + * @Description 已认证党员详情 + * @param: formDTO + * @Author zxc + * @CreatedTime 2020/4/27 14:23 + */ + CertifiedDetailResultDTO certifiedDetail(CertifiedDetailFormDTO formDTO); + + /** + * 人工审核结果 + * + * @param fromDTO + * @return + * @author zhaoqifeng + */ + Result manualConfirmResult(PartyMemberConfirmFromDTO fromDTO); + + /** + * 待审核详情 + * + * @param fromDTO + * @return + * @author zhaoqifeng + */ + Result auditingDetail(AuditingDetailFromDTO fromDTO); + + /** + * 自动审核失败详情 + * + * @param fromDTO + * @return + * @author zhaoqifeng + */ + Result autoFailedDetail(AutoFailedDetailFromDTO fromDTO); + + /** + * 拒绝详情 + * + * @param fromDTO + * @return + * @author zhaoqifeng + */ + Result rejectedDetail(RejectedDetailFromDTO fromDTO); } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiPartyMemberServiceImpl.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiPartyMemberServiceImpl.java index 2345960135..68482892fb 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiPartyMemberServiceImpl.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiPartyMemberServiceImpl.java @@ -6,16 +6,16 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.AuditedPartyMemberFormDTO; import com.epmet.dto.form.AuditingPartyMemberFormDTO; +import com.epmet.dto.form.CertifiedDetailFormDTO; import com.epmet.dto.form.CertifiedFormDTO; +import com.epmet.dto.result.CertifiedDetailResultDTO; import com.epmet.dto.result.CertifiedResultDTO; import com.epmet.feign.ResiPartymemberFeignClient; import com.epmet.dto.result.AuditedPartyMemberResultDTO; import com.epmet.dto.result.AuditingPartyMemberResultDTO; import com.epmet.feign.ResiPartymemberFeignClient; -import com.epmet.resi.partymember.dto.partymember.form.ReviewedParyMemberFormDTO; -import com.epmet.resi.partymember.dto.partymember.form.UnderReviewParyMemberFormDTO; -import com.epmet.resi.partymember.dto.partymember.result.ReviewedParyMemberResultDTO; -import com.epmet.resi.partymember.dto.partymember.result.UnderReviewParyMemberResultDTO; +import com.epmet.resi.partymember.dto.partymember.form.*; +import com.epmet.resi.partymember.dto.partymember.result.*; import com.epmet.service.ResiPartyMemberService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -84,5 +84,39 @@ public class ResiPartyMemberServiceImpl implements ResiPartyMemberService { public Result> certifiedList(CertifiedFormDTO certifiedFormDTO) { return resiPartymemberFeignClient.certified(certifiedFormDTO); } + + /** + * + * @Description 已认证党员详情 + * @param: formDTO + * @Author zxc + * @CreatedTime 2020/4/27 13:54 + */ + @Override + public CertifiedDetailResultDTO certifiedDetail(CertifiedDetailFormDTO formDTO) { + CertifiedDetailResultDTO partyMemberDetail = resiPartymemberFeignClient.certifiedDetail(formDTO).getData(); + + return partyMemberDetail; + } + + @Override + public Result manualConfirmResult(PartyMemberConfirmFromDTO fromDTO) { + return resiPartymemberFeignClient.manualConfirmResult(fromDTO); + } + + @Override + public Result auditingDetail(AuditingDetailFromDTO fromDTO) { + return resiPartymemberFeignClient.auditingDetail(fromDTO); + } + + @Override + public Result autoFailedDetail(AutoFailedDetailFromDTO fromDTO) { + return resiPartymemberFeignClient.autoFailedDetail(fromDTO); + } + + @Override + public Result rejectedDetail(RejectedDetailFromDTO fromDTO) { + return resiPartymemberFeignClient.rejectedDetail(fromDTO); + } } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyAndStaffsResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyAndStaffsResultDTO.java new file mode 100644 index 0000000000..cde61478b9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyAndStaffsResultDTO.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.result; + +import com.epmet.dto.CustomerGridDTO; +import com.epmet.dto.CustomerStaffGridDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + + +/** + * 根据网格ID查询网格信息、查询网格下所有工作人员列表-接口返参 + * + * @author sun + */ +@Data +public class AgencyAndStaffsResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格基本信息 + */ + private CustomerGridDTO customerGridDTO; + /** + * 网格下工作人员列表 + */ + private List staffList; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/docker-compose.yml b/epmet-module/gov-org/gov-org-server/docker-compose.yml index 5e17e279db..1e52769fd4 100644 --- a/epmet-module/gov-org/gov-org-server/docker-compose.yml +++ b/epmet-module/gov-org/gov-org-server/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-org-server: container_name: gov-org-server-dev - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/gov-org-server:0.3.7 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/gov-org-server:0.3.10 ports: - "8092:8092" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml index 4854e648d9..dd2bd83b35 100644 --- a/epmet-module/gov-org/gov-org-server/pom.xml +++ b/epmet-module/gov-org/gov-org-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.7 + 0.3.10 com.epmet gov-org diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerGridConstant.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerGridConstant.java new file mode 100644 index 0000000000..fe636fdcc2 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerGridConstant.java @@ -0,0 +1,13 @@ +package com.epmet.constant; + +/** + * @author sun + * @dscription + */ +public interface CustomerGridConstant { + + /** + * 根据网格Id未查询到网格信息 + */ + String SELECT_EXCEPTION = "根据网格Id未查询到网格信息"; +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java index 77e3b82908..834aa9bd1c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java @@ -27,12 +27,9 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.form.SelectGridNameByGridIdFormDTO; -import com.epmet.dto.result.SelectGridNameByGridIdResultDTO; +import com.epmet.dto.result.*; import com.epmet.dto.form.CustomerGridFormDTO; import com.epmet.dto.form.ListCustomerGridFormDTO; -import com.epmet.dto.result.CustomerGridByUserIdResultDTO; -import com.epmet.dto.result.CustomerGridForStrangerResultDTO; -import com.epmet.dto.result.GridInfoResultDTO; import com.epmet.excel.CustomerGridExcel; import com.epmet.service.CustomerGridService; import org.springframework.beans.factory.annotation.Autowired; @@ -162,4 +159,16 @@ public class CustomerGridController { public Result> getMyGrids(@PathVariable("userId") String userId) { return customerGridService.getMyGrids(userId); } + + /** + * @param gridId + * @return + * @Author sun + * @Description 根据网格id查询所属组织信息、根据网格Id查询网格下所有工作人员列表 + **/ + @PostMapping("getagencyandstaffsbygridid/{gridId}") + public Result getAgencyAndStaffsBygridId(@PathVariable("gridId") String gridId) { + return customerGridService.getAgencyAndStaffsBygridId(gridId); + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java index 37e60a010a..7e4219012e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java @@ -123,7 +123,7 @@ public interface CustomerGridDao extends BaseDao { * @param gridName * @return */ - String selectGridIdByGridName(@Param("gridName")String gridName,@Param("agencyId")String pid); + String selectGridIdByGridName(@Param("gridName")String gridName,@Param("agencyId")String pid,@Param("gridId")String gridId); /** * 编辑网格信息 diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java index 636787ce9c..7a01c76048 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java @@ -74,4 +74,12 @@ public interface CustomerStaffGridDao extends BaseDao { * @Date 2020.04.27 16:43 **/ void updateByStaffIdAndGridId(CustomerStaffGridDTO staffGridDTO); + + /** + * @param gridId + * @return + * @Description 根据网格Id查询网格下工作人员列表 + * @Author sun + */ + List selectByGridId(@Param("gridId")String gridId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java index cb9c9724e2..76459d1de6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java @@ -212,4 +212,11 @@ public interface CustomerGridService extends BaseService { **/ Result addGridStaffs(CommonGridStaffListFromDTO staffListFormDTO); + /** + * @param gridId + * @return + * @Author sun + * @Description 根据网格id查询所属组织信息、根据网格Id查询网格下所有工作人员列表 + **/ + Result getAgencyAndStaffsBygridId(String gridId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java index 4e4af80612..3271e2b6f9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java @@ -23,25 +23,20 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.CustomerGridConstant; import com.epmet.dao.CustomerGridDao; -import com.epmet.dto.CustomerAgencyDTO; -import com.epmet.dto.CustomerGridDTO; -import com.epmet.dto.form.CustomerGridFormDTO; -import com.epmet.dto.form.ListCustomerGridFormDTO; -import com.epmet.dto.form.SelectGridNameByGridIdFormDTO; -import com.epmet.dto.result.CustomerGridForStrangerResultDTO; -import com.epmet.dto.result.SelectGridNameByGridIdResultDTO; -import com.epmet.dto.result.GridInfoResultDTO; import com.epmet.dao.CustomerStaffGridDao; import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.CustomerGridEntity; import com.epmet.feign.EpmetUserFeignClient; +import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedFormDTO; import com.epmet.service.CustomerAgencyService; import com.epmet.service.CustomerGridService; import com.epmet.service.CustomerStaffGridService; @@ -202,7 +197,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl addGrid(TokenDto tokenDto, AddGridFormDTO addGridFormDTO) { - String checkGridName = baseDao.selectGridIdByGridName(addGridFormDTO.getGridName(),addGridFormDTO.getAgencyId()); + String checkGridName = baseDao.selectGridIdByGridName(addGridFormDTO.getGridName(),addGridFormDTO.getAgencyId(),null); if (checkGridName!=null){ return new Result().error(EpmetErrorCode.NOT_ADD_GRID.getCode()); } @@ -217,7 +212,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl().ok(addGridResultDTO); @@ -231,7 +226,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl().ok(baseDao.selectGridNameByGridId(formDTO)); } + /** + * @param gridId + * @return + * @Author sun + * @Description 根据网格id查询所属组织信息、根据网格Id查询网格下所有工作人员列表 + **/ + @Override + public Result getAgencyAndStaffsBygridId(String gridId) { + Result result = new Result<>(); + AgencyAndStaffsResultDTO agencyAndStaffsResultDTO = new AgencyAndStaffsResultDTO(); + //1:查询网格基本信息 + CustomerGridEntity gridEntity = baseDao.selectById(gridId); + if (null == gridEntity) { + throw new RenException(CustomerGridConstant.SELECT_EXCEPTION); + } + CustomerGridDTO CustomerGridDTO = ConvertUtils.sourceToTarget(gridEntity, CustomerGridDTO.class); + agencyAndStaffsResultDTO.setCustomerGridDTO(CustomerGridDTO); + //2:查询网格下工作人员列表 + List staffList = customerStaffGridDao.selectByGridId(gridId); + agencyAndStaffsResultDTO.setStaffList(staffList); + return result.ok(agencyAndStaffsResultDTO); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/epmet_gov_org.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/epmet_gov_org.sql index aa68f1c8fa..5e1a40bd0b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/epmet_gov_org.sql +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/epmet_gov_org.sql @@ -102,8 +102,8 @@ ALTER TABLE customer_grid MODIFY COLUMN LATITUDE VARCHAR(32) DEFAULT NULL COMME ALTER TABLE customer_grid MODIFY COLUMN AREA_CODE VARCHAR(32) DEFAULT NULL COMMENT '所属地区码(所属组织地区码)'; alter table customer_grid drop column GRID_CODE; alter table customer_grid drop column SORT; +alter table customer_grid drop column ORG_ID; -alter table customer_grid add column ORG_ID varchar(64) NOT NULL COMMENT '所属组织机构ID(customer_organization.id)'; alter table customer_grid add column MANAGE_DISTRICT varchar(255) DEFAULT "" NOT NULL COMMENT '管辖区域'; alter table customer_grid add column TOTAL_USER INT(11) DEFAULT 0 NOT NULL COMMENT '当前网格总人数'; ALTER TABLE customer_agency ADD ( diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml index e5873c263f..fc801f289a 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml @@ -93,7 +93,7 @@ - + diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml index 882c0132f7..b4490ab565 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml @@ -3,19 +3,18 @@ - - - - - - - - - - - - - + + csg.id AS "id", + csg.user_id AS "userId", + csg.grid_id AS "gridId", + csg.customer_id AS "customerId", + csg.del_flag AS "delflag", + csg.revision AS "revision", + csg.created_by AS "createdby", + csg.created_time AS "createdtime", + csg.updated_by AS "updatedby", + csg.updated_time AS "updatedtime" + + + insert into customer_staff_grid diff --git a/epmet-module/resi-group/resi-group-server/docker-compose.yml b/epmet-module/resi-group/resi-group-server/docker-compose.yml index 4dcf9c6a7e..687b044179 100644 --- a/epmet-module/resi-group/resi-group-server/docker-compose.yml +++ b/epmet-module/resi-group/resi-group-server/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-group-server: container_name: resi-group-server-dev - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/resi-group-server:0.3.2 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/resi-group-server:0.3.3 ports: - "8095:8095" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-group/resi-group-server/pom.xml b/epmet-module/resi-group/resi-group-server/pom.xml index fb3332aeb1..b246579931 100644 --- a/epmet-module/resi-group/resi-group-server/pom.xml +++ b/epmet-module/resi-group/resi-group-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.2 + 0.3.3 com.epmet resi-group diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberServiceImpl.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberServiceImpl.java index eb13aa4bd1..447055431a 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberServiceImpl.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberServiceImpl.java @@ -1,5 +1,6 @@ package com.epmet.modules.partymember.service.impl; +import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.modules.feign.ResiPartymemberFeignClient; @@ -9,6 +10,7 @@ import com.epmet.resi.mine.dto.from.PartyMemberSubmitFromDTO; import com.epmet.resi.mine.dto.from.VerificationCodeFromDTO; import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO; import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; +import org.apache.poi.ss.formula.constant.ErrorConstant; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -49,6 +51,9 @@ public class PartyMemberServiceImpl implements PartyMemberService { @Override public Result partyMemberInfoExtra(TokenDto tokenDto, PartyMemberSubmitFromDTO fromDTO) { PartymemberInfoDTO partyMemberInfo = fromDTO.getPartyMemberInfo(); + if (null == partyMemberInfo.getExtraOrganization() || partyMemberInfo.getExtraOrganization().isEmpty()) { + return new Result().error(EpmetErrorCode.ORG_IS_NOT_NULL.getCode(), EpmetErrorCode.ORG_IS_NOT_NULL.getMsg()); + } partyMemberInfo.setCustomerId(fromDTO.getCustomerId()); partyMemberInfo.setGridId(fromDTO.getGridId()); partyMemberInfo.setUserId(tokenDto.getUserId()); diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/AuditingDetailFromDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/AuditingDetailFromDTO.java new file mode 100644 index 0000000000..387c68772c --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/AuditingDetailFromDTO.java @@ -0,0 +1,29 @@ +package com.epmet.resi.partymember.dto.partymember.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/4/27 13:48 + */ +@Data +public class AuditingDetailFromDTO implements Serializable { + private static final long serialVersionUID = 1L; + /** + * 党员认证信息表ID + */ + private String partyMemberId; + + /** + * 党员自动审核表ID + */ + private String autoId; + + /** + * 党员人工审核表ID + */ + private String manualId; +} diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/AutoFailedDetailFromDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/AutoFailedDetailFromDTO.java new file mode 100644 index 0000000000..f1f438117e --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/AutoFailedDetailFromDTO.java @@ -0,0 +1,24 @@ +package com.epmet.resi.partymember.dto.partymember.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/4/27 14:48 + */ +@Data +public class AutoFailedDetailFromDTO implements Serializable { + private static final long serialVersionUID = 1L; + /** + * 党员认证信息表ID + */ + private String partyMemberId; + + /** + * 党员自动审核表ID + */ + private String autoId; +} diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/CertifiedDetailFormDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/CertifiedDetailFormDTO.java new file mode 100644 index 0000000000..27837e9f03 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/CertifiedDetailFormDTO.java @@ -0,0 +1,34 @@ +package com.epmet.resi.partymember.dto.partymember.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Auther zxc + * @Create 2020-04-27 13:33 + * 已认证党员详情 + */ +@Data +public class CertifiedDetailFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 党员认证信息表ID + */ + @NotBlank(message = "党员认证信息表ID不能为空") + private String partyMemberId; + + /** + * 党员自动审核表ID + */ + private String autoId; + + /** + * 党员人工审核表ID + */ + private String manualId; + +} diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberConfirmFromDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberConfirmFromDTO.java new file mode 100644 index 0000000000..a530da6850 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberConfirmFromDTO.java @@ -0,0 +1,39 @@ +package com.epmet.resi.partymember.dto.partymember.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/4/10 11:11 + */ +@Data +public class PartyMemberConfirmFromDTO implements Serializable { + private static final long serialVersionUID = 1L; + /** + * 党员认证信息表ID + */ + private String partyMemberId; + + /** + * 党员自动审核表ID + */ + private String autoId; + + /** + * 党员人工审核表ID + */ + private String manualId; + + /** + * 审核状态 yes,no + */ + private String partyMemberFlag; + + /** + * 审核理由 + */ + private String reason; +} diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/RejectedDetailFromDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/RejectedDetailFromDTO.java new file mode 100644 index 0000000000..5b8f84da86 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/RejectedDetailFromDTO.java @@ -0,0 +1,29 @@ +package com.epmet.resi.partymember.dto.partymember.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/4/27 15:16 + */ +@Data +public class RejectedDetailFromDTO implements Serializable { + private static final long serialVersionUID = 1L; + /** + * 党员认证信息表ID + */ + private String partyMemberId; + + /** + * 党员自动审核表ID + */ + private String autoId; + + /** + * 党员人工审核表ID + */ + private String manualId; +} diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/AdditionalInfoDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/AdditionalInfoDTO.java new file mode 100644 index 0000000000..b6a981f6d0 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/AdditionalInfoDTO.java @@ -0,0 +1,32 @@ +package com.epmet.resi.partymember.dto.partymember.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/4/27 13:52 + */ +@Data +public class AdditionalInfoDTO implements Serializable { + private static final long serialVersionUID = 1L; + /** + * 工作单位或所属街道 + */ + private String extraOrganization; + /** + * 联系人 + */ + private String contactPeople; + /** + * 联系方式 + */ + private String contactMobile; + /** + * 自动审核失败原因 + */ + private List failedReason; +} diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/AuditingDetailResultDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/AuditingDetailResultDTO.java new file mode 100644 index 0000000000..a86ee343bb --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/AuditingDetailResultDTO.java @@ -0,0 +1,65 @@ +package com.epmet.resi.partymember.dto.partymember.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/4/27 13:50 + */ +@NoArgsConstructor +@Data +public class AuditingDetailResultDTO implements Serializable { + private static final long serialVersionUID = 1L; + /** + * 党员认证信息ID + */ + private String partyMemberId; + /** + * 党员自动审核ID + */ + private String autoId; + /** + * 党员人工审核ID + */ + private String manualId; + /** + * 居民id + */ + private String userId; + /** + * 真实姓名 + */ + private String realName; + /** + * 联系方式 + */ + private String mobile; + /** + * 身份证号 + */ + private String idCard; + /** + * 提交网格:XXX街道-XXX社区-XXX网格 + */ + private String gridFullPath; + /** + * 居民住址 + */ + private String address; + /** + * 提交认证时间 + */ + private Long certifyTime; + + /** + * 补充信息 + */ + private AdditionalInfoDTO additionalInfo; + + +} diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/AutoFailedDetailResultDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/AutoFailedDetailResultDTO.java new file mode 100644 index 0000000000..7000c5f240 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/AutoFailedDetailResultDTO.java @@ -0,0 +1,49 @@ +package com.epmet.resi.partymember.dto.partymember.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/4/27 14:49 + */ +@NoArgsConstructor +@Data +public class AutoFailedDetailResultDTO implements Serializable { + private static final long serialVersionUID = 1L; + /** + * 居民ID + */ + private String userId; + /** + * 姓名 + */ + private String realName; + /** + * 联系方式 + */ + private String mobile; + /** + * 身份证号 + */ + private String idCard; + /** + * 提交网格 + */ + private String gridFullPath; + /** + * 居住地址 + */ + private String address; + /** + * 提交时间 + */ + private Long certifyTime; + /** + * 自动审核失败原因以逗号隔开 + */ + private String failedReason; +} diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/CertifiedDetailResultDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/CertifiedDetailResultDTO.java new file mode 100644 index 0000000000..19681fbbd5 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/CertifiedDetailResultDTO.java @@ -0,0 +1,77 @@ +package com.epmet.resi.partymember.dto.partymember.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Auther zxc + * @Create 2020-04-27 13:37 + * 已认证党员详情 + */ +@Data +public class CertifiedDetailResultDTO implements Serializable { + + private static final long serialVersionUID = -1L; + + /** + * 用户id + */ + private String userId; + + /** + * 真实姓名(姓+名) + */ + private String realName; + + /** + * 联系手机号 + */ + private String mobile; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 网格id + */ + private String gridId; + + /** + * 认证网格:XXX街道-XXX社区-XXX网格 + */ + private String gridFullPath; + + /** + * 认证方式:自动认证auto、人工认证manual + */ + private String certifyType; + + /** + * 认证时间(提交认证的时间) + */ + private Long applyTime; + + /** + * 注册时间(进入本平台的时间) + */ + private Long certifyTime; + + /** + * 工作单位/所处街道 + */ + private String extraOrganization; + + /** + * 证明联系人 + */ + private String contactPeople; + + /** + * 证明联系人手机号 + */ + private String contactMobile; + +} diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/CertifiedResultDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/CertifiedResultDTO.java index 9e5568441b..1c4dddc50c 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/CertifiedResultDTO.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/CertifiedResultDTO.java @@ -39,4 +39,19 @@ public class CertifiedResultDTO implements Serializable { */ private String gridFullPath; + /** + * 党员认证信息表id + */ + private String partyMemberId; + + /** + * 党员自动审核表ID + */ + private String autoId; + + /** + * 党员人工审核表ID + */ + private String manualId; + } diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/RejectedDetailResultDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/RejectedDetailResultDTO.java new file mode 100644 index 0000000000..275490c991 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/RejectedDetailResultDTO.java @@ -0,0 +1,66 @@ +package com.epmet.resi.partymember.dto.partymember.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/4/27 15:17 + */ +@NoArgsConstructor +@Data +public class RejectedDetailResultDTO implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 居民ID + */ + private String userId; + /** + * 姓名 + */ + private String realName; + /** + * 联系方式 + */ + private String mobile; + /** + * 身份证号 + */ + private String idCard; + /** + * 提交网格XXX街道-XXX社区-XXX网格 + */ + private String gridFullPath; + /** + * 居住地址 + */ + private String address; + /** + * 提交认证时间 + */ + private Long certifyTime; + /** + * 拒绝理由 + */ + private String rejectedReason; + /** + * 工作单位/所属街道 + */ + private String extraOrganization; + /** + * 联系人 + */ + private String contactPeople; + /** + * 联系方式 + */ + private String contactMobile; + /** + * 自动审核失败的原因 + */ + private String failedReason; +} diff --git a/epmet-module/resi-partymember/resi-partymember-server/docker-compose.yml b/epmet-module/resi-partymember/resi-partymember-server/docker-compose.yml index 99851f497e..301889b368 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/docker-compose.yml +++ b/epmet-module/resi-partymember/resi-partymember-server/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-partymember-server: container_name: resi-partymember-server-dev - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/resi-partymember-server:0.3.2 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/resi-partymember-server:0.3.4 ports: - "8096:8096" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-partymember/resi-partymember-server/pom.xml b/epmet-module/resi-partymember/resi-partymember-server/pom.xml index ce7eabb912..4fef6fe526 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/pom.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.2 + 0.3.4 com.epmet resi-partymember diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/constant/PartyMemberConstant.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/constant/PartyMemberConstant.java index d73c5178bc..bb0795b43b 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/constant/PartyMemberConstant.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/constant/PartyMemberConstant.java @@ -122,17 +122,17 @@ public interface PartyMemberConstant { String ALL = "all"; /** - * 认证成功 + * 居民端 */ - String CONFIRM_SUCCESS = "0"; + String RESI = "resi"; /** - * 认证失败 + * 未读 */ - String CONFIRM_FAILED = "1"; + String UNREAD = "unread"; /** - * 居民端 + * 已读 */ - String RESI = "resi"; + String READ = "read"; } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/EpmetMessageFeignClient.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/EpmetMessageFeignClient.java index 50b8cf9bb5..087d63bab0 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/EpmetMessageFeignClient.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/EpmetMessageFeignClient.java @@ -10,6 +10,8 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; +import java.util.List; + /** * @author kamui */ @@ -33,4 +35,13 @@ public interface EpmetMessageFeignClient { @PostMapping(value = "message/usermessage/saveusermessage", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) Result saveUserMessage(UserMessageFormDTO formDto); + /** + * @param msgList + * @return com.epmet.commons.tools.utils.Result + * @Author sun + * @Description 热心居民申请给网格长们发送消息 + **/ + @PostMapping(value = "message/usermessage/saveusermessagelist", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) + Result saveUserMessageList(List msgList); + } \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/EpmetUserFeignClient.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/EpmetUserFeignClient.java index 7b3b142878..a23b38f95d 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/EpmetUserFeignClient.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/EpmetUserFeignClient.java @@ -4,12 +4,15 @@ import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.UserResiInfoDTO; import com.epmet.dto.UserRoleDTO; +import com.epmet.dto.form.CreatedTimeByUserIdFormDTO; +import com.epmet.dto.form.StaffRoleFormDTO; import com.epmet.dto.form.UserResiInfoFormDTO; import com.epmet.dto.form.UserResiInfoListFormDTO; import com.epmet.dto.result.CertifiedResultDTO; +import com.epmet.dto.result.CreatedTimeByUserIdResultDTO; +import com.epmet.dto.result.GovStaffRoleResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.modules.feign.fallback.EpmetUserFeignClientFallBack; -import com.epmet.resi.partymember.dto.partymember.UserHeadPhotoDTO; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -69,4 +72,21 @@ public interface EpmetUserFeignClient { @PostMapping("/epmetuser/userwechat/selectuserheadphotobyuserid") Result> selectUserHeadPhotoByUserId(List certifiedResultDTOS); + /** + * + * @Description 查询用户注册时间 + * @Author zxc + * @CreatedTime 2020/4/27 16:14 + */ + @PostMapping("/epmetuser/user/selectcreatedtimebyuserid") + Result createdTimeByUserId(@RequestBody CreatedTimeByUserIdFormDTO formDTO); + + /** + * 根据机构Id查询机构下是网格长角色的用户 + * @param staffRoleFormDTO + * @return + * @Author sun + */ + @PostMapping("/epmetuser/staffrole/staffsinrole") + Result> getStaffsInRole(@RequestBody StaffRoleFormDTO staffRoleFormDTO); } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/GovOrgFeignClient.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/GovOrgFeignClient.java index 4615564826..b3cd8ab7aa 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/GovOrgFeignClient.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/GovOrgFeignClient.java @@ -4,6 +4,7 @@ import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.form.CustomerGridFormDTO; +import com.epmet.dto.result.AgencyAndStaffsResultDTO; import com.epmet.dto.result.SelectGridNameByGridIdResultDTO; import com.epmet.dto.result.GridInfoResultDTO; import com.epmet.modules.feign.fallback.GovOrgFeignClientFallBack; @@ -50,8 +51,12 @@ public interface GovOrgFeignClient { @PostMapping("/gov/org/customergrid/selectGridNameByGridId") Result selectGridNameByGridId(@RequestBody CertifiedFormDTO formDTO); - - - - + /** + * @param gridId + * @return + * @Author sun + * @Description 根据网格id查询所属组织信息、根据网格Id查询网格下所有工作人员列表 + **/ + @PostMapping("/gov/org/customergrid/getagencyandstaffsbygridid/{gridId}") + Result getAgencyAndStaffsBygridId(@PathVariable("gridId") String gridId); } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/fallback/EpmetMessageFeignClientFallback.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/fallback/EpmetMessageFeignClientFallback.java index f588f55781..2b47ff9a9c 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/fallback/EpmetMessageFeignClientFallback.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/fallback/EpmetMessageFeignClientFallback.java @@ -7,6 +7,8 @@ import com.epmet.dto.form.UserMessageFormDTO; import com.epmet.modules.feign.EpmetMessageFeignClient; import org.springframework.stereotype.Component; +import java.util.List; + /** * 消息服务降级 * @author zhaoqifeng @@ -24,4 +26,9 @@ public class EpmetMessageFeignClientFallback implements EpmetMessageFeignClient return ModuleUtils.feignConError(ServiceConstant.EPMET_MESSAGE_SERVER, "saveUserMessage", formDto); } + @Override + public Result saveUserMessageList(List msgList) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_MESSAGE_SERVER, "saveUserMessageList", msgList); + } + } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/fallback/EpmetUserFeignClientFallBack.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/fallback/EpmetUserFeignClientFallBack.java index d7844431b9..0d8fc352be 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/fallback/EpmetUserFeignClientFallBack.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/fallback/EpmetUserFeignClientFallBack.java @@ -5,9 +5,13 @@ import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.UserResiInfoDTO; import com.epmet.dto.UserRoleDTO; +import com.epmet.dto.form.CreatedTimeByUserIdFormDTO; +import com.epmet.dto.form.StaffRoleFormDTO; import com.epmet.dto.form.UserResiInfoFormDTO; import com.epmet.dto.form.UserResiInfoListFormDTO; import com.epmet.dto.result.CertifiedResultDTO; +import com.epmet.dto.result.CreatedTimeByUserIdResultDTO; +import com.epmet.dto.result.GovStaffRoleResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.modules.feign.EpmetUserFeignClient; import org.springframework.stereotype.Component; @@ -45,4 +49,14 @@ public class EpmetUserFeignClientFallBack implements EpmetUserFeignClient { public Result> selectUserHeadPhotoByUserId(List certifiedResultDTOS) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "selectUserHeadPhotoByUserId", certifiedResultDTOS); } + + @Override + public Result createdTimeByUserId(CreatedTimeByUserIdFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "createdTimeByUserId", formDTO); + } + + @Override + public Result> getStaffsInRole(StaffRoleFormDTO staffRoleFormDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getStaffsInRole", staffRoleFormDTO); + } } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/fallback/GovOrgFeignClientFallBack.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/fallback/GovOrgFeignClientFallBack.java index 07775a8fb8..3098308b28 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/fallback/GovOrgFeignClientFallBack.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/fallback/GovOrgFeignClientFallBack.java @@ -5,6 +5,7 @@ import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.form.CustomerGridFormDTO; +import com.epmet.dto.result.AgencyAndStaffsResultDTO; import com.epmet.dto.result.SelectGridNameByGridIdResultDTO; import com.epmet.dto.result.GridInfoResultDTO; import com.epmet.modules.feign.GovOrgFeignClient; @@ -38,4 +39,10 @@ public class GovOrgFeignClientFallBack implements GovOrgFeignClient { public Result selectGridNameByGridId(CertifiedFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "selectGridNameByGridId",formDTO); } + + @Override + public Result getAgencyAndStaffsBygridId(String gridId) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getAgencyAndStaffsBygridId",gridId); + } + } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartyMemberConfirmController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartyMemberConfirmController.java index 22be95f523..58d4d2edc2 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartyMemberConfirmController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartyMemberConfirmController.java @@ -5,7 +5,15 @@ import com.epmet.modules.partymember.service.PartyMemberConfirmService; import com.epmet.resi.mine.dto.from.PartyMemberInitFromDTO; import com.epmet.resi.mine.dto.from.VerificationCodeFromDTO; import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO; +import com.epmet.resi.partymember.dto.partymember.PartymemberConfirmManualDTO; import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; +import com.epmet.resi.partymember.dto.partymember.form.AuditingDetailFromDTO; +import com.epmet.resi.partymember.dto.partymember.form.AutoFailedDetailFromDTO; +import com.epmet.resi.partymember.dto.partymember.form.PartyMemberConfirmFromDTO; +import com.epmet.resi.partymember.dto.partymember.form.RejectedDetailFromDTO; +import com.epmet.resi.partymember.dto.partymember.result.AuditingDetailResultDTO; +import com.epmet.resi.partymember.dto.partymember.result.AutoFailedDetailResultDTO; +import com.epmet.resi.partymember.dto.partymember.result.RejectedDetailResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -71,4 +79,49 @@ public class PartyMemberConfirmController { public Result partyMemberInfoExtra(@RequestBody PartymemberInfoDTO partyMemberInfoDTO) { return partyMemberConfirmService.partyMemberInfoExtra(partyMemberInfoDTO); } + + /** + * 审核党员 + * + * @param fromDTO 参数 + * @return Result + */ + @PostMapping("audit") + public Result manualConfirmResult(@RequestBody PartyMemberConfirmFromDTO fromDTO) { + return partyMemberConfirmService.manualConfirmResult(fromDTO); + } + + /** + * 待审核详情 + * + * @param fromDTO 参数 + * @return Result + */ + @PostMapping("auditingdetail") + public Result auditingDetail(@RequestBody AuditingDetailFromDTO fromDTO) { + return partyMemberConfirmService.auditingDetail(fromDTO); + } + + /** + * 自动审核失败详情 + * + * @param fromDTO 参数 + * @return Result + */ + @PostMapping("autofaileddetail") + public Result autoFailedDetail(@RequestBody AutoFailedDetailFromDTO fromDTO) { + return partyMemberConfirmService.autoFailedDetail(fromDTO); + } + + /** + * 拒绝详情 + * + * @param fromDTO 参数 + * @return Result + */ + @PostMapping("rejecteddetail") + public Result rejectedDetail(@RequestBody RejectedDetailFromDTO fromDTO) { + return partyMemberConfirmService.rejectedDetail(fromDTO); + } + } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartymemberInfoController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartymemberInfoController.java index b391620769..c98ec3ce99 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartymemberInfoController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartymemberInfoController.java @@ -29,7 +29,9 @@ import com.epmet.dto.result.CertifiedResultDTO; import com.epmet.modules.partymember.excel.PartymemberInfoExcel; import com.epmet.modules.partymember.service.PartymemberInfoService; import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; +import com.epmet.resi.partymember.dto.partymember.form.CertifiedDetailFormDTO; import com.epmet.resi.partymember.dto.partymember.form.CertifiedFormDTO; +import com.epmet.resi.partymember.dto.partymember.result.CertifiedDetailResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -104,4 +106,16 @@ public class PartymemberInfoController { return new Result>().ok(partymemberInfoService.certified(certifiedFormDTO)); } + /** + * + * @Description 查询已认证党员详情 + * @param: formDTO + * @Author zxc + * @CreatedTime 2020/4/27 15:26 + */ + @PostMapping("certifieddetail") + public Result certifieddetail(@RequestBody CertifiedDetailFormDTO formDTO){ + return new Result().ok(partymemberInfoService.certifiedDetail(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/PartymemberInfoDao.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/PartymemberInfoDao.java index 4eaa5edabc..a66092f216 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/PartymemberInfoDao.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/PartymemberInfoDao.java @@ -21,7 +21,9 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.result.CertifiedResultDTO; import com.epmet.modules.partymember.entity.PartymemberInfoEntity; import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; +import com.epmet.resi.partymember.dto.partymember.form.CertifiedDetailFormDTO; import com.epmet.resi.partymember.dto.partymember.form.CertifiedFormDTO; +import com.epmet.resi.partymember.dto.partymember.result.CertifiedDetailResultDTO; import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -56,4 +58,13 @@ public interface PartymemberInfoDao extends BaseDao { */ List selectCertifiedList(CertifiedFormDTO certifiedFormDTO); + /** + * + * @Description 查询已认证党员详情 + * @param: formDTO + * @Author zxc + * @CreatedTime 2020/4/27 15:30 + */ + CertifiedDetailResultDTO certifiedDetail(CertifiedDetailFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/PartymemberConfirmManualEntity.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/PartymemberConfirmManualEntity.java index 8b65fc2930..6be68841fb 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/PartymemberConfirmManualEntity.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/PartymemberConfirmManualEntity.java @@ -68,4 +68,9 @@ public class PartymemberConfirmManualEntity extends BaseEpmetEntity { */ private String refuseReason; + /** + * 是否已读 未读:unread 已读:read + */ + private String readFlag; + } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartyMemberConfirmService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartyMemberConfirmService.java index feee93b3cc..e2644fb607 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartyMemberConfirmService.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartyMemberConfirmService.java @@ -4,7 +4,15 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.resi.mine.dto.from.PartyMemberInitFromDTO; import com.epmet.resi.mine.dto.from.VerificationCodeFromDTO; import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO; +import com.epmet.resi.partymember.dto.partymember.PartymemberConfirmManualDTO; import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; +import com.epmet.resi.partymember.dto.partymember.form.AuditingDetailFromDTO; +import com.epmet.resi.partymember.dto.partymember.form.AutoFailedDetailFromDTO; +import com.epmet.resi.partymember.dto.partymember.form.PartyMemberConfirmFromDTO; +import com.epmet.resi.partymember.dto.partymember.form.RejectedDetailFromDTO; +import com.epmet.resi.partymember.dto.partymember.result.AuditingDetailResultDTO; +import com.epmet.resi.partymember.dto.partymember.result.AutoFailedDetailResultDTO; +import com.epmet.resi.partymember.dto.partymember.result.RejectedDetailResultDTO; /** * 党员认证 @@ -46,5 +54,35 @@ public interface PartyMemberConfirmService { */ Result partyMemberInfoExtra(PartymemberInfoDTO partyMemberInfoDTO); + /** + * 人工审核结果 + * + * @param fromDTO + * @return + */ + Result manualConfirmResult(PartyMemberConfirmFromDTO fromDTO); + + /** + * 待审核详情 + * + * @param fromDTO + * @return + */ + Result auditingDetail(AuditingDetailFromDTO fromDTO); + /** + * 自动审核失败详情 + * + * @param fromDTO + * @return + */ + Result autoFailedDetail(AutoFailedDetailFromDTO fromDTO); + + /** + * 拒绝详情 + * + * @param fromDTO + * @return + */ + Result rejectedDetail(RejectedDetailFromDTO fromDTO); } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartymemberInfoService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartymemberInfoService.java index a0ab8d6b21..d2e6779edc 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartymemberInfoService.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartymemberInfoService.java @@ -19,10 +19,14 @@ package com.epmet.modules.partymember.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; import com.epmet.dto.result.CertifiedResultDTO; import com.epmet.modules.partymember.entity.PartymemberInfoEntity; import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; +import com.epmet.resi.partymember.dto.partymember.form.CertifiedDetailFormDTO; import com.epmet.resi.partymember.dto.partymember.form.CertifiedFormDTO; +import com.epmet.resi.partymember.dto.partymember.result.CertifiedDetailResultDTO; +import org.springframework.web.bind.annotation.RequestBody; import java.util.List; import java.util.Map; @@ -124,4 +128,13 @@ public interface PartymemberInfoService extends BaseService certified(CertifiedFormDTO certifiedFormDTO); + /** + * + * @Description 查询已认证党员详情 + * @param: formDTO + * @Author zxc + * @CreatedTime 2020/4/27 15:27 + */ + CertifiedDetailResultDTO certifiedDetail(CertifiedDetailFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java index 28959478c1..d5e6be5621 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java @@ -8,9 +8,11 @@ import com.epmet.constant.PartyMemberConstant; import com.epmet.dto.UserResiInfoDTO; import com.epmet.dto.UserRoleDTO; import com.epmet.dto.form.UserResiInfoFormDTO; +import com.epmet.dto.result.GridInfoResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.modules.feign.EpmetMessageFeignClient; import com.epmet.modules.feign.EpmetUserFeignClient; +import com.epmet.modules.feign.GovOrgFeignClient; import com.epmet.modules.partymember.entity.*; import com.epmet.modules.partymember.redis.PartymemberInfoRedis; import com.epmet.modules.partymember.service.*; @@ -20,12 +22,22 @@ import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO; import com.epmet.resi.partymember.dto.partymember.PartymemberConfirmAutoDTO; import com.epmet.resi.partymember.dto.partymember.PartymemberConfirmManualDTO; import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; +import com.epmet.resi.partymember.dto.partymember.form.AuditingDetailFromDTO; +import com.epmet.resi.partymember.dto.partymember.form.AutoFailedDetailFromDTO; +import com.epmet.resi.partymember.dto.partymember.form.PartyMemberConfirmFromDTO; +import com.epmet.resi.partymember.dto.partymember.form.RejectedDetailFromDTO; +import com.epmet.resi.partymember.dto.partymember.result.AdditionalInfoDTO; +import com.epmet.resi.partymember.dto.partymember.result.AuditingDetailResultDTO; +import com.epmet.resi.partymember.dto.partymember.result.AutoFailedDetailResultDTO; +import com.epmet.resi.partymember.dto.partymember.result.RejectedDetailResultDTO; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; import java.util.Date; +import java.util.List; import java.util.Map; /** @@ -56,6 +68,8 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService private PartymemberRegisterRelationService partymemberRegisterRelationService; @Autowired private EpmetMessageFeignClient messageFeignClient; + @Autowired + private GovOrgFeignClient govOrgFeignClient; @Override @Transactional(rollbackFor = Exception.class) @@ -158,7 +172,7 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService saveOrUpdateVisit(partyMemberInfoDTO.getPartymemberVisitId(), null, PartyMemberConstant.OPERATE_AUTO_FAILED); //自动认证失败 - partyMemberInfoEntity.setConfirmResult(PartyMemberConstant.CONFIRM_FAILED); + partyMemberInfoEntity.setConfirmResult(PartyMemberConstant.AUTO_CONFIRM_FAILED); if (partyMemberInfoEntity.getId().isEmpty()) { partymemberInfoService.insert(partyMemberInfoEntity); } else { @@ -172,7 +186,7 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService saveOrUpdateVisit(partyMemberInfoDTO.getPartymemberVisitId(), null, PartyMemberConstant.OPERATE_AUTO_SUCCESS); //自动认证成功 - partyMemberInfoEntity.setConfirmResult(PartyMemberConstant.CONFIRM_SUCCESS); + partyMemberInfoEntity.setConfirmResult(PartyMemberConstant.AUTO_CONFIRM_SUCCESS); if (partyMemberInfoEntity.getId().isEmpty()) { partymemberInfoService.insert(partyMemberInfoEntity); } else { @@ -242,6 +256,7 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService manualEntity.setUserId(infoDTO.getUserId()); manualEntity.setPartymemberInfoId(infoDTO.getId()); manualEntity.setAuditStatus(PartyMemberConstant.UNDER_AUDITTING); + manualEntity.setReadFlag(PartyMemberConstant.UNREAD); partymemberConfirmManualService.insert(manualEntity); } @@ -249,6 +264,204 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService return new Result(); } + @Override + public Result manualConfirmResult(PartyMemberConfirmFromDTO fromDTO) { + PartymemberConfirmManualEntity manualEntity = partymemberConfirmManualService.selectById(fromDTO.getManualId()); + PartymemberInfoEntity partyMemberInfoEntity = partymemberInfoService.selectById(fromDTO.getPartyMemberId()); + partyMemberInfoEntity.setId(manualEntity.getPartymemberInfoId()); + partyMemberInfoEntity.setConfirmResult(fromDTO.getPartyMemberFlag()); + + partymemberInfoService.updateById(partyMemberInfoEntity); + + manualEntity.setAuditStatus(fromDTO.getPartyMemberFlag()); + manualEntity.setRefuseReason(fromDTO.getReason()); + partymemberConfirmManualService.updateById(manualEntity); + + if (PartyMemberConstant.APPROVED.equals(fromDTO.getPartyMemberFlag())) { + //添加用户党员角色关系 + UserRoleDTO userRole = new UserRoleDTO(); + userRole.setCustomerId(partyMemberInfoEntity.getCustomerId()); + userRole.setGridId(PartyMemberConstant.ALL); + userRole.setUserId(partyMemberInfoEntity.getUserId()); + userRole.setRoleKey(EpmetRoleKeyConstant.PARTYMEMBER); + userRole.setApp(PartyMemberConstant.RESI); + epmetUserFeignClient.saveUserRole(userRole); + //存入党员注册关系表 用于统计客户网格的认证党员数 + saveRegisterRelation(ConvertUtils.sourceToTarget(partyMemberInfoEntity, + PartymemberInfoDTO.class)); + } + + return new Result(); + } + + @Override + public Result auditingDetail(AuditingDetailFromDTO fromDTO) { + AuditingDetailResultDTO resultDTO = new AuditingDetailResultDTO(); + AdditionalInfoDTO additionalInfoDTO = new AdditionalInfoDTO(); + resultDTO.setPartyMemberId(fromDTO.getPartyMemberId()); + resultDTO.setAutoId(fromDTO.getAutoId()); + resultDTO.setManualId(fromDTO.getManualId()); + + //获取人工审核信息 + PartymemberConfirmManualEntity manualEntity = partymemberConfirmManualService.selectById(fromDTO.getManualId()); + //人工审核信息设为已读 + manualEntity.setReadFlag(PartyMemberConstant.READ); + partymemberConfirmManualService.updateById(manualEntity); + + //获取党员认证信息 + PartymemberInfoEntity partyMemberInfoEntity = partymemberInfoService.selectById(fromDTO.getPartyMemberId()); + resultDTO.setUserId(partyMemberInfoEntity.getUserId()); + resultDTO.setRealName(partyMemberInfoEntity.getSurname() + partyMemberInfoEntity.getName()); + resultDTO.setIdCard(partyMemberInfoEntity.getIdCard()); + resultDTO.setMobile(resultDTO.getMobile()); + resultDTO.setAddress(partyMemberInfoEntity.getStreet() + partyMemberInfoEntity.getEstate() + partyMemberInfoEntity.getBuilding()); + resultDTO.setCertifyTime(manualEntity.getCreatedTime().getTime()); + + //获取党员自动认证信息 + List failedReason = new ArrayList<>(); + + if (null != fromDTO.getAutoId() && !fromDTO.getAutoId().isEmpty()) { + PartymemberConfirmAutoEntity autoEntity = partymemberConfirmAutoService.selectById(fromDTO.getAutoId()); + if (PartyMemberConstant.SAME.equals(autoEntity.getMobileResult())) { + failedReason.add("手机号匹配"); + } else { + failedReason.add("手机号未匹配"); + } + if (PartyMemberConstant.SAME.equals(autoEntity.getIdCardResult())) { + failedReason.add("身份证匹配"); + } else { + failedReason.add("身份证未匹配"); + } + if (PartyMemberConstant.SAME.equals(autoEntity.getNameResult())) { + failedReason.add("姓名匹配"); + } else { + failedReason.add("姓名未匹配"); + } + } else { + failedReason.add("手机号未匹配"); + failedReason.add("身份证未匹配"); + failedReason.add("姓名未匹配"); + } + //补充信息 + additionalInfoDTO.setExtraOrganization(partyMemberInfoEntity.getExtraOrganization()); + additionalInfoDTO.setContactMobile(partyMemberInfoEntity.getExtraCertifierMobile() == null ? "" : partyMemberInfoEntity.getExtraCertifierMobile()); + additionalInfoDTO.setContactPeople(partyMemberInfoEntity.getExtraCertifierName() == null ? "" : partyMemberInfoEntity.getExtraCertifierName()); + additionalInfoDTO.setFailedReason(failedReason); + resultDTO.setAdditionalInfo(additionalInfoDTO); + //查询网格信息 + Result gridInfoResult = govOrgFeignClient.queryGridInfo(partyMemberInfoEntity.getGridId()); + String gridFullPath = ""; + if (gridInfoResult.success() && null != gridInfoResult.getData()) { + gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName(), + gridInfoResult.getData().getCommnuityName(), + gridInfoResult.getData().getGridName()); + gridFullPath = gridFullPath.replaceAll("--", "").trim(); + } + resultDTO.setGridFullPath(gridFullPath); + + return new Result().ok(resultDTO); + } + + @Override + public Result autoFailedDetail(AutoFailedDetailFromDTO fromDTO) { + AutoFailedDetailResultDTO resultDTO = new AutoFailedDetailResultDTO(); + //获取党员认证信息 + PartymemberInfoEntity partyMemberInfo = partymemberInfoService.selectById(fromDTO.getPartyMemberId()); + resultDTO.setUserId(partyMemberInfo.getUserId()); + resultDTO.setRealName(partyMemberInfo.getSurname() + partyMemberInfo.getName()); + resultDTO.setIdCard(partyMemberInfo.getIdCard()); + resultDTO.setMobile(resultDTO.getMobile()); + resultDTO.setAddress(partyMemberInfo.getStreet() + partyMemberInfo.getEstate() + partyMemberInfo.getBuilding()); + String failedReason = ""; + if (null != fromDTO.getAutoId() && !fromDTO.getAutoId().isEmpty()) { + PartymemberConfirmAutoEntity autoEntity = partymemberConfirmAutoService.selectById(fromDTO.getAutoId()); + resultDTO.setCertifyTime(autoEntity.getContrastTime().getTime()); + if (PartyMemberConstant.SAME.equals(autoEntity.getMobileResult())) { + failedReason = failedReason + "手机号匹配,"; + } else { + failedReason = failedReason + "手机号未匹配,"; + } + if (PartyMemberConstant.SAME.equals(autoEntity.getIdCardResult())) { + failedReason = failedReason + "身份证匹配,"; + } else { + failedReason = failedReason + "身份证未匹配,"; + } + if (PartyMemberConstant.SAME.equals(autoEntity.getNameResult())) { + failedReason = failedReason + "姓名匹配"; + } else { + failedReason = failedReason + "姓名未匹配"; + } + } else { + failedReason = "手机号未匹配,身份证未匹配,姓名未匹配"; + resultDTO.setCertifyTime(partyMemberInfo.getUpdatedTime().getTime()); + } + resultDTO.setFailedReason(failedReason); + //查询网格信息 + Result gridInfoResult = govOrgFeignClient.queryGridInfo(partyMemberInfo.getGridId()); + String gridFullPath = ""; + if (gridInfoResult.success() && null != gridInfoResult.getData()) { + gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName(), + gridInfoResult.getData().getCommnuityName(), + gridInfoResult.getData().getGridName()); + gridFullPath = gridFullPath.replaceAll("--", "").trim(); + } + resultDTO.setGridFullPath(gridFullPath); + + return new Result().ok(resultDTO); + } + + @Override + public Result rejectedDetail(RejectedDetailFromDTO fromDTO) { + RejectedDetailResultDTO resultDTO = new RejectedDetailResultDTO(); + //获取党员认证信息 + PartymemberInfoEntity partyMemberInfo = partymemberInfoService.selectById(fromDTO.getPartyMemberId()); + resultDTO.setUserId(partyMemberInfo.getUserId()); + resultDTO.setRealName(partyMemberInfo.getSurname() + partyMemberInfo.getName()); + resultDTO.setIdCard(partyMemberInfo.getIdCard()); + resultDTO.setMobile(resultDTO.getMobile()); + resultDTO.setAddress(partyMemberInfo.getStreet() + partyMemberInfo.getEstate() + partyMemberInfo.getBuilding()); + resultDTO.setExtraOrganization(partyMemberInfo.getExtraOrganization()); + resultDTO.setContactMobile(partyMemberInfo.getExtraCertifierMobile() == null ? "" : partyMemberInfo.getExtraCertifierMobile()); + resultDTO.setContactPeople(partyMemberInfo.getExtraCertifierName() == null ? "" : partyMemberInfo.getExtraCertifierName()); + String failedReason =""; + if (null != fromDTO.getAutoId() && !fromDTO.getAutoId().isEmpty()) { + PartymemberConfirmAutoEntity autoEntity = partymemberConfirmAutoService.selectById(fromDTO.getAutoId()); + if (PartyMemberConstant.SAME.equals(autoEntity.getMobileResult())) { + failedReason = failedReason + "手机号匹配,"; + } else { + failedReason = failedReason + "手机号未匹配,"; + } + if (PartyMemberConstant.SAME.equals(autoEntity.getIdCardResult())) { + failedReason = failedReason + "身份证匹配,"; + } else { + failedReason = failedReason + "身份证未匹配,"; + } + if (PartyMemberConstant.SAME.equals(autoEntity.getNameResult())) { + failedReason = failedReason + "姓名匹配"; + } else { + failedReason = failedReason + "姓名未匹配"; + } + } else { + failedReason = "手机号未匹配,身份证未匹配,姓名未匹配"; + } + resultDTO.setFailedReason(failedReason); + //获取人工审核信息 + PartymemberConfirmManualEntity manualEntity = partymemberConfirmManualService.selectById(fromDTO.getManualId()); + resultDTO.setCertifyTime(manualEntity.getCreatedTime().getTime()); + resultDTO.setFailedReason(manualEntity.getRefuseReason()); + //查询网格信息 + Result gridInfoResult = govOrgFeignClient.queryGridInfo(partyMemberInfo.getGridId()); + String gridFullPath = ""; + if (gridInfoResult.success() && null != gridInfoResult.getData()) { + gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName(), + gridInfoResult.getData().getCommnuityName(), + gridInfoResult.getData().getGridName()); + gridFullPath = gridFullPath.replaceAll("--", "").trim(); + } + resultDTO.setGridFullPath(gridFullPath); + return new Result().ok(resultDTO); + } + /** * 判断是否已注册居民,如果没有则注册居民 * diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberConfirmManualServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberConfirmManualServiceImpl.java index 926218c9ef..184ed1e49f 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberConfirmManualServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberConfirmManualServiceImpl.java @@ -23,6 +23,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.PartyMemberConstant; import com.epmet.modules.partymember.dao.PartymemberConfirmManualDao; import com.epmet.modules.partymember.entity.PartymemberConfirmManualEntity; import com.epmet.modules.partymember.redis.PartymemberConfirmManualRedis; @@ -104,7 +105,9 @@ public class PartymemberConfirmManualServiceImpl extends BaseServiceImpl wrapper = new QueryWrapper<>(); - wrapper.eq(StringUtils.isNotBlank(partymemberInfoId), "PARTYMEMBER_INFO_ID", partymemberInfoId); + wrapper.eq(StringUtils.isNotBlank(partymemberInfoId), "PARTYMEMBER_INFO_ID", partymemberInfoId) + .eq("AUDIT_STATUS", PartyMemberConstant.UNDER_AUDITTING); + PartymemberConfirmManualEntity entity = baseDao.selectOne(wrapper); return ConvertUtils.sourceToTarget(entity, PartymemberConfirmManualDTO.class); } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java index 2a92321524..741f2c505b 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java @@ -25,7 +25,9 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.CreatedTimeByUserIdFormDTO; import com.epmet.dto.result.CertifiedResultDTO; +import com.epmet.dto.result.CreatedTimeByUserIdResultDTO; import com.epmet.dto.result.SelectGridNameByGridIdResultDTO; import com.epmet.modules.feign.EpmetUserFeignClient; import com.epmet.modules.feign.GovOrgFeignClient; @@ -34,7 +36,9 @@ import com.epmet.modules.partymember.entity.PartymemberInfoEntity; import com.epmet.modules.partymember.redis.PartymemberInfoRedis; import com.epmet.modules.partymember.service.PartymemberInfoService; import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; +import com.epmet.resi.partymember.dto.partymember.form.CertifiedDetailFormDTO; import com.epmet.resi.partymember.dto.partymember.form.CertifiedFormDTO; +import com.epmet.resi.partymember.dto.partymember.result.CertifiedDetailResultDTO; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -140,6 +144,9 @@ public class PartymemberInfoServiceImpl extends BaseServiceImpl certified(CertifiedFormDTO certifiedFormDTO) { certifiedFormDTO.setPageNo(certifiedFormDTO.getPageNo() - NumConstant.ONE); List certifiedResultDTOS = partyMemberInfoDao.selectCertifiedList(certifiedFormDTO); + for (CertifiedResultDTO certifiedResultDTO : certifiedResultDTOS) { + certifiedResultDTO.setApplyTime(certifiedResultDTO.getApplyTime()*1000L); + } if (certifiedResultDTOS.size()==0){ return new ArrayList<>(); } @@ -151,5 +158,32 @@ public class PartymemberInfoServiceImpl extends BaseServiceImpl registerTime = epmetUserFeignClient.createdTimeByUserId(time); + certifiedDetail.setCertifyTime(registerTime.getData().getRegisterTime()); + CertifiedFormDTO certifiedFormDTO = new CertifiedFormDTO(); + certifiedFormDTO.setGridId(certifiedDetail.getGridId()); + //查询网格名称 + Result gridName = govOrgFeignClient.selectGridNameByGridId(certifiedFormDTO); + certifiedDetail.setGridFullPath(gridName.getData().getGridName()); + return certifiedDetail; + } + } \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/constant/ResiWarmUserMessageConstant.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/constant/ResiWarmUserMessageConstant.java index dbb6990310..3f85a6d199 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/constant/ResiWarmUserMessageConstant.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/constant/ResiWarmUserMessageConstant.java @@ -9,7 +9,7 @@ public interface ResiWarmUserMessageConstant { /** * 消息标题 */ - String GROUP_TITLE = "您有一条小组消息"; + String GROUP_TITLE = "您有一条热心居民申请消息"; /** * 热心居民提交申请时给网格长发送消息:XX街道-XX先生/女士申请成为热心居民,请审核。 diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/constant/ResiWarmheartedConstant.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/constant/ResiWarmheartedConstant.java new file mode 100644 index 0000000000..afc576e837 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/constant/ResiWarmheartedConstant.java @@ -0,0 +1,10 @@ +package com.epmet.modules.warmhearted.constant; + +/** + * @author sun + * @dscription + */ +public interface ResiWarmheartedConstant { + + String SELECT_EXCEPTION = "根据网格Id查询数据失败"; +} diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/constant/ResiWarmheartedVisitConstant.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/constant/ResiWarmheartedVisitConstant.java index 56946307cb..a0c0442d72 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/constant/ResiWarmheartedVisitConstant.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/constant/ResiWarmheartedVisitConstant.java @@ -77,4 +77,10 @@ public interface ResiWarmheartedVisitConstant { String SELECT_EXCEPTION = "根据申请Id未查询到热心居民申请详情信息"; String AUDIT_EXCEPTION = "该申请数据已审核,不能再次审核"; + + /** + * 网格长角色 + */ + String GRID_MANAGER = "grid_manager"; + String SAVE_MSG_EXCEPTION = "发送消息给网格长操作失败"; } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedApplyServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedApplyServiceImpl.java index b78ffa53eb..4eaef1114e 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedApplyServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedApplyServiceImpl.java @@ -32,16 +32,17 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.constant.PartyMemberConstant; import com.epmet.constant.ReadFlagConstant; import com.epmet.dto.CustomerGridDTO; +import com.epmet.dto.CustomerStaffGridDTO; import com.epmet.dto.UserRoleDTO; -import com.epmet.dto.form.CustomerGridFormDTO; -import com.epmet.dto.form.UserMessageFormDTO; -import com.epmet.dto.form.UserResiInfoFormDTO; -import com.epmet.dto.form.UserResiInfoListFormDTO; +import com.epmet.dto.form.*; +import com.epmet.dto.result.AgencyAndStaffsResultDTO; +import com.epmet.dto.result.GovStaffRoleResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.modules.feign.EpmetMessageFeignClient; import com.epmet.modules.feign.EpmetUserFeignClient; import com.epmet.modules.feign.GovOrgFeignClient; import com.epmet.modules.warmhearted.constant.ResiWarmUserMessageConstant; +import com.epmet.modules.warmhearted.constant.ResiWarmheartedConstant; import com.epmet.modules.warmhearted.constant.ResiWarmheartedVisitConstant; import com.epmet.modules.warmhearted.dao.ResiWarmheartedApplyDao; import com.epmet.modules.warmhearted.entity.ResiWarmheartedApplyEntity; @@ -203,7 +204,10 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl resultAgencyAndStaffs = govOrgFeignClient.getAgencyAndStaffsBygridId(formDTO.getGridId()); + if(!resultAgencyAndStaffs.success()){ + throw new RenException(ResiWarmheartedConstant.SELECT_EXCEPTION); + } + AgencyAndStaffsResultDTO agencyAndStaffsResultDTO = resultAgencyAndStaffs.getData(); + //网格下工作人员列表 + CustomerGridDTO customerGridDTO = agencyAndStaffsResultDTO.getCustomerGridDTO(); + List staffList = agencyAndStaffsResultDTO.getStaffList(); + //2:调用epmet-user服务,根据组织机构Id和网格长角色查询组织机构下所有的网格长StaffId + StaffRoleFormDTO staffRoleFormDTO = new StaffRoleFormDTO(); + staffRoleFormDTO.setOrgId(customerGridDTO.getPid()); + staffRoleFormDTO.setRoleKey(ResiWarmheartedVisitConstant.GRID_MANAGER); + Result> resultList = epmetUserFeignClient.getStaffsInRole(staffRoleFormDTO); + List roleList = resultList.getData(); + //3:遍历找出当前网格的所有网格长并给网格长发消息 + List msgList = new ArrayList<>(); + staffList.forEach(staff->{ + roleList.forEach(role->{ + if(staff.getUserId().equals(role.getStaffId())){ + UserMessageFormDTO msgDTO = new UserMessageFormDTO(); + msgDTO.setCustomerId(formDTO.getCustomerId()); + msgDTO.setGridId(formDTO.getGridId()); + msgDTO.setUserId(staff.getUserId()); + msgDTO.setApp(formDTO.getApp()); + msgDTO.setTitle(ResiWarmUserMessageConstant.GROUP_TITLE); + msgDTO.setMessageContent(formDTO.getMessageText()); + msgDTO.setReadFlag(ReadFlagConstant.UN_READ); + msgList.add(msgDTO); + } + }); + }); + if (msgList.size() > NumConstant.ZERO) { + result = epmetMessageFeignClient.saveUserMessageList(msgList); + } + return result; } @Override diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberInfoDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberInfoDao.xml index ca2314e514..04bdbb07c6 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberInfoDao.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberInfoDao.xml @@ -40,7 +40,7 @@ pi.CUSTOMER_ID = #{customerId} AND pi.GRID_ID = #{gridId} AND pi.USER_ID = #{userId} - AND pi.CONFIRM_RESULT = '1' + AND pi.CONFIRM_RESULT = 'auto_confirm_failed' AND pi.DEL_FLAG = 0 AND ( pcm.AUDIT_STATUS = 'under_auditting' OR pi.ORGANIZATION_TYPE IS NULL ) @@ -54,24 +54,52 @@ WHERE CUSTOMER_ID = #{customerId} AND MOBILE = #{mobile} - AND CONFIRM_RESULT = '0' + AND (CONFIRM_RESULT = 'auto_confirm_success' OR CONFIRM_RESULT = 'approved') AND DEL_FLAG = 0 + + \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CreatedTimeByUserIdFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CreatedTimeByUserIdFormDTO.java new file mode 100644 index 0000000000..409617bc88 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CreatedTimeByUserIdFormDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Auther zxc + * @Create 2020-04-27 16:08 + */ +@Data +public class CreatedTimeByUserIdFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 用户id + */ + private String userId; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CertifiedResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CertifiedResultDTO.java index f7540d8b0b..ca3e6fd8c1 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CertifiedResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CertifiedResultDTO.java @@ -32,11 +32,26 @@ public class CertifiedResultDTO implements Serializable { /** * applyTime 申请时间 */ - private Integer applyTime; + private Long applyTime; /** * 提交网格:XXX街道-XXX社区-XXX网格 */ private String gridFullPath; + /** + * 党员认证信息表id + */ + private String partyMemberId; + + /** + * 党员自动审核表ID + */ + private String autoId; + + /** + * 党员人工审核表ID + */ + private String manualId; + } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CreatedTimeByUserIdResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CreatedTimeByUserIdResultDTO.java new file mode 100644 index 0000000000..d86ec53f57 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CreatedTimeByUserIdResultDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Auther zxc + * @Create 2020-04-27 16:08 + */ +@Data +public class CreatedTimeByUserIdResultDTO implements Serializable { + + private static final long serialVersionUID = -1L; + + /** + * 注册时间 (empet_user库下的user表中的 created_time) + */ + private Long registerTime; + +} diff --git a/epmet-user/epmet-user-server/docker-compose.yml b/epmet-user/epmet-user-server/docker-compose.yml index 12dee46098..87cf4c15ed 100644 --- a/epmet-user/epmet-user-server/docker-compose.yml +++ b/epmet-user/epmet-user-server/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-dev - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/epmet-user-server:0.3.5 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/epmet-user-server:0.3.8 ports: - "8087:8087" network_mode: host # 不会创建新的网络 diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index dfa4b9f1c0..bb50a92b8d 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.5 + 0.3.8 com.epmet epmet-user diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java index 6081d38fe1..5a310b3a87 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java @@ -8,9 +8,11 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.UserDTO; import com.epmet.dto.UserWechatDTO; +import com.epmet.dto.form.CreatedTimeByUserIdFormDTO; import com.epmet.dto.form.PasswordLoginUserInfoFormDTO; import com.epmet.dto.form.WxLoginUserInfoFormDTO; import com.epmet.dto.form.WxUserInfoFormDTO; +import com.epmet.dto.result.CreatedTimeByUserIdResultDTO; import com.epmet.dto.result.PasswordLoginUserInfoResultDTO; import com.epmet.service.UserService; import org.springframework.beans.factory.annotation.Autowired; @@ -86,4 +88,15 @@ public class UserController { return userService.updateWxUserInfo(wxUserInfoFormDTO); } + /** + * + * @Description 查询用户注册时间 + * @Author zxc + * @CreatedTime 2020/4/27 16:14 + */ + @PostMapping("selectcreatedtimebyuserid") + public Result createdTimeByUserId(@RequestBody CreatedTimeByUserIdFormDTO formDTO){ + return new Result().ok(userService.createdTimeByUserId(formDTO)); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserDao.java index a015e34805..62a09ab69e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserDao.java @@ -1,6 +1,8 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.CreatedTimeByUserIdFormDTO; +import com.epmet.dto.result.CreatedTimeByUserIdResultDTO; import com.epmet.dto.result.PasswordLoginUserInfoResultDTO; import com.epmet.entity.UserEntity; import org.apache.ibatis.annotations.Mapper; @@ -23,4 +25,14 @@ public interface UserDao extends BaseDao { PasswordLoginUserInfoResultDTO selectOperUserByPhone(String phone); + /** + * + * @Description 查询用户注册时间 + * @param: formDTO + * @Author zxc + * @CreatedTime 2020/4/27 16:17 + */ + CreatedTimeByUserIdResultDTO createdTimeByUserId(CreatedTimeByUserIdFormDTO formDTO); + + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserService.java index 09cd2e5bd1..6a9ea0b96a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserService.java @@ -5,9 +5,11 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.UserDTO; import com.epmet.dto.UserWechatDTO; +import com.epmet.dto.form.CreatedTimeByUserIdFormDTO; import com.epmet.dto.form.PasswordLoginUserInfoFormDTO; import com.epmet.dto.form.WxLoginUserInfoFormDTO; import com.epmet.dto.form.WxUserInfoFormDTO; +import com.epmet.dto.result.CreatedTimeByUserIdResultDTO; import com.epmet.dto.result.PasswordLoginUserInfoResultDTO; import com.epmet.entity.UserEntity; @@ -55,4 +57,13 @@ public interface UserService extends BaseService { * @Description 居民端个人信息-同步用户微信信息 **/ Result updateWxUserInfo(WxUserInfoFormDTO wxUserInfoFormDTO); + + /** + * + * @Description 查询用户注册时间 + * @param: formDTO + * @Author zxc + * @CreatedTime 2020/4/27 16:14 + */ + CreatedTimeByUserIdResultDTO createdTimeByUserId(CreatedTimeByUserIdFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java index 3d9e344e2a..d20564dadb 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java @@ -8,9 +8,11 @@ import com.epmet.dao.UserDao; import com.epmet.dao.UserWechatDao; import com.epmet.dto.UserDTO; import com.epmet.dto.UserWechatDTO; +import com.epmet.dto.form.CreatedTimeByUserIdFormDTO; import com.epmet.dto.form.PasswordLoginUserInfoFormDTO; import com.epmet.dto.form.WxLoginUserInfoFormDTO; import com.epmet.dto.form.WxUserInfoFormDTO; +import com.epmet.dto.result.CreatedTimeByUserIdResultDTO; import com.epmet.dto.result.PasswordLoginUserInfoResultDTO; import com.epmet.entity.UserEntity; import com.epmet.entity.UserWechatEntity; @@ -109,4 +111,18 @@ public class UserServiceImpl extends BaseServiceImpl implem userWechatDao.updateByUserId(userWechatDTO); return new Result(); } + + /** + * + * @Description 查询用户注册时间 + * @param: formDTO + * @Author zxc + * @CreatedTime 2020/4/27 16:14 + */ + @Override + public CreatedTimeByUserIdResultDTO createdTimeByUserId(CreatedTimeByUserIdFormDTO formDTO) { + CreatedTimeByUserIdResultDTO registerTime = baseDao.createdTimeByUserId(formDTO); + registerTime.setRegisterTime(registerTime.getRegisterTime() * 1000L); + return registerTime; + } } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserDao.xml index 34b509b54d..5d34b7878d 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserDao.xml @@ -15,4 +15,15 @@ AND ou.PHONE = #{phone} + + +