Browse Source

表决修改

dev
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)){ if (formDTO.getSourceType().equals(ModuleConstants.ISSUE_FROM_TOPIC)){
Result<Integer> allResi = epmetUserOpenFeignClient.getAllResiByGrid(new AllResiByGridFormDTO(issueDTO.getGridId()));
if (!allResi.success()){
throw new EpmetException("查询网格下的注册居民失败:"+issueDTO.getGridId());
}
redisData.setShouldVoteCount(allResi.getData());
}else {
Result<Integer> integerResult = resiGroupFeignClient.votableCount(dto); Result<Integer> integerResult = resiGroupFeignClient.votableCount(dto);
if (!integerResult.success()){ if (!integerResult.success()){
throw new EpmetException("查询应表决人数失败..."); throw new EpmetException("查询应表决人数失败...");
} }
redisData.setShouldVoteCount(integerResult.getData()); 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); issueVoteDetailRedis.set(redisData);
Integer checkoutVoteCount = baseDao.checkoutVote(formDTO); Integer checkoutVoteCount = baseDao.checkoutVote(formDTO);

Loading…
Cancel
Save