Browse Source

Merge remote-tracking branch 'origin/dev_govorg' into dev_govorg

master
wangchao 5 years ago
parent
commit
f3281318fa
  1. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  2. 2
      epmet-module/epmet-message/epmet-message-server/docker-compose.yml
  3. 2
      epmet-module/epmet-message/epmet-message-server/pom.xml
  4. 11
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/UserMessageController.java
  5. 8
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/UserMessageService.java
  6. 6
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/UserMessageServiceImpl.java
  7. 34
      epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/form/CertifiedDetailFormDTO.java
  8. 72
      epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/CertifiedDetailResultDTO.java
  9. 17
      epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/CertifiedResultDTO.java
  10. 2
      epmet-module/gov-grid/gov-grid-server/docker-compose.yml
  11. 4
      epmet-module/gov-grid/gov-grid-server/pom.xml
  12. 69
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiPartyMemberController.java
  13. 57
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java
  14. 33
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/ResiPartymemberFeignClientFallBack.java
  15. 59
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiPartyMemberService.java
  16. 42
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiPartyMemberServiceImpl.java
  17. 47
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyAndStaffsResultDTO.java
  18. 2
      epmet-module/gov-org/gov-org-server/docker-compose.yml
  19. 2
      epmet-module/gov-org/gov-org-server/pom.xml
  20. 13
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerGridConstant.java
  21. 17
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java
  22. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java
  23. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java
  24. 7
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java
  25. 39
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
  26. 2
      epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/epmet_gov_org.sql
  27. 5
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml
  28. 35
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml
  29. 2
      epmet-module/resi-group/resi-group-server/docker-compose.yml
  30. 2
      epmet-module/resi-group/resi-group-server/pom.xml
  31. 5
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberServiceImpl.java
  32. 29
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/AuditingDetailFromDTO.java
  33. 24
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/AutoFailedDetailFromDTO.java
  34. 34
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/CertifiedDetailFormDTO.java
  35. 39
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberConfirmFromDTO.java
  36. 29
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/RejectedDetailFromDTO.java
  37. 32
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/AdditionalInfoDTO.java
  38. 65
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/AuditingDetailResultDTO.java
  39. 49
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/AutoFailedDetailResultDTO.java
  40. 77
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/CertifiedDetailResultDTO.java
  41. 15
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/CertifiedResultDTO.java
  42. 66
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/RejectedDetailResultDTO.java
  43. 2
      epmet-module/resi-partymember/resi-partymember-server/docker-compose.yml
  44. 2
      epmet-module/resi-partymember/resi-partymember-server/pom.xml
  45. 12
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/constant/PartyMemberConstant.java
  46. 11
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/EpmetMessageFeignClient.java
  47. 22
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/EpmetUserFeignClient.java
  48. 13
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/GovOrgFeignClient.java
  49. 7
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/fallback/EpmetMessageFeignClientFallback.java
  50. 14
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/fallback/EpmetUserFeignClientFallBack.java
  51. 7
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/feign/fallback/GovOrgFeignClientFallBack.java
  52. 53
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartyMemberConfirmController.java
  53. 14
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartymemberInfoController.java
  54. 11
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/PartymemberInfoDao.java
  55. 5
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/PartymemberConfirmManualEntity.java
  56. 38
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartyMemberConfirmService.java
  57. 13
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartymemberInfoService.java
  58. 217
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java
  59. 5
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberConfirmManualServiceImpl.java
  60. 34
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java
  61. 2
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/constant/ResiWarmUserMessageConstant.java
  62. 10
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/constant/ResiWarmheartedConstant.java
  63. 6
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/constant/ResiWarmheartedVisitConstant.java
  64. 65
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedApplyServiceImpl.java
  65. 48
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberInfoDao.xml
  66. 21
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CreatedTimeByUserIdFormDTO.java
  67. 17
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CertifiedResultDTO.java
  68. 21
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CreatedTimeByUserIdResultDTO.java
  69. 2
      epmet-user/epmet-user-server/docker-compose.yml
  70. 2
      epmet-user/epmet-user-server/pom.xml
  71. 13
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java
  72. 12
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserDao.java
  73. 11
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserService.java
  74. 16
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java
  75. 11
      epmet-user/epmet-user-server/src/main/resources/mapper/UserDao.xml

