Browse Source

Merge branch 'dev_group_edit' into dev_temp

# Conflicts:
#	epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java
dev_shibei_match
wxz 5 years ago
parent
commit
2c05206032
  1. 46
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java

46
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java

@ -371,37 +371,37 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
applyCreateGroupFormDTO.getGroupHeadPhoto());
//3.1、查询当前申请人的身份,生成对应格式的消息内容
UserRoleDTO userRoleDTO = this.checkPartyMemberOrWarmHeated(applyCreateGroupFormDTO.getApp(),
applyCreateGroupFormDTO.getUserId(),
applyCreateGroupFormDTO.getCustomerId(),
applyCreateGroupFormDTO.getGridId());
if (!NumConstant.ONE_STR.equals(userRoleDTO.getPartymemberFlag()) && !NumConstant.ONE_STR.equals(userRoleDTO.getWarmHeartedFlag())) {
UserRoleDTO userRoleDTO = this.checkPartyMemberOrWarmHeated(applyCreateGroupFormDTO.getApp(),
applyCreateGroupFormDTO.getUserId(),
applyCreateGroupFormDTO.getCustomerId(),
applyCreateGroupFormDTO.getGridId());
if (!NumConstant.ONE_STR.equals(userRoleDTO.getPartymemberFlag()) && !NumConstant.ONE_STR.equals(userRoleDTO.getWarmHeartedFlag())) {
logger.info(String.format("创建小组异常:%s",EpmetErrorCode.CANNOT_CREATE_GROUP.getMsg()));
throw new RenException(EpmetErrorCode.CANNOT_CREATE_GROUP.getCode());
}
String roleName = "";
if(NumConstant.ONE_STR.equals(userRoleDTO.getPartymemberFlag())){
roleName = ModuleConstant.PARTYMEMBER;
}else if(NumConstant.ONE_STR.equals(userRoleDTO.getWarmHeartedFlag())){
roleName = ModuleConstant.WAREMHEARTED_RESI;
}
}
String roleName = "";
if(NumConstant.ONE_STR.equals(userRoleDTO.getPartymemberFlag())){
roleName = ModuleConstant.PARTYMEMBER;
}else if(NumConstant.ONE_STR.equals(userRoleDTO.getWarmHeartedFlag())){
roleName = ModuleConstant.WAREMHEARTED_RESI;
}
//3.2、插入一条待审核的组信息
ResiGroupEntity resiGroupEntity = this.structureResiGroupEntity(applyCreateGroupFormDTO);
insert(resiGroupEntity);
//4.获取居民注册信息
UserResiInfoFormDTO resiParam = new UserResiInfoFormDTO();
resiParam.setCustomerId(applyCreateGroupFormDTO.getCustomerId());
resiParam.setUserId(applyCreateGroupFormDTO.getUserId());
Result<UserResiInfoResultDTO> resiResult =
epmetUserFeignClient.getUserResiInfoDTO(resiParam);
String userName = "";
if(resiResult.success() && null != resiResult.getData()){
userName = (StringUtils.isBlank(resiResult.getData().getSurname()) ? "" : resiResult.getData().getSurname())
+ (StringUtils.isBlank(resiResult.getData().getName()) ? "" :resiResult.getData().getName());
}
UserResiInfoFormDTO resiParam = new UserResiInfoFormDTO();
resiParam.setCustomerId(applyCreateGroupFormDTO.getCustomerId());
resiParam.setUserId(applyCreateGroupFormDTO.getUserId());
Result<UserResiInfoResultDTO> resiResult =
epmetUserFeignClient.getUserResiInfoDTO(resiParam);
String userName = "";
if(resiResult.success() && null != resiResult.getData()){
userName = (StringUtils.isBlank(resiResult.getData().getSurname()) ? "" : resiResult.getData().getSurname())
+ (StringUtils.isBlank(resiResult.getData().getName()) ? "" :resiResult.getData().getName());
}
userName = StringUtils.isBlank(userName) ? ModuleConstant.UNKNOWN : userName;
String msg = String.format(UserMessageConstant.CREATION_OF_GROUP_MESSAGE_TEMPLATE,roleName,userName,applyCreateGroupFormDTO.getGroupName());
String msg = String.format(UserMessageConstant.CREATION_OF_GROUP_MESSAGE_TEMPLATE,roleName,userName,applyCreateGroupFormDTO.getGroupName());
//4.2、插入一条待审核的操作记录
ResiGroupOperationDTO resiGroupOperation = new ResiGroupOperationDTO();
resiGroupOperation.setResiGroupId(resiGroupEntity.getId());

Loading…
Cancel
Save