Browse Source

Merge branches 'dev' and 'dev_issue_project' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_issue_project

dev_shibei_match
yinzuomei 5 years ago
parent
commit
cc8edb20d8
  1. 10
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/IssueConstant.java
  2. 6
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProcessServiceImpl.java
  3. 5
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueSatisfactionDetailServiceImpl.java
  4. 6
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java
  5. 15
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/constat/HallConstat.java
  6. 22
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

10
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/IssueConstant.java

@ -82,4 +82,14 @@ public interface IssueConstant {
* 议题表决缓存属性值 shouldVoteCount * 议题表决缓存属性值 shouldVoteCount
* */ * */
String CACHE_ATTRIBUTE_SHOULD_VOTE_COUNT = "shouldVoteCount"; String CACHE_ATTRIBUTE_SHOULD_VOTE_COUNT = "shouldVoteCount";
/**
* 空字符串
*/
String NULL_CHARACTER_STRING = "";
/**
* 北京时区北京时间
*/
String BEIJING_TIME_ZONE = "+8";
} }

6
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProcessServiceImpl.java

@ -32,9 +32,7 @@ import com.epmet.dto.form.IssueIdFormDTO;
import com.epmet.dto.form.ProcessProjectIdFormDTO; import com.epmet.dto.form.ProcessProjectIdFormDTO;
import com.epmet.dto.result.ProcessListResultDTO; import com.epmet.dto.result.ProcessListResultDTO;
import com.epmet.entity.IssueProcessEntity; import com.epmet.entity.IssueProcessEntity;
import com.epmet.feign.GovOrgFeignClient;
import com.epmet.feign.GovProjectFeignClient; import com.epmet.feign.GovProjectFeignClient;
import com.epmet.redis.IssueProcessRedis;
import com.epmet.service.IssueProcessService; import com.epmet.service.IssueProcessService;
import com.epmet.service.IssueService; import com.epmet.service.IssueService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -56,13 +54,9 @@ import java.util.Map;
@Service @Service
public class IssueProcessServiceImpl extends BaseServiceImpl<IssueProcessDao, IssueProcessEntity> implements IssueProcessService { public class IssueProcessServiceImpl extends BaseServiceImpl<IssueProcessDao, IssueProcessEntity> implements IssueProcessService {
@Autowired
private IssueProcessRedis issueProcessRedis;
@Autowired @Autowired
private IssueService issueService; private IssueService issueService;
@Autowired @Autowired
private GovOrgFeignClient govOrgFeignClient;
@Autowired
private GovProjectFeignClient govProjectFeignClient; private GovProjectFeignClient govProjectFeignClient;
@Autowired @Autowired
private IssueProjectRelationDao issueProjectRelationDao; private IssueProjectRelationDao issueProjectRelationDao;

5
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueSatisfactionDetailServiceImpl.java

@ -26,6 +26,7 @@ import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.constant.IssueConstant;
import com.epmet.dao.IssueSatisfactionDetailDao; import com.epmet.dao.IssueSatisfactionDetailDao;
import com.epmet.dto.EvaluateInfoDTO; import com.epmet.dto.EvaluateInfoDTO;
import com.epmet.dto.IssueSatisfactionDetailDTO; import com.epmet.dto.IssueSatisfactionDetailDTO;
@ -126,8 +127,8 @@ public class IssueSatisfactionDetailServiceImpl extends BaseServiceImpl<IssueSat
}else { }else {
resultDTO.setStatus(false); resultDTO.setStatus(false);
EvaluateInfoDTO evaluateInfo = new EvaluateInfoDTO(); EvaluateInfoDTO evaluateInfo = new EvaluateInfoDTO();
evaluateInfo.setEvaluateContent(""); evaluateInfo.setEvaluateContent(IssueConstant.NULL_CHARACTER_STRING);
evaluateInfo.setSatisfaction(""); evaluateInfo.setSatisfaction(IssueConstant.NULL_CHARACTER_STRING);
resultDTO.setEvaluateInfo(evaluateInfo); resultDTO.setEvaluateInfo(evaluateInfo);
} }
return resultDTO; return resultDTO;