1
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, "该机关存在下级机关,不允许删除"),

2
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 # 使用现有网络

2
epmet-module/epmet-message/epmet-message-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
<modelVersion>4.0.0</modelVersion>
<version>0.3.1</version>
<version>0.3.2</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-message</artifactId>

11
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/UserMessageController.java

@ -132,4 +132,15 @@ public class UserMessageController {
public Result<List<UserMessageDTO>> 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<UserMessageFormDTO> msgList) {
return userMessageService.saveUserMessageList(msgList);
}
}

8
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/UserMessageService.java

@ -127,4 +127,12 @@ public interface UserMessageService extends BaseService<UserMessageEntity> {
* @return
*/
Result<List<UserMessageDTO>> getMyMessageList(MymessageFormDTO param);
/**
* @param msgList
* @return com.epmet.commons.tools.utils.Result
* @Author sun
* @Description 批量插入未读消息
**/
Result saveUserMessageList(List<UserMessageFormDTO> msgList);
}

6
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<UserMessageDao, User
return new Result<List<UserMessageDTO>>().ok(ConvertUtils.sourceToTarget(myMessageList, UserMessageDTO.class));
}
@Override
public Result saveUserMessageList(List<UserMessageFormDTO> msgList) {
List<UserMessageEntity> entityList = ConvertUtils.sourceToTarget(msgList, UserMessageEntity.class);
insertBatch(entityList);
return new Result();
}
}

34
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;
}

72
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;
}

17
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;
}

2
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 # 使用现有网络

4
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">
<modelVersion>4.0.0</modelVersion>
<version>0.3.3</version>
<version>0.3.5</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>gov-grid</artifactId>
@ -102,7 +102,7 @@
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>127.0.0.1</spring.redis.host>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->

69
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<List<CertifiedResultDTO>> 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<CertifiedDetailResultDTO> certifiedDetail(@RequestBody CertifiedDetailFormDTO formDTO){
return new Result<CertifiedDetailResultDTO>().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<AuditingDetailResultDTO> auditingDetail(@RequestBody AuditingDetailFromDTO fromDTO) {
return resiPartyMemberService.auditingDetail(fromDTO);
}
/**
* 自动审核失败详情
*
* @param fromDTO 参数
* @return Result
* @author zhaoqifeng
*/
@PostMapping("autofaileddetail")
public Result<AutoFailedDetailResultDTO> autoFailedDetail(@RequestBody AutoFailedDetailFromDTO fromDTO) {
return resiPartyMemberService.autoFailedDetail(fromDTO);
}
/**
* 拒绝详情
*
* @param fromDTO 参数
* @return Result
* @author zhaoqifeng
*/
@PostMapping("rejecteddetail")
public Result<RejectedDetailResultDTO> rejectedDetail(@RequestBody RejectedDetailFromDTO fromDTO) {
return resiPartyMemberService.rejectedDetail(fromDTO);
}
}

57
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<List<CertifiedResultDTO>> certified(@RequestBody CertifiedFormDTO certifiedFormDTO);
/**
*
* @Description 已认证党员详情
* @param: formDTO
* @Author zxc
* @CreatedTime 2020/4/27 15:22
*/
@PostMapping(value = "/resi/partymember/partymemberinfo/certifieddetail")
Result<CertifiedDetailResultDTO> certifiedDetail(@RequestBody CertifiedDetailFormDTO formDTO);
/**
* 审核党员
*
* @param fromDTO 参数
* @return Result
* @author zhaoqifeng
*/
@PostMapping("/resi/partymember/confirm/audit")
Result manualConfirmResult(@RequestBody PartyMemberConfirmFromDTO fromDTO);
/**
* 待审核详情
*
* @param fromDTO 参数
* @return Result<AuditingDetailResultDTO>
* @author zhaoqifeng
*/
@PostMapping("/resi/partymember/confirm/auditingdetail")
Result<AuditingDetailResultDTO> auditingDetail(@RequestBody AuditingDetailFromDTO fromDTO);
/**
* 自动审核失败详情
*
* @param fromDTO 参数
* @return Result<AutoFailedDetailResultDTO>
* @author zhaoqifeng
*/
@PostMapping("/resi/partymember/confirm/autofaileddetail")
Result<AutoFailedDetailResultDTO> autoFailedDetail(@RequestBody AutoFailedDetailFromDTO fromDTO);
/**
* 拒绝详情
*
* @param fromDTO 参数
* @return Result<RejectedDetailResultDTO>
* @author zhaoqifeng
*/
@PostMapping("/resi/partymember/confirm/rejecteddetail")
Result<RejectedDetailResultDTO> rejectedDetail(@RequestBody RejectedDetailFromDTO fromDTO);
}

