|
|
@ -187,27 +187,15 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt |
|
|
|
} else { |
|
|
|
//折线数据=DB+Redis,今天之前转成的议题,今天 “已转项目”或“已结案”
|
|
|
|
if (date.equals(LocalDate.now().toString())) { |
|
|
|
Integer yesterdaySupport = NumConstant.ZERO; |
|
|
|
Integer yesterdayOppose = NumConstant.ZERO; |
|
|
|
for (PolyLineDTO lineDTO : polyLineDTOS) { |
|
|
|
yesterdaySupport += lineDTO.getSupportIncrement(); |
|
|
|
yesterdayOppose += lineDTO.getOppositionIncrement(); |
|
|
|
} |
|
|
|
polyLineDTO.setSupportIncrement(voteRedisFormDTO.getSupportAmount() == NumConstant.ZERO ? NumConstant.ZERO : voteRedisFormDTO.getSupportAmount() - yesterdaySupport); |
|
|
|
polyLineDTO.setOppositionIncrement(voteRedisFormDTO.getOppositionAmount() == NumConstant.ZERO ? NumConstant.ZERO : voteRedisFormDTO.getOppositionAmount() - yesterdayOppose); |
|
|
|
polyLineDTO.setSupportIncrement(voteRedisFormDTO.getSupportAmount()); |
|
|
|
polyLineDTO.setOppositionIncrement(voteRedisFormDTO.getOppositionAmount()); |
|
|
|
polyLineDTOS.add(polyLineDTO); |
|
|
|
} |
|
|
|
//从古至今一直在表决中
|
|
|
|
IssueEntity issueEntity = issueDao.selectById(issueId.getIssueId()); |
|
|
|
if (issueEntity.getIssueStatus().equals(IssueConstant.ISSUE_VOTING)){ |
|
|
|
Integer yesterdaySupport = NumConstant.ZERO; |
|
|
|
Integer yesterdayOppose = NumConstant.ZERO; |
|
|
|
for (PolyLineDTO lineDTO : polyLineDTOS) { |
|
|
|
yesterdaySupport += lineDTO.getSupportIncrement(); |
|
|
|
yesterdayOppose += lineDTO.getOppositionIncrement(); |
|
|
|
} |
|
|
|
polyLineDTO.setSupportIncrement(voteRedisFormDTO.getSupportAmount() == NumConstant.ZERO ? NumConstant.ZERO : voteRedisFormDTO.getSupportAmount() - yesterdaySupport); |
|
|
|
polyLineDTO.setOppositionIncrement(voteRedisFormDTO.getOppositionAmount() == NumConstant.ZERO ? NumConstant.ZERO : voteRedisFormDTO.getOppositionAmount() - yesterdayOppose); |
|
|
|
polyLineDTO.setSupportIncrement(voteRedisFormDTO.getSupportAmount()); |
|
|
|
polyLineDTO.setOppositionIncrement(voteRedisFormDTO.getOppositionAmount()); |
|
|
|
polyLineDTOS.add(polyLineDTO); |
|
|
|
} |
|
|
|
} |
|
|
|