6
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java

@ -176,7 +176,7 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
//DB获取表决 日统计详情 //DB获取表决 日统计详情
List<PolyLineDTO> polyLineDTOS = issueVoteStatisticalDao.polyLineData(issueId); List<PolyLineDTO> polyLineDTOS = issueVoteStatisticalDao.polyLineData(issueId);
PolyLineDTO polyLineDTO = new PolyLineDTO(); PolyLineDTO polyLineDTO = new PolyLineDTO();
polyLineDTO.setVoteDate(LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8"))); polyLineDTO.setVoteDate(LocalDateTime.now().toEpochSecond(ZoneOffset.of(IssueConstant.BEIJING_TIME_ZONE)));
//议题 已转项目 或 已结案 的时间 //议题 已转项目 或 已结案 的时间
String date = issueDao.operateTime(issueId.getIssueId()); String date = issueDao.operateTime(issueId.getIssueId());
//今天刚转项目或刚刚关闭,当天数据DB没有,直接从缓存拿 //今天刚转项目或刚刚关闭,当天数据DB没有,直接从缓存拿
@ -187,8 +187,8 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
} else { } else {
//折线数据=DB,今天之前转成的议题,今天 “已转项目”或“已结案” //折线数据=DB,今天之前转成的议题,今天 “已转项目”或“已结案”
if (date.equals(LocalDate.now().toString())) { if (date.equals(LocalDate.now().toString())) {
Integer yesterdaySupport = 0; Integer yesterdaySupport = NumConstant.ZERO;
Integer yesterdayOppose = 0; Integer yesterdayOppose = NumConstant.ZERO;
for (PolyLineDTO lineDTO : polyLineDTOS) { for (PolyLineDTO lineDTO : polyLineDTOS) {
yesterdaySupport += lineDTO.getSupportIncrement(); yesterdaySupport += lineDTO.getSupportIncrement();
yesterdayOppose += lineDTO.getOppositionIncrement(); yesterdayOppose += lineDTO.getOppositionIncrement();

15
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/constat/HallConstat.java

@ -26,4 +26,19 @@ public interface HallConstat {
*/ */
String CLOSED = "closed"; String CLOSED = "closed";
/**
* 空字符串
*/
String NULL_CHARACTER_STRING = "";
/**
* 反对投票
*/
String OPPOSITION = "opposition";
/**
* 支持投票
*/
String SUPPORT = "support";
} }

22
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -60,33 +60,21 @@ public class IssueServiceImpl implements IssueService {
initiatorFormDTO.setUserId(issueResult.getUserId()); initiatorFormDTO.setUserId(issueResult.getUserId());
if (!StringUtils.isBlank(issueResult.getUserId())) { if (!StringUtils.isBlank(issueResult.getUserId())) {
IssueInitiatorResultDTO initiatorResult = userFeignClient.selectIssueInitiator(initiatorFormDTO).getData(); IssueInitiatorResultDTO initiatorResult = userFeignClient.selectIssueInitiator(initiatorFormDTO).getData();
if (initiatorResult == null) { issueDetailResult.setIssueInitiator(initiatorResult == null ? HallConstat.NULL_CHARACTER_STRING : initiatorResult.getIssueInitiator());
issueDetailResult.setIssueInitiator("");
} else {
issueDetailResult.setIssueInitiator(initiatorResult.getIssueInitiator());
}
} }
//网格名称 //网格名称
BelongGridNameFormDTO belongGridName = new BelongGridNameFormDTO(); BelongGridNameFormDTO belongGridName = new BelongGridNameFormDTO();
belongGridName.setGridId(issueResult.getGridId()); belongGridName.setGridId(issueResult.getGridId());
if (!StringUtils.isBlank(issueResult.getGridId())) { if (!StringUtils.isBlank(issueResult.getGridId())) {
BelongGridNameResultDTO belongGridNameResult = govOrgFeignClient.getGridNameByGridId(belongGridName).getData(); BelongGridNameResultDTO belongGridNameResult = govOrgFeignClient.getGridNameByGridId(belongGridName).getData();
if (belongGridNameResult == null) { issueDetailResult.setBelongsGridName(belongGridNameResult == null ? HallConstat.NULL_CHARACTER_STRING : belongGridNameResult.getBelongsGridName());
issueDetailResult.setBelongsGridName("");
} else {
issueDetailResult.setBelongsGridName(belongGridNameResult.getBelongsGridName());
}
} }
//话题信息 //话题信息
TopicInfoFormDTO topicInfoFormDTO = new TopicInfoFormDTO(); TopicInfoFormDTO topicInfoFormDTO = new TopicInfoFormDTO();
topicInfoFormDTO.setTopicId(issueResult.getTopicId()); topicInfoFormDTO.setTopicId(issueResult.getTopicId());
if (!StringUtils.isBlank(issueResult.getTopicId())) { if (!StringUtils.isBlank(issueResult.getTopicId())) {
TopicInfoDTO topicInfoDTOResult = resiGroupFeignClient.selectDetail(topicInfoFormDTO).getData(); TopicInfoDTO topicInfoDTOResult = resiGroupFeignClient.selectDetail(topicInfoFormDTO).getData();
if (topicInfoDTOResult == null) { issueDetailResult.setTopicInfo(topicInfoDTOResult == null ? new TopicInfoDTO() : topicInfoDTOResult);
issueDetailResult.setTopicInfo(new TopicInfoDTO());
} else {
issueDetailResult.setTopicInfo(topicInfoDTOResult);
}
} }
//判断是否投票 //判断是否投票
CheckVoteFormDTO formDTO = new CheckVoteFormDTO(); CheckVoteFormDTO formDTO = new CheckVoteFormDTO();
@ -131,7 +119,7 @@ public class IssueServiceImpl implements IssueService {
@Override @Override
public void support(TokenDto tokenDto, IssueIdFormDTO issueId) { public void support(TokenDto tokenDto, IssueIdFormDTO issueId) {
VoteFormDTO voteFormDTO = new VoteFormDTO(); VoteFormDTO voteFormDTO = new VoteFormDTO();
voteFormDTO.setAttitude("support"); voteFormDTO.setAttitude(HallConstat.SUPPORT);
voteFormDTO.setCreatedBy(tokenDto.getUserId()); voteFormDTO.setCreatedBy(tokenDto.getUserId());
voteFormDTO.setIssueId(issueId.getIssueId()); voteFormDTO.setIssueId(issueId.getIssueId());
govIssueFeignClient.vote(voteFormDTO); govIssueFeignClient.vote(voteFormDTO);
@ -145,7 +133,7 @@ public class IssueServiceImpl implements IssueService {
@Override @Override
public void oppose(TokenDto tokenDto, IssueIdFormDTO issueId) { public void oppose(TokenDto tokenDto, IssueIdFormDTO issueId) {
VoteFormDTO voteFormDTO = new VoteFormDTO(); VoteFormDTO voteFormDTO = new VoteFormDTO();
voteFormDTO.setAttitude("opposition"); voteFormDTO.setAttitude(HallConstat.OPPOSITION);
voteFormDTO.setCreatedBy(tokenDto.getUserId()); voteFormDTO.setCreatedBy(tokenDto.getUserId());
voteFormDTO.setIssueId(issueId.getIssueId()); voteFormDTO.setIssueId(issueId.getIssueId());
govIssueFeignClient.vote(voteFormDTO); govIssueFeignClient.vote(voteFormDTO);

Loading…
Cancel
Save