33
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<CertifiedDetailResultDTO> 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<AuditingDetailResultDTO> auditingDetail(AuditingDetailFromDTO fromDTO) {
return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "auditingDetail", fromDTO);
}
@Override
public Result<AutoFailedDetailResultDTO> autoFailedDetail(AutoFailedDetailFromDTO fromDTO) {
return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "autoFailedDetail", fromDTO);
}
@Override
public Result<RejectedDetailResultDTO> rejectedDetail(RejectedDetailFromDTO fromDTO) {
return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "rejectedDetail", fromDTO);
}
}

59
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<List<AuditedPartyMemberResultDTO>> audited(AuditedPartyMemberFormDTO formDTO);
/**
*
* @Description 获取已认证党员
@ -45,4 +56,50 @@ public interface ResiPartyMemberService {
* @CreatedTime 2020/4/26 16:18
*/
Result<List<CertifiedResultDTO>> 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<AuditingDetailResultDTO> auditingDetail(AuditingDetailFromDTO fromDTO);
/**
* 自动审核失败详情
*
* @param fromDTO
* @return
* @author zhaoqifeng
*/
Result<AutoFailedDetailResultDTO> autoFailedDetail(AutoFailedDetailFromDTO fromDTO);
/**
* 拒绝详情
*
* @param fromDTO
* @return
* @author zhaoqifeng
*/
Result<RejectedDetailResultDTO> rejectedDetail(RejectedDetailFromDTO fromDTO);
}

42
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<List<CertifiedResultDTO>> 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<AuditingDetailResultDTO> auditingDetail(AuditingDetailFromDTO fromDTO) {
return resiPartymemberFeignClient.auditingDetail(fromDTO);
}
@Override
public Result<AutoFailedDetailResultDTO> autoFailedDetail(AutoFailedDetailFromDTO fromDTO) {
return resiPartymemberFeignClient.autoFailedDetail(fromDTO);
}
@Override
public Result<RejectedDetailResultDTO> rejectedDetail(RejectedDetailFromDTO fromDTO) {
return resiPartymemberFeignClient.rejectedDetail(fromDTO);
}
}

47
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<CustomerStaffGridDTO> staffList;
}

2
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 # 使用现有网络

2
epmet-module/gov-org/gov-org-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
<modelVersion>4.0.0</modelVersion>
<version>0.3.7</version>
<version>0.3.10</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>gov-org</artifactId>

13
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未查询到网格信息";
}

17
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<List<CustomerGridByUserIdResultDTO>> getMyGrids(@PathVariable("userId") String userId) {
return customerGridService.getMyGrids(userId);
}
/**
* @param gridId
* @return
* @Author sun
* @Description 根据网格id查询所属组织信息根据网格Id查询网格下所有工作人员列表
**/
@PostMapping("getagencyandstaffsbygridid/{gridId}")
public Result<AgencyAndStaffsResultDTO> getAgencyAndStaffsBygridId(@PathVariable("gridId") String gridId) {
return customerGridService.getAgencyAndStaffsBygridId(gridId);
}
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java

@ -123,7 +123,7 @@ public interface CustomerGridDao extends BaseDao<CustomerGridEntity> {
* @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);
/**
* 编辑网格信息

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java

@ -74,4 +74,12 @@ public interface CustomerStaffGridDao extends BaseDao<CustomerStaffGridEntity> {
* @Date 2020.04.27 16:43
**/
void updateByStaffIdAndGridId(CustomerStaffGridDTO staffGridDTO);
/**
* @param gridId
* @return
* @Description 根据网格Id查询网格下工作人员列表
* @Author sun
*/
List<CustomerStaffGridDTO> selectByGridId(@Param("gridId")String gridId);
}

