Browse Source

Merge remote-tracking branch 'origin/dev_issue_project' into dev_issue_project

dev_shibei_match
yinzuomei 5 years ago
parent
commit
7a57d7b018
  1. 5
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java
  2. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java
  3. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueSatisfactionDetailServiceImpl.java
  4. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteDetailServiceImpl.java
  5. 7
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml
  6. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionDetailServiceImpl.java
  7. 12
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/controller/IssueController.java
  8. 4
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java
  9. 6
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/GovIssueFeignClient.java
  10. 2
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java
  11. 2
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/GovProjectFeignClient.java
  12. 2
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/ResiGroupFeignClient.java
  13. 4
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/fallback/GovIssueFeignClientFallBack.java
  14. 26
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  15. 46
      epmet-module/resi-hall/resi-hall-server/src/main/resources/mapper/IssueDao.xml

5
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java

@ -1,7 +1,5 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.RequirePermission;
import com.epmet.commons.tools.enums.RequirePermissionEnum;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.IssueDetailFormDTO;
import com.epmet.dto.result.GridVotingIssueCountResultDTO;
@ -33,8 +31,7 @@ public class IssueController {
* @author zxc
* @date 2020/5/11 9:42
*/
@PostMapping(value = "/detail")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
@PostMapping(value = "detail")
public Result<IssueResultDTO> detail(@RequestBody IssueDetailFormDTO issueDetail){
return new Result<IssueResultDTO>().ok(issueService.detail(issueDetail));
}

2
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java

@ -67,6 +67,7 @@ public class IssueManageController {
* @author zxc
*/
@PostMapping("votingtrend")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<VotingTrendResultDTO> votingTrend(@RequestBody IssueIdFormDTO issueId){
return new Result<VotingTrendResultDTO>().ok(issueVoteStatisticalService.votingTrend(issueId));
}
@ -77,6 +78,7 @@ public class IssueManageController {
* @author zxc
*/
@PostMapping("evaluationlist")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<List<EvaluationListResultDTO>> evaluationList(@RequestBody EvaluationListFormDTO formDTO){
return new Result<List<EvaluationListResultDTO>>().ok(issueVoteStatisticalService.evaluationList(formDTO));
}

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

@ -147,7 +147,7 @@ public class IssueSatisfactionDetailServiceImpl extends BaseServiceImpl<IssueSat
BeanUtils.copyProperties(formDTO,initEvaluation);
EvaluateInfoDTO evaluateInfoDTO = baseDao.checkSatisfaction(initEvaluation);
if (evaluateInfoDTO!=null){
throw new RenException(EpmetErrorCode.ALREADY_EVALUATE.getMsg());
throw new RenException(EpmetErrorCode.ALREADY_EVALUATE.getCode());
}
baseDao.insert(entity);
}

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

@ -119,7 +119,7 @@ public class IssueVoteDetailServiceImpl extends BaseServiceImpl<IssueVoteDetailD
if (checkoutVoteCount==0){
baseDao.insert(entity);
}else {
throw new RenException(EpmetErrorCode.ALREADY_VOTE.getMsg());
throw new RenException(EpmetErrorCode.ALREADY_VOTE.getCode());
}
}

7
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml

@ -31,15 +31,16 @@
<!-- 议题详情 -->
<select id="issueDetail" parameterType="com.epmet.dto.form.IssueDetailFormDTO" resultType="com.epmet.dto.result.IssueResultDTO">
SELECT
source_id AS topicId,
issue_title AS issueTitle,
issue_status AS issueStatus,
suggestion AS issueSuggestion,
grid_id AS belongsGridName,
created_by AS issueInitiator
grid_id AS gridId,
created_by AS userId
FROM
issue
WHERE
id = #{IssueId}
id = #{issueId}
AND del_flag = 0
</select>

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionDetailServiceImpl.java

@ -185,7 +185,7 @@ public class ProjectSatisfactionDetailServiceImpl extends BaseServiceImpl<Projec
BeanUtils.copyProperties(formDTO,projectInitEvaluation);
ProjectEvaluateInfoResultDTO resultDTO = baseDao.checkProjectSatisfaction(projectInitEvaluation);
if (resultDTO!=null){
throw new RenException(EpmetErrorCode.ALREADY_EVALUATE.getMsg());
throw new RenException(EpmetErrorCode.ALREADY_EVALUATE.getCode());
}
baseDao.insert(entity);
}

