Browse Source

表决修改

master
zxc 3 years ago
parent
commit
6eee4b5417
  1. 14
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteDetailServiceImpl.java

14
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteDetailServiceImpl.java

@ -159,18 +159,18 @@ public class IssueVoteDetailServiceImpl extends BaseServiceImpl<IssueVoteDetailD
/**
* 直接创建议题的应表决数为网格下的注册居民数
*/
if (formDTO.getSourceType().equals(ModuleConstants.ISSUE)){
Result<Integer> allResi = epmetUserOpenFeignClient.getAllResiByGrid(new AllResiByGridFormDTO(issueDTO.getGridId()));
if (!allResi.success()){
throw new EpmetException("查询网格下的注册居民失败:"+issueDTO.getGridId());
}
redisData.setShouldVoteCount(allResi.getData());
}else {
if (formDTO.getSourceType().equals(ModuleConstants.ISSUE_FROM_TOPIC)){
Result<Integer> integerResult = resiGroupFeignClient.votableCount(dto);
if (!integerResult.success()){
throw new EpmetException("查询应表决人数失败...");
}
redisData.setShouldVoteCount(integerResult.getData());
}else {
Result<Integer> allResi = epmetUserOpenFeignClient.getAllResiByGrid(new AllResiByGridFormDTO(issueDTO.getGridId()));
if (!allResi.success()){
throw new EpmetException("查询网格下的注册居民失败:"+issueDTO.getGridId());
}
redisData.setShouldVoteCount(allResi.getData());
}
issueVoteDetailRedis.set(redisData);
Integer checkoutVoteCount = baseDao.checkoutVote(formDTO);

Loading…
Cancel
Save