7
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java

@ -212,4 +212,11 @@ public interface CustomerGridService extends BaseService<CustomerGridEntity> {
**/
Result addGridStaffs(CommonGridStaffListFromDTO staffListFormDTO);
/**
* @param gridId
* @return
* @Author sun
* @Description 根据网格id查询所属组织信息根据网格Id查询网格下所有工作人员列表
**/
Result<AgencyAndStaffsResultDTO> getAgencyAndStaffsBygridId(String gridId);
}

39
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<CustomerGridDao, Cu
@Override
@Transactional(rollbackFor = Exception.class)
public Result<AddGridResultDTO> 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<CustomerGridDao, Cu
customerGridEntity.setPid(addGridFormDTO.getAgencyId());
customerGridEntity.setPids(baseDao.selectPidsByPid(addGridFormDTO.getAgencyId()));
baseDao.insert(customerGridEntity);
String gridId = baseDao.selectGridIdByGridName(addGridFormDTO.getGridName(),addGridFormDTO.getAgencyId());
String gridId = baseDao.selectGridIdByGridName(addGridFormDTO.getGridName(),addGridFormDTO.getAgencyId(),null);
AddGridResultDTO addGridResultDTO = new AddGridResultDTO();
addGridResultDTO.setGridId(gridId);
return new Result<AddGridResultDTO>().ok(addGridResultDTO);
@ -231,7 +226,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
@Override
@Transactional(rollbackFor = Exception.class)
public Result editGrid(TokenDto tokenDto, EditGridFormDTO editGridFormDTO) {
String checkGridName = baseDao.selectGridIdByGridName(editGridFormDTO.getGridName(),editGridFormDTO.getAgencyId());
String checkGridName = baseDao.selectGridIdByGridName(editGridFormDTO.getGridName(),editGridFormDTO.getAgencyId(),editGridFormDTO.getGridId());
if (checkGridName!=null){
return new Result().error(EpmetErrorCode.NOT_ADD_GRID.getCode());
}
@ -481,4 +476,26 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
return new Result<SelectGridNameByGridIdResultDTO>().ok(baseDao.selectGridNameByGridId(formDTO));
}
/**
* @param gridId
* @return
* @Author sun
* @Description 根据网格id查询所属组织信息根据网格Id查询网格下所有工作人员列表
**/
@Override
public Result<AgencyAndStaffsResultDTO> getAgencyAndStaffsBygridId(String gridId) {
Result<AgencyAndStaffsResultDTO> 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<CustomerStaffGridDTO> staffList = customerStaffGridDao.selectByGridId(gridId);
agencyAndStaffsResultDTO.setStaffList(staffList);
return result.ok(agencyAndStaffsResultDTO);
}
}

2
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 (

5
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml

@ -93,7 +93,7 @@
</select>
<!-- -->
<!-- 根据gridId查询gridName -->
<select id="selectGridNameByGridId" parameterType="com.epmet.dto.form.SelectGridNameByGridIdFormDTO" resultType="com.epmet.dto.result.SelectGridNameByGridIdResultDTO">
SELECT
id AS gridId,
@ -181,6 +181,9 @@
WHERE
grid_name = #{gridName}
AND pid = #{agencyId}
<if test="gridId != null and gridId != '' ">
AND id != #{gridId}
</if>
AND del_flag = 0
</select>

35
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml

@ -3,19 +3,18 @@
<mapper namespace="com.epmet.dao.CustomerStaffGridDao">
<resultMap type="com.epmet.entity.CustomerStaffGridEntity" id="customerStaffGridMap">
<result property="id" column="ID"/>
<result property="userId" column="USER_ID"/>
<result property="gridId" column="GRID_ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<sql id="sql">
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"
</sql>
<!-- 查询指定客户下一个用户所在的网格,按照网格名称升序排序,取第一个 -->
<select id="selectStaffGridOrderByGridName" parameterType="com.epmet.dto.form.LatestGridFormDTO" resultType="com.epmet.dto.CustomerGridDTO">
@ -56,6 +55,16 @@
</select>
<select id="selectByGridId" resultType="com.epmet.dto.CustomerStaffGridDTO">
SELECT
<include refid="sql"></include>
FROM
customer_staff_grid csg
WHERE
csg.del_flag = '0'
AND csg.grid_id = #{gridId}
</select>
<!-- 批量插入网格工作人员 -->
<insert id="insertBatch" parameterType="java.util.List">
insert into customer_staff_grid

2
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 # 使用现有网络

2
epmet-module/resi-group/resi-group-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
<modelVersion>4.0.0</modelVersion>
<version>0.3.2</version>
<version>0.3.3</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>resi-group</artifactId>

5
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());

