diff --git a/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/form/PartyBranchAddFormDTO.java b/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/form/PartyBranchAddFormDTO.java index 29ac589a4f..3de9a6f231 100644 --- a/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/form/PartyBranchAddFormDTO.java +++ b/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/form/PartyBranchAddFormDTO.java @@ -45,7 +45,6 @@ public class PartyBranchAddFormDTO implements Serializable { /** * 党支部概要信息 */ - @NotBlank(message = "请输入支部概要信息", groups = {AddUserShowGroup.class}) @Length(max = 500, message = "支部概要信息不能超过500个字", groups = AddUserShowGroup.class) private String profile; } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/constant/PartyMemberConstant.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/constant/PartyMemberConstant.java index bb0795b43b..ab366fd058 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/constant/PartyMemberConstant.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/constant/PartyMemberConstant.java @@ -135,4 +135,9 @@ public interface PartyMemberConstant { * 已读 */ String READ = "read"; + + /** + * 党员详情界面:账号于2020年10月31日在海泊桥社区-第一网格激活 + */ + String AUTH_DESC="账户于%s年%s月%s日在%s激活"; } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartymemberAuthRecordService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartymemberAuthRecordService.java index e0a3245038..1087dc909b 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartymemberAuthRecordService.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartymemberAuthRecordService.java @@ -20,6 +20,7 @@ package com.epmet.modules.partymember.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.modules.partymember.entity.PartymemberAuthRecordEntity; +import com.epmet.modules.partymember.entity.PartymemberInfoEntity; import com.epmet.resi.partymember.dto.partymember.PartymemberAuthRecordDTO; import java.util.List; @@ -92,4 +93,14 @@ public interface PartymemberAuthRecordService extends BaseService init(PartyMemberInitFromDTO fromDto) { @@ -182,7 +184,7 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService return new Result().error(EpmetErrorCode.MOBILE_CODE_ERROR.getCode()); }*/ - //获取党员基本信息 + //获取党员基本信息(匹配) PartymemberConfirmAutoDTO confirmAutoDTO = partymemberBaseInfoService.getPartyMemberBaseInfo(partyMemberInfoDTO); @@ -212,6 +214,9 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService partyMemberInfoEntity.setConfirmResult(PartyMemberConstant.AUTO_CONFIRM_SUCCESS); if (partyMemberInfoEntity.getId().isEmpty()) { partymemberInfoService.insert(partyMemberInfoEntity); + //记录当前居民与党员库关系,保存认证信息 + logger.info(String.format("党员认证自动匹配成功,保存partymember_auth_record,userId=%s,党员库id=%s",partyMemberInfoEntity.getUserId(),confirmAutoDTO.getPatryMemberBaseInfoId())); + partymemberAuthRecordService.insert(partyMemberInfoEntity,confirmAutoDTO.getPatryMemberBaseInfoId()); } else { partymemberInfoService.updateById(partyMemberInfoEntity); } @@ -256,7 +261,7 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService PartymemberConfirmAutoEntity.class)); } } - + // //判断是否已注册居民,如果没有则注册居民 isResiRegister(partyMemberInfoDTO); @@ -301,7 +306,6 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService PartymemberInfoEntity partyMemberInfoEntity = partymemberInfoService.selectById(fromDTO.getPartyMemberId()); partyMemberInfoEntity.setId(manualEntity.getPartymemberInfoId()); partyMemberInfoEntity.setConfirmResult(fromDTO.getPartyMemberFlag()); - partymemberInfoService.updateById(partyMemberInfoEntity); manualEntity.setAuditStatus(fromDTO.getPartyMemberFlag()); @@ -326,6 +330,12 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService identityParam.setUserId(partyMemberInfoEntity.getUserId()); identityParam.setPartyFlag(NumConstant.ONE_STR); resiGroupFeignClient.updateWhenAuditedResiRole(identityParam); + //如果是自动匹配失败的,人工审核他是党员,需要记录党员库-居民的认证关系 + PartymemberConfirmAutoDTO partymemberConfirmAutoDTO=partymemberConfirmAutoService.get(fromDTO.getAutoId()); + if(partymemberConfirmAutoDTO!=null){ + logger.info(String.format("自动匹配失败,人工审核是党员,保存partymember_auth_record,userId=%s,党员库id=%s",partyMemberInfoEntity.getUserId(),partymemberConfirmAutoDTO.getPatryMemberBaseInfoId())); + partymemberAuthRecordService.insert(partyMemberInfoEntity,partymemberConfirmAutoDTO.getPatryMemberBaseInfoId()); + } } else { auditMessageToResi(partyMemberInfoEntity, PartyMemberMessageConstant.AUDIT_REJECT_MSG); } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberAuthRecordServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberAuthRecordServiceImpl.java index 8c303050d4..0252d78942 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberAuthRecordServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberAuthRecordServiceImpl.java @@ -20,20 +20,28 @@ package com.epmet.modules.partymember.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; 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.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.PartyMemberConstant; +import com.epmet.dto.result.GridInfoResultDTO; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.modules.partymember.dao.PartymemberAuthRecordDao; import com.epmet.modules.partymember.entity.PartymemberAuthRecordEntity; +import com.epmet.modules.partymember.entity.PartymemberInfoEntity; import com.epmet.modules.partymember.redis.PartymemberAuthRecordRedis; import com.epmet.modules.partymember.service.PartymemberAuthRecordService; import com.epmet.resi.partymember.dto.partymember.PartymemberAuthRecordDTO; import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; +import java.util.Calendar; import java.util.List; import java.util.Map; @@ -45,9 +53,11 @@ import java.util.Map; */ @Service public class PartymemberAuthRecordServiceImpl extends BaseServiceImpl implements PartymemberAuthRecordService { - + private static final Logger logger = LoggerFactory.getLogger(PartymemberAuthRecordServiceImpl.class); @Autowired private PartymemberAuthRecordRedis partymemberAuthRecordRedis; + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; @Override public PageData page(Map params) { @@ -101,4 +111,32 @@ public class PartymemberAuthRecordServiceImpl extends BaseServiceImpl result=govOrgOpenFeignClient.queryGridInfo(partymemberAuthRecordEntity.getGridId()); + String gridName=""; + if(result.success()&&null!=result.getData()){ + gridName=String.format("%s-%s",result.getData().getParentAgencyName(),result.getData().getGridName()); + }else{ + logger.error("保存用户认证党员记录失败:查询网格名称失败"); + } + partymemberAuthRecordEntity.setAuthDesc(String.format(PartyMemberConstant.AUTH_DESC, + calendar.get(Calendar.YEAR), + calendar.get(Calendar.MONTH)+1, + calendar.get(Calendar.DATE), + gridName)); + baseDao.insert(partymemberAuthRecordEntity); + logger.info(String.format("保存用户认证党员记录成功:认证描述%s",partymemberAuthRecordEntity.getAuthDesc())); + } + } \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberBaseInfoServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberBaseInfoServiceImpl.java index 890d88a175..ae51f2cc19 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberBaseInfoServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberBaseInfoServiceImpl.java @@ -330,11 +330,12 @@ public class PartymemberBaseInfoServiceImpl extends BaseServiceImpl gridInfoResult = govOrgFeignClient.queryGridInfo(formDTO.getGridId()); String gridFullPath = ""; if (gridInfoResult.success() && null != gridInfoResult.getData()) { - gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName(), + /*gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName(), gridInfoResult.getData().getCommnuityName(), gridInfoResult.getData().getGridName()); gridFullPath = gridFullPath.replaceAll("null", "").trim(); - gridFullPath = gridFullPath.replaceAll("--", "-").trim(); + gridFullPath = gridFullPath.replaceAll("--", "-").trim();*/ + gridFullPath=String.format("%s-%s",gridInfoResult.getData().getParentAgencyName(),gridInfoResult.getData().getGridName()); } //查询居民认证信息,获取居民头像 List userIdList = new ArrayList<>(); @@ -373,11 +374,12 @@ public class PartymemberBaseInfoServiceImpl extends BaseServiceImpl gridInfoResult = govOrgFeignClient.queryGridInfo(formDTO.getGridId()); String gridFullPath = ""; if (gridInfoResult.success() && null != gridInfoResult.getData()) { - gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName() == null?"":gridInfoResult.getData().getStreetName(), + /*gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName() == null?"":gridInfoResult.getData().getStreetName(), gridInfoResult.getData().getCommnuityName() == null?"":gridInfoResult.getData().getCommnuityName(), gridInfoResult.getData().getGridName() == null?"":gridInfoResult.getData().getGridName()); gridFullPath = gridFullPath.replaceAll("null", "").trim(); - gridFullPath = gridFullPath.replaceAll("--", "-").trim(); + gridFullPath = gridFullPath.replaceAll("--", "-").trim();*/ + gridFullPath=String.format("%s-%s",gridInfoResult.getData().getParentAgencyName(),gridInfoResult.getData().getGridName()); } //查询居民认证信息,获取居民头像 List userIdList = new ArrayList<>(); diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java index 77a6eaa634..4803ebef14 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java @@ -29,7 +29,6 @@ import com.epmet.dto.form.CreatedTimeByUserIdFormDTO; import com.epmet.dto.result.CertifiedResultDTO; import com.epmet.dto.result.CreatedTimeByUserIdResultDTO; import com.epmet.dto.result.GridInfoResultDTO; -import com.epmet.dto.result.SelectGridNameByGridIdResultDTO; import com.epmet.modules.feign.EpmetUserFeignClient; import com.epmet.modules.feign.GovOrgFeignClient; import com.epmet.modules.partymember.dao.PartymemberInfoDao; @@ -159,10 +158,11 @@ public class PartymemberInfoServiceImpl extends BaseServiceImpl gridInfoResult = govOrgFeignClient.queryGridInfo(certifiedFormDTO.getGridId()); String gridFullPath = ""; if (gridInfoResult.success() && null != gridInfoResult.getData()) { - gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName() == null?"":gridInfoResult.getData().getStreetName(), + /*gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName() == null?"":gridInfoResult.getData().getStreetName(), gridInfoResult.getData().getCommnuityName() == null?"":gridInfoResult.getData().getCommnuityName(), gridInfoResult.getData().getGridName() == null?"":gridInfoResult.getData().getGridName()); - gridFullPath = gridFullPath.replaceAll("--", "").trim(); + gridFullPath = gridFullPath.replaceAll("--", "").trim();*/ + gridFullPath=String.format("%s-%s",gridInfoResult.getData().getParentAgencyName(),gridInfoResult.getData().getGridName()); } for (CertifiedResultDTO datum : listResult.getData()) { datum.setGridFullPath(gridFullPath);