12
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/controller/IssueController.java

@ -35,7 +35,7 @@ public class IssueController {
* @date 2020/5/11 9:42
*/
@PostMapping(value = "/detail")
// @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<IssueDetailResultDTO> detail(@RequestBody IssueDetailFormDTO issueDetail){
return new Result<IssueDetailResultDTO>().ok(issueService.detail(issueDetail));
}
@ -46,6 +46,7 @@ public class IssueController {
* @author zxc
*/
@PostMapping(value = "votingtrend")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<VotingTrendResultDTO> votingTrend(@RequestBody IssueIdFormDTO formDTO){
return new Result<VotingTrendResultDTO>().ok(issueService.votingTrend(formDTO));
}
@ -56,6 +57,7 @@ public class IssueController {
* @author zxc
*/
@PostMapping(value = "support")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result support(@LoginUser TokenDto tokenDto, @RequestBody IssueIdFormDTO formDTO){
issueService.support(tokenDto,formDTO);
return new Result();
@ -67,6 +69,7 @@ public class IssueController {
* @author zxc
*/
@PostMapping(value = "oppose")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result oppose(@LoginUser TokenDto tokenDto,@RequestBody IssueIdFormDTO formDTO){
issueService.oppose(tokenDto,formDTO);
return new Result();
@ -78,6 +81,7 @@ public class IssueController {
* @author zxc
*/
@PostMapping(value = "vote")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<VoteResultDTO> vote(@RequestBody IssueIdFormDTO formDTO){
return new Result<VoteResultDTO>().ok(issueService.vote(formDTO));
}
@ -89,6 +93,7 @@ public class IssueController {
* @author zxc
*/
@PostMapping("initevaluation")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<InitEvaluationResultDTO> initEvaluation(@LoginUser TokenDto tokenDto, @RequestBody IssueIdFormDTO issueId){
return new Result<InitEvaluationResultDTO>().ok(issueService.initEvaluation(tokenDto,issueId));
}
@ -100,6 +105,7 @@ public class IssueController {
* @author zxc
*/
@PostMapping("projectinitevaluation")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<ProjectInitEvaluationResultDTO> projectInitEvaluation(@LoginUser TokenDto tokenDto, @RequestBody ProjectIdFormDTO projectId){
return new Result<ProjectInitEvaluationResultDTO>().ok(issueService.projectInitEvaluation(tokenDto,projectId));
}
@ -110,6 +116,7 @@ public class IssueController {
* @author zxc
*/
@PostMapping("evaluate")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result evaluate(@LoginUser TokenDto tokenDto,@RequestBody EvaluateFormDTO formDTO){
issueService.evaluate(tokenDto,formDTO);
return new Result();
@ -121,6 +128,7 @@ public class IssueController {
* @author zxc
*/
@PostMapping("projectevaluate")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result projectEvaluate(@LoginUser TokenDto tokenDto,@RequestBody ProjectEvaluateFormDTO formDTO){
issueService.projectEvaluate(tokenDto,formDTO);
return new Result();
@ -132,6 +140,7 @@ public class IssueController {
* @author zxc
*/
@PostMapping("evaluationlist")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<List<EvaluationListResultDTO>> evaluationList(@RequestBody EvaluationListFormDTO formDTO){
return new Result<List<EvaluationListResultDTO>>().ok(issueService.evaluationList(formDTO));
}
@ -142,6 +151,7 @@ public class IssueController {
* @author zxc
*/
@PostMapping("projectevaluationlist")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<List<EvaluationListResultDTO>> projectEvaluationList(@RequestBody ProjectEvaluationListFormDTO formDTO){
return new Result<List<EvaluationListResultDTO>>().ok(issueService.projectEvaluationList(formDTO));
}

4
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java

@ -18,8 +18,8 @@ import java.util.List;
* @dscription
* @date 2020/5/11 10:32
*/
//url = "localhost:8087"
@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserFeignClientFallBack.class)
@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserFeignClientFallBack.class,url = "localhost:8087")
//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserFeignClientFallBack.class)
public interface EpmetUserFeignClient {
/**

6
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/GovIssueFeignClient.java

@ -15,8 +15,8 @@ import java.util.List;
/**
* @Description Feign调用gov-issue-server模块
* @ClassName GovIssueFeignFallBack
* url = "localhost:8101"
*/
//@FeignClient(name = ServiceConstant.GOV_ISSUE_SERVER, fallback = GovIssueFeignClientFallBack.class,url = "localhost:8101")
@FeignClient(name = ServiceConstant.GOV_ISSUE_SERVER, fallback = GovIssueFeignClientFallBack.class)
public interface GovIssueFeignClient {
@ -25,8 +25,8 @@ public interface GovIssueFeignClient {
* @param issueDetail
* @author zxc
*/
@PostMapping("/gov/issue/issue/issuedetail")
Result<IssueResultDTO> issueDetail(@RequestBody IssueDetailFormDTO issueDetail);
@PostMapping("/gov/issue/issue/detail")
Result<IssueResultDTO> detail(@RequestBody IssueDetailFormDTO issueDetail);
/**
* @Description 表决中议题详情支持反对数

2
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java

@ -13,8 +13,8 @@ import org.springframework.web.bind.annotation.RequestBody;
/**
* @Description Feign调用gov-org-server模块
* @ClassName GovOrgFeginFallBack
* url = "localhost:8092"
*/
//@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgFeignClientFallBack.class,url = "localhost:8092")
@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgFeignClientFallBack.class)
public interface GovOrgFeignClient {

2
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/GovProjectFeignClient.java

@ -18,8 +18,8 @@ import java.util.List;
/**
* @Description Feign调用gov-project-server模块
* @ClassName GovProjectFeignClient
* url = "localhost:8102"
*/
//@FeignClient(name = ServiceConstant.GOV_PROJECT_SERVER, fallback = GovProjectFeignClientFallBack.class,url = "localhost:8102")
@FeignClient(name = ServiceConstant.GOV_PROJECT_SERVER, fallback = GovProjectFeignClientFallBack.class)
public interface GovProjectFeignClient {

2
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/ResiGroupFeignClient.java

@ -10,8 +10,8 @@ import org.springframework.web.bind.annotation.PostMapping;
/**
* @author zxc
* url = "localhost:8095"
*/
//@FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupFeignClientFallBack.class,url = "localhost:8095")
@FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupFeignClientFallBack.class)
public interface ResiGroupFeignClient {

4
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/fallback/GovIssueFeignClientFallBack.java

@ -19,8 +19,8 @@ import java.util.List;
public class GovIssueFeignClientFallBack implements GovIssueFeignClient {
@Override
public Result<IssueResultDTO> issueDetail(IssueDetailFormDTO issueDetail) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "issueDetail", issueDetail);
public Result<IssueResultDTO> detail(IssueDetailFormDTO issueDetail) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "detail", issueDetail);
}
@Override

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

@ -48,7 +48,7 @@ public class IssueServiceImpl implements IssueService {
public IssueDetailResultDTO detail(IssueDetailFormDTO issueDetail) {
IssueDetailResultDTO issueDetailResult = new IssueDetailResultDTO();
//议题信息
Result<IssueResultDTO> issueResultDTOResult = govIssueFeignClient.issueDetail(issueDetail);
Result<IssueResultDTO> issueResultDTOResult = govIssueFeignClient.detail(issueDetail);
IssueResultDTO issueResult = issueResultDTOResult.getData();
if (issueResult==null){
return issueDetailResult;
@ -58,22 +58,34 @@ public class IssueServiceImpl implements IssueService {
IssueInitiatorFormDTO initiatorFormDTO = new IssueInitiatorFormDTO();
initiatorFormDTO.setUserId(issueResult.getUserId());
if (!StringUtils.isBlank(issueResult.getUserId())) {
Result<IssueInitiatorResultDTO> initiatorResult = userFeignClient.selectIssueInitiator(initiatorFormDTO);
issueDetailResult.setIssueInitiator(initiatorResult.getData().getIssueInitiator());
IssueInitiatorResultDTO initiatorResult = userFeignClient.selectIssueInitiator(initiatorFormDTO).getData();
if (initiatorResult==null){
issueDetailResult.setIssueInitiator("");
}else {
issueDetailResult.setIssueInitiator(initiatorResult.getIssueInitiator());
}
}
//网格名称
BelongGridNameFormDTO belongGridName = new BelongGridNameFormDTO();
belongGridName.setGridId(issueResult.getGridId());
if (!StringUtils.isBlank(issueResult.getGridId())) {
Result<BelongGridNameResultDTO> belongGridNameResult = govOrgFeignClient.getGridNameByGridId(belongGridName);
issueDetailResult.setBelongsGridName(belongGridNameResult.getData().getBelongsGridName());
BelongGridNameResultDTO belongGridNameResult = govOrgFeignClient.getGridNameByGridId(belongGridName).getData();
if (belongGridNameResult==null){
issueDetailResult.setBelongsGridName("");
}else {
issueDetailResult.setBelongsGridName(belongGridNameResult.getBelongsGridName());
}
}
//话题信息
TopicInfoFormDTO topicInfoFormDTO = new TopicInfoFormDTO();
topicInfoFormDTO.setTopicId(issueResult.getTopicId());
if (!StringUtils.isBlank(issueResult.getTopicId())) {
Result<TopicInfoDTO> topicInfoDTOResult = resiGroupFeignClient.selectDetail(topicInfoFormDTO);
issueDetailResult.setTopicInfo(topicInfoDTOResult.getData());
TopicInfoDTO topicInfoDTOResult = resiGroupFeignClient.selectDetail(topicInfoFormDTO).getData();
if (topicInfoDTOResult==null){
issueDetailResult.setTopicInfo(new TopicInfoDTO());
}else {
issueDetailResult.setTopicInfo(topicInfoDTOResult);
}
}
return issueDetailResult;
}

46
epmet-module/resi-hall/resi-hall-server/src/main/resources/mapper/IssueDao.xml

@ -1,46 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.IssueDao">
<resultMap type="com.epmet.entity.IssueEntity" id="issueMap">
<result property="id" column="ID"/>
<result property="issueStatus" column="ISSUE_STATUS"/>
<result property="sourceType" column="SOURCE_TYPE"/>
<result property="sourceId" column="SOURCE_ID"/>
<result property="closeReason" column="CLOSE_REASON"/>
<result property="resolveType" column="RESOLVE_TYPE"/>
<result property="issueTitle" column="ISSUE_TITLE"/>
<result property="suggestion" column="SUGGESTION"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="gridId" column="GRID_ID"/>
<result property="orgIdPath" column="ORG_ID_PATH"/>
<result property="orgId" column="ORG_ID"/>
<result property="votingDeadline" column="VOTING_DEADLINE"/>
<result property="decidedTime" column="DECIDED_TIME"/>
<result property="shiftedTime" column="SHIFTED_TIME"/>
<result property="closedTime" column="CLOSED_TIME"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<!-- 议题详情 -->
<select id="issueDetail" parameterType="com.epmet.dto.form.IssueDetailFormDTO" resultType="com.epmet.dto.result.IssueDetailResultDTO">
SELECT
issue_title AS issueTitle,
issue_status AS issueStatus,
suggestion AS issueSuggestion,
grid_id AS belongsGridName,
created_by AS issueInitiator
FROM
issue
WHERE
id = #{IssueId}
AND del_flag = 0
</select>
</mapper>
Loading…
Cancel
Save