29
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;
}

24
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;
}

34
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;
}

39
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;
}

29
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;
}

32
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<String> failedReason;
}

65
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;
}

49
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;
}

77
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;
}

15
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;
}

66
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;
}

2
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 # 使用现有网络

2
epmet-module/resi-partymember/resi-partymember-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
<modelVersion>4.0.0</modelVersion>
<version>0.3.2</version>
<version>0.3.4</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>resi-partymember</artifactId>

12
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";
}

11
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<UserMessageFormDTO> msgList);
}

22
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<List<CertifiedResultDTO>> selectUserHeadPhotoByUserId(List<CertifiedResultDTO> certifiedResultDTOS);
/**
*
* @Description 查询用户注册时间
* @Author zxc
* @CreatedTime 2020/4/27 16:14
*/
@PostMapping("/epmetuser/user/selectcreatedtimebyuserid")
Result<CreatedTimeByUserIdResultDTO> createdTimeByUserId(@RequestBody CreatedTimeByUserIdFormDTO formDTO);
/**
* 根据机构Id查询机构下是网格长角色的用户
* @param staffRoleFormDTO
* @return
* @Author sun
*/
@PostMapping("/epmetuser/staffrole/staffsinrole")
Result<List<GovStaffRoleResultDTO>> getStaffsInRole(@RequestBody StaffRoleFormDTO staffRoleFormDTO);
}

13
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<SelectGridNameByGridIdResultDTO> selectGridNameByGridId(@RequestBody CertifiedFormDTO formDTO);
/**
* @param gridId
* @return
* @Author sun
* @Description 根据网格id查询所属组织信息根据网格Id查询网格下所有工作人员列表
**/
@PostMapping("/gov/org/customergrid/getagencyandstaffsbygridid/{gridId}")
Result<AgencyAndStaffsResultDTO> getAgencyAndStaffsBygridId(@PathVariable("gridId") String gridId);
}

7
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<UserMessageFormDTO> msgList) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_MESSAGE_SERVER, "saveUserMessageList", msgList);
}
}

14
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<List<CertifiedResultDTO>> selectUserHeadPhotoByUserId(List<CertifiedResultDTO> certifiedResultDTOS) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "selectUserHeadPhotoByUserId", certifiedResultDTOS);
}
@Override
public Result<CreatedTimeByUserIdResultDTO> createdTimeByUserId(CreatedTimeByUserIdFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "createdTimeByUserId", formDTO);
}
@Override
public Result<List<GovStaffRoleResultDTO>> getStaffsInRole(StaffRoleFormDTO staffRoleFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getStaffsInRole", staffRoleFormDTO);
}
}

7
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<SelectGridNameByGridIdResultDTO> selectGridNameByGridId(CertifiedFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "selectGridNameByGridId",formDTO);
}
@Override
public Result<AgencyAndStaffsResultDTO> getAgencyAndStaffsBygridId(String gridId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getAgencyAndStaffsBygridId",gridId);
}
}

53
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<AuditingDetailResultDTO> auditingDetail(@RequestBody AuditingDetailFromDTO fromDTO) {
return partyMemberConfirmService.auditingDetail(fromDTO);
}
/**
* 自动审核失败详情
*
* @param fromDTO 参数
* @return Result
*/
@PostMapping("autofaileddetail")
public Result<AutoFailedDetailResultDTO> autoFailedDetail(@RequestBody AutoFailedDetailFromDTO fromDTO) {
return partyMemberConfirmService.autoFailedDetail(fromDTO);
}
/**
* 拒绝详情
*
* @param fromDTO 参数
* @return Result
*/
@PostMapping("rejecteddetail")
public Result<RejectedDetailResultDTO> rejectedDetail(@RequestBody RejectedDetailFromDTO fromDTO) {
return partyMemberConfirmService.rejectedDetail(fromDTO);
}
}

