Browse Source

Merge remote-tracking branch 'origin/dev_bugfix' into dev

master
yinzuomei 5 years ago
parent
commit
cf0a318c1c
  1. 2
      epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/AuditedPartyMemberResultDTO.java
  2. 2
      epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/AuditingPartyMemberResultDTO.java
  3. 4
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java
  4. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
  5. 6
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java
  6. 2
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/ReviewedParyMemberResultDTO.java
  7. 2
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/UnderReviewParyMemberResultDTO.java
  8. 28
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/constant/PartyMemberMessageConstant.java
  9. 42
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java
  10. 6
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberBaseInfoDao.xml

2
epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/AuditedPartyMemberResultDTO.java

@ -31,7 +31,7 @@ public class AuditedPartyMemberResultDTO implements Serializable {
/**
* 申请时间
*/
private Date applyTime;
private Long applyTime;
/**
* auto_confirm_failed:自动认证失败,rejected :拒绝

2
epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/AuditingPartyMemberResultDTO.java

@ -32,7 +32,7 @@ public class AuditingPartyMemberResultDTO implements Serializable {
/**
* 申请时间
*/
private Date applyTime;
private Long applyTime;
/**
* 提交网格XXX街道-XXX社区-XXX网格

4
epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java

@ -51,7 +51,7 @@ public class ResiGroupController {
* @return Result<List < GroupAuditedResultDTO>>
*/
@PostMapping("groupsingrid")
public Result<List<GroupsInGridResultDTO>> getGroupsInGrid(GroupAuditedFromDTO formDTO) {
public Result<List<GroupsInGridResultDTO>> getGroupsInGrid(@RequestBody GroupAuditedFromDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return resiGroupService.getGroupsInGrid(formDTO);
}
@ -63,7 +63,7 @@ public class ResiGroupController {
* @return Result<GovGroupSummarizeResultDTO>
*/
@PostMapping("getgroupsummarize")
public Result<GovGroupSummarizeResultDTO> getGroupSummarize(GovGroupSummarizeFromDTO formDTO) {
public Result<GovGroupSummarizeResultDTO> getGroupSummarize(@RequestBody GovGroupSummarizeFromDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return resiGroupService.getGroupSummarize(formDTO);
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java

@ -435,7 +435,9 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
if(null==customerGridDTO){
return new Result<>();
}
gridInfoResultDTO.setGridId(gridId);
gridInfoResultDTO.setCustomerId(customerGridDTO.getCustomerId());
gridInfoResultDTO.setGridName(customerGridDTO.getGridName());
String pids=customerGridDTO.getPids();
String[] pidArray = pids.split(":");
for(String agencyId:pidArray){

6
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java

@ -225,7 +225,7 @@ public class ResiGroupController {
* @return Result<List < GroupAuditedResultDTO>>
*/
@PostMapping("audited")
public Result<List<GroupAuditedResultDTO>> audited(GroupAuditedFromDTO formDTO) {
public Result<List<GroupAuditedResultDTO>> audited(@RequestBody GroupAuditedFromDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return resiGroupService.audited(formDTO);
}
@ -237,7 +237,7 @@ public class ResiGroupController {
* @return Result<List < GroupAuditedResultDTO>>
*/
@PostMapping("groupsingrid")
public Result<List<GroupsInGridResultDTO>> getGroupsInGrid(GroupAuditedFromDTO formDTO) {
public Result<List<GroupsInGridResultDTO>> getGroupsInGrid(@RequestBody GroupAuditedFromDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return resiGroupService.getGroupsInGrid(formDTO);
}
@ -249,7 +249,7 @@ public class ResiGroupController {
* @return Result<GovGroupSummarizeResultDTO>
*/
@PostMapping("getgovgroupsummarize")
public Result<GovGroupSummarizeResultDTO> getGovGroupSummarize(GovGroupSummarizeFromDTO formDTO) {
public Result<GovGroupSummarizeResultDTO> getGovGroupSummarize(@RequestBody GovGroupSummarizeFromDTO formDTO) {
return resiGroupService.getGovGroupSummarize(formDTO);
}

2
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/ReviewedParyMemberResultDTO.java

@ -29,7 +29,7 @@ public class ReviewedParyMemberResultDTO {
/**
* 申请时间
*/
private Date applyTime;
private Long applyTime;
/**
* auto_confirm_failed:自动认证失败,rejected :拒绝

2
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/UnderReviewParyMemberResultDTO.java

@ -32,7 +32,7 @@ public class UnderReviewParyMemberResultDTO implements Serializable {
/**
* 申请时间
*/
private Date applyTime;
private Long applyTime;
/**
* read已读unread未读

28
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/constant/PartyMemberMessageConstant.java

@ -0,0 +1,28 @@
package com.epmet.constant;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/4/29 13:41
*/
public interface PartyMemberMessageConstant {
/**
* 消息标题
*/
String GROUP_TITLE = "您有一条党员申请消息";
/**
* 党员提交申请时给网格长发送消息XX街道-XX先生/女士申请成为党员请审核
*/
String MEMBER_APPLY_MSG = "%s申请成为党员,请审核。";
/**
* 党员申请审核通过给申请人发送消息您好您申请的党员已审核通过请查看
*/
String AUDIT_APPROVE_MSG = "您好,您申请的%s党员已审核通过,请查看。";
/**
* 党员申请审核驳回给申请人发送消息您好您申请的党员由于不符合条件的原因已被驳回
*/
String AUDIT_REJECT_MSG = "您好,您申请的%s党员,由于不符合条件的原因,已被驳回。";
}

42
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java

@ -1,12 +1,18 @@
package com.epmet.modules.partymember.service.impl;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.EpmetRoleKeyConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.PartyMemberConstant;
import com.epmet.constant.PartyMemberMessageConstant;
import com.epmet.constant.ReadFlagConstant;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.UserResiInfoDTO;
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.result.GridInfoResultDTO;
import com.epmet.dto.result.UserResiInfoResultDTO;
@ -16,6 +22,8 @@ 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.*;
import com.epmet.modules.warmhearted.constant.ResiWarmUserMessageConstant;
import com.epmet.modules.warmhearted.entity.ResiWarmheartedApplyEntity;
import com.epmet.resi.mine.dto.from.PartyMemberInitFromDTO;
import com.epmet.resi.mine.dto.from.VerificationCodeFromDTO;
import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO;
@ -260,11 +268,12 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
partymemberConfirmManualService.insert(manualEntity);
}
auditMessage(ConvertUtils.sourceToTarget(partyMemberInfo, PartymemberInfoEntity.class), PartyMemberMessageConstant.MEMBER_APPLY_MSG);
return new Result();
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result manualConfirmResult(PartyMemberConfirmFromDTO fromDTO) {
PartymemberConfirmManualEntity manualEntity = partymemberConfirmManualService.selectById(fromDTO.getManualId());
PartymemberInfoEntity partyMemberInfoEntity = partymemberInfoService.selectById(fromDTO.getPartyMemberId());
@ -289,6 +298,9 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
//存入党员注册关系表 用于统计客户网格的认证党员数
saveRegisterRelation(ConvertUtils.sourceToTarget(partyMemberInfoEntity,
PartymemberInfoDTO.class));
auditMessage(partyMemberInfoEntity, PartyMemberMessageConstant.AUDIT_APPROVE_MSG);
} else {
auditMessage(partyMemberInfoEntity, PartyMemberMessageConstant.AUDIT_REJECT_MSG);
}
return new Result();
@ -532,4 +544,32 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
return partymemberVisitEntity.getId();
}
/**
* 热心居民申请审核通过向申请人发送消息
* @Author sun
* @param formDTO
* @param userMsg 消息模板
*/
private Result auditMessage(PartymemberInfoEntity formDTO, String userMsg) {
UserMessageFormDTO userMessageFormDTO = new UserMessageFormDTO();
userMessageFormDTO.setCustomerId(formDTO.getCustomerId());
userMessageFormDTO.setGridId(formDTO.getGridId());
userMessageFormDTO.setUserId(formDTO.getUserId());
userMessageFormDTO.setApp(AppClientConstant.APP_RESI);
userMessageFormDTO.setTitle(PartyMemberMessageConstant.GROUP_TITLE);
//调用gov-org服务查询网格信息
CustomerGridFormDTO customerGridFormDTO = new CustomerGridFormDTO();
customerGridFormDTO.setGridId(formDTO.getGridId());
Result<CustomerGridDTO> result = govOrgFeignClient.getCustomerGridByGridId(customerGridFormDTO);
String gridName = null;
if (result.success() && null != result.getData()) {
gridName = result.getData().getGridName();
}
String messageContent = String.format(userMsg, gridName);
userMessageFormDTO.setMessageContent(messageContent);
userMessageFormDTO.setReadFlag(ReadFlagConstant.UN_READ);
//保存消息
return messageFeignClient.saveUserMessage(userMessageFormDTO);
}
}

6
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberBaseInfoDao.xml

@ -60,7 +60,7 @@
SELECT
pi.USER_ID AS userId,
concat( pi.SURNAME, pi.NAME ) AS realName,
pi.CREATED_TIME AS applyTime,
unix_timestamp(pi.CREATED_TIME) AS applyTime,
pcm.READ_FLAG AS readFlag,
pi.id as partyMemberId,
pca.id as autoId,
@ -85,7 +85,7 @@
SELECT
pi.USER_ID AS userId,
concat( pi.SURNAME, pi.NAME ) AS realName,
pi.CREATED_TIME AS applyTime,
unix_timestamp(pi.CREATED_TIME) AS applyTime,
pi.CONFIRM_RESULT AS status,
pi.id as partyMemberId,
pca.id as autoId,
@ -102,7 +102,7 @@
SELECT
pi.USER_ID AS userId,
concat( pi.SURNAME, pi.NAME ) AS realName,
pi.CREATED_TIME AS applyTime,
unix_timestamp(pi.CREATED_TIME) AS applyTime,
pi.CONFIRM_RESULT AS status,
pi.id as partyMemberId,
pca.id as autoId,

Loading…
Cancel
Save