14
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<List<CertifiedResultDTO>>().ok(partymemberInfoService.certified(certifiedFormDTO));
}
/**
*
* @Description 查询已认证党员详情
* @param: formDTO
* @Author zxc
* @CreatedTime 2020/4/27 15:26
*/
@PostMapping("certifieddetail")
public Result<CertifiedDetailResultDTO> certifieddetail(@RequestBody CertifiedDetailFormDTO formDTO){
return new Result<CertifiedDetailResultDTO>().ok(partymemberInfoService.certifiedDetail(formDTO));
}
}

11
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<PartymemberInfoEntity> {
*/
List<CertifiedResultDTO> selectCertifiedList(CertifiedFormDTO certifiedFormDTO);
/**
*
* @Description 查询已认证党员详情
* @param: formDTO
* @Author zxc
* @CreatedTime 2020/4/27 15:30
*/
CertifiedDetailResultDTO certifiedDetail(CertifiedDetailFormDTO formDTO);
}

5
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;
}

38
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<AuditingDetailResultDTO> auditingDetail(AuditingDetailFromDTO fromDTO);
/**
* 自动审核失败详情
*
* @param fromDTO
* @return
*/
Result<AutoFailedDetailResultDTO> autoFailedDetail(AutoFailedDetailFromDTO fromDTO);
/**
* 拒绝详情
*
* @param fromDTO
* @return
*/
Result<RejectedDetailResultDTO> rejectedDetail(RejectedDetailFromDTO fromDTO);
}

13
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<PartymemberInfoEntit
*/
List<CertifiedResultDTO> certified(CertifiedFormDTO certifiedFormDTO);
/**
*
* @Description 查询已认证党员详情
* @param: formDTO
* @Author zxc
* @CreatedTime 2020/4/27 15:27
*/
CertifiedDetailResultDTO certifiedDetail(CertifiedDetailFormDTO formDTO);
}

217
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<AuditingDetailResultDTO> 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<String> 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<GridInfoResultDTO> 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<AuditingDetailResultDTO>().ok(resultDTO);
}
@Override
public Result<AutoFailedDetailResultDTO> 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<GridInfoResultDTO> 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<AutoFailedDetailResultDTO>().ok(resultDTO);
}
@Override
public Result<RejectedDetailResultDTO> 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<GridInfoResultDTO> 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<RejectedDetailResultDTO>().ok(resultDTO);
}
/**
* 判断是否已注册居民如果没有则注册居民
*

5
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<Partyme
@Override
public PartymemberConfirmManualDTO getInfoByPartyMemberInfoId(String partymemberInfoId) {
QueryWrapper<PartymemberConfirmManualEntity> 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);
}

34
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<PartymemberInfoD
public List<CertifiedResultDTO> certified(CertifiedFormDTO certifiedFormDTO) {
certifiedFormDTO.setPageNo(certifiedFormDTO.getPageNo() - NumConstant.ONE);
List<CertifiedResultDTO> 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<PartymemberInfoD
return listResult.getData();
}
/**
*
* @Description 查询已认证党员详情
* @param: formDTO
* @Author zxc
* @CreatedTime 2020/4/27 15:26
*/
@Override
public CertifiedDetailResultDTO certifiedDetail(CertifiedDetailFormDTO formDTO) {
CertifiedDetailResultDTO certifiedDetail = partyMemberInfoDao.certifiedDetail(formDTO);
if (certifiedDetail==null){
return new CertifiedDetailResultDTO();
}
certifiedDetail.setApplyTime(certifiedDetail.getApplyTime() * 1000L);//时间戳转换毫秒级
CreatedTimeByUserIdFormDTO time = new CreatedTimeByUserIdFormDTO();
time.setUserId(certifiedDetail.getUserId());
//查询用户注册时间
Result<CreatedTimeByUserIdResultDTO> registerTime = epmetUserFeignClient.createdTimeByUserId(time);
certifiedDetail.setCertifyTime(registerTime.getData().getRegisterTime());
CertifiedFormDTO certifiedFormDTO = new CertifiedFormDTO();
certifiedFormDTO.setGridId(certifiedDetail.getGridId());
//查询网格名称
Result<SelectGridNameByGridIdResultDTO> gridName = govOrgFeignClient.selectGridNameByGridId(certifiedFormDTO);
certifiedDetail.setGridFullPath(gridName.getData().getGridName());
return certifiedDetail;
}
}

2
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先生/女士申请成为热心居民请审核

10
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查询数据失败";
}

6
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 = "发送消息给网格长操作失败";
}

65
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<ResiWarmhea
//2:将最后一次操作行为更新到热心居民申请行为记录表中
resiWarmheartedVisitService.updateResiWarmVisit(formDTO);
//3:添加消息信息,给网格长发消息
saveResiWarmUserMessage(formDTO);
result = saveResiWarmUserMessage(formDTO);
if(!result.success()){
throw new RenException(ResiWarmheartedVisitConstant.SAVE_MSG_EXCEPTION);
}
result.setCode(NumConstant.ZERO);
result.setMsg(ResiWarmheartedVisitConstant.RESI_WARM_SUBMIT);
}
@ -234,19 +238,44 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl<ResiWarmhea
* @return
* @Author sun
*/
private void saveResiWarmUserMessage(ResiWarmheartedSubmitFormDTO formDTO) {
UserMessageFormDTO userMessageFormDTO = new UserMessageFormDTO();
userMessageFormDTO.setCustomerId(formDTO.getCustomerId());
userMessageFormDTO.setGridId(formDTO.getGridId());
//网格长用户Id TODO
//userMessageFormDTO.setUserId();
userMessageFormDTO.setUserId(formDTO.getUserId());//先在token中取一个默认值
userMessageFormDTO.setApp(formDTO.getApp());
userMessageFormDTO.setTitle(ResiWarmUserMessageConstant.GROUP_TITLE);
userMessageFormDTO.setMessageContent(formDTO.getMessageText());
userMessageFormDTO.setReadFlag(ReadFlagConstant.UN_READ);
//保存消息
epmetMessageFeignClient.saveUserMessage(userMessageFormDTO);
private Result saveResiWarmUserMessage(ResiWarmheartedSubmitFormDTO formDTO) {
Result result = new Result();
//1:调用gov-org服务,根据网格Id查询所属组织机构Id,根据网格Id查询网格下所有工作人员列表
Result<AgencyAndStaffsResultDTO> resultAgencyAndStaffs = govOrgFeignClient.getAgencyAndStaffsBygridId(formDTO.getGridId());
if(!resultAgencyAndStaffs.success()){
throw new RenException(ResiWarmheartedConstant.SELECT_EXCEPTION);
}
AgencyAndStaffsResultDTO agencyAndStaffsResultDTO = resultAgencyAndStaffs.getData();
//网格下工作人员列表
CustomerGridDTO customerGridDTO = agencyAndStaffsResultDTO.getCustomerGridDTO();
List<CustomerStaffGridDTO> staffList = agencyAndStaffsResultDTO.getStaffList();
//2:调用epmet-user服务,根据组织机构Id和网格长角色查询组织机构下所有的网格长StaffId
StaffRoleFormDTO staffRoleFormDTO = new StaffRoleFormDTO();
staffRoleFormDTO.setOrgId(customerGridDTO.getPid());
staffRoleFormDTO.setRoleKey(ResiWarmheartedVisitConstant.GRID_MANAGER);
Result<List<GovStaffRoleResultDTO>> resultList = epmetUserFeignClient.getStaffsInRole(staffRoleFormDTO);
List<GovStaffRoleResultDTO> roleList = resultList.getData();
//3:遍历找出当前网格的所有网格长并给网格长发消息
List<UserMessageFormDTO> 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

48
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 )
</select>
@ -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
</select>
<!-- 查询已认证党员 -->
<select id="selectCertifiedList" resultType="com.epmet.dto.result.CertifiedResultDTO">
SELECT
user_id AS userId,
CONCAT(surname,name) AS realName,
UNIX_TIMESTAMP( created_time ) AS applyTime
pi.user_id AS userId,
CONCAT(pi.surname,pi.name) AS realName,
UNIX_TIMESTAMP( pi.created_time ) AS applyTime,
pi.id AS partyMemberId,
IFNULL(pca.partymember_info_id,'') AS autoId,
IFNULL(pcm.partymember_info_id,'') AS manualId
FROM
partymember_info
partymember_info pi
LEFT JOIN partymember_confirm_auto pca ON pi.id = pca.partymember_info_id
LEFT JOIN partymember_confirm_manual pcm ON pi.id = pcm.partymember_info_id
WHERE
grid_id = #{gridId}
AND confirm_result IN ( 'auto_confirm_success', 'approved' )
AND del_flag = 0
LIMIT #{pageNo},#{pageSize}
pi.grid_id = #{gridId}
AND pi.confirm_result IN ( 'auto_confirm_success', 'approved' )
AND pi.del_flag = 0
LIMIT #{pageNo},#{pageSize}
</select>
<!-- 查询已认证党员详情 -->
<select id="certifiedDetail" resultType="com.epmet.resi.partymember.dto.partymember.result.CertifiedDetailResultDTO">
SELECT
pi.user_id AS userId,
CONCAT( pi.surname, pi.NAME ) AS realName,
pi.mobile,
pi.id_card AS idCard,
grid_id AS gridId,
CASE
WHEN ( pi.confirm_result = 'auto_confirm_success' ) THEN 'auto'
WHEN ( pi.confirm_result = 'approved' ) THEN 'manual'
END AS certifyType,
UNIX_TIMESTAMP(pi.created_time) AS applyTime,
organization_type AS extraOrganization,
extra_certifier_name AS contactPeople,
extra_certifier_mobile AS contactMobile
FROM
partymember_info pi
WHERE
pi.id = #{partyMemberId}
AND pi.del_flag = 0
AND pi.confirm_result IN ( 'auto_confirm_success', 'approved' )
</select>
</mapper>

21
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;
}

17
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;
}

21
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;
}

2
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 # 不会创建新的网络

2
epmet-user/epmet-user-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
<modelVersion>4.0.0</modelVersion>
<version>0.3.5</version>
<version>0.3.8</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-user</artifactId>

13
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<CreatedTimeByUserIdResultDTO> createdTimeByUserId(@RequestBody CreatedTimeByUserIdFormDTO formDTO){
return new Result<CreatedTimeByUserIdResultDTO>().ok(userService.createdTimeByUserId(formDTO));
}
}

12
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<UserEntity> {
PasswordLoginUserInfoResultDTO selectOperUserByPhone(String phone);
/**
*
* @Description 查询用户注册时间
* @param: formDTO
* @Author zxc
* @CreatedTime 2020/4/27 16:17
*/
CreatedTimeByUserIdResultDTO createdTimeByUserId(CreatedTimeByUserIdFormDTO formDTO);
}

11
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<UserEntity> {
* @Description 居民端个人信息-同步用户微信信息
**/
Result updateWxUserInfo(WxUserInfoFormDTO wxUserInfoFormDTO);
/**
*
* @Description 查询用户注册时间
* @param: formDTO
* @Author zxc
* @CreatedTime 2020/4/27 16:14
*/
CreatedTimeByUserIdResultDTO createdTimeByUserId(CreatedTimeByUserIdFormDTO formDTO);
}

16
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<UserDao, UserEntity> 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;
}
}

11
epmet-user/epmet-user-server/src/main/resources/mapper/UserDao.xml

@ -15,4 +15,15 @@
AND ou.PHONE = #{phone}
</select>
<!-- 查询用户注册时间 -->
<select id="createdTimeByUserId" resultType="com.epmet.dto.result.CreatedTimeByUserIdResultDTO">
SELECT
UNIX_TIMESTAMP( created_time ) AS registerTime
FROM
user
WHERE
id = #{userId}
AND del_flag = 0
</select>
</mapper>

Loading…
Cancel
Save