Browse Source

议题详情修改

dev_shibei_match
zxc 5 years ago
parent
commit
53f71e2d45
  1. 4
      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/service/impl/IssueSatisfactionDetailServiceImpl.java
  3. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteDetailServiceImpl.java
  4. 7
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml
  5. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionDetailServiceImpl.java
  6. 4
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/GovIssueFeignClient.java
  7. 4
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/fallback/GovIssueFeignClientFallBack.java
  8. 26
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  9. 46
      epmet-module/resi-hall/resi-hall-server/src/main/resources/mapper/IssueDao.xml

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

@ -33,8 +33,8 @@ public class IssueController {
* @author zxc
* @date 2020/5/11 9:42
*/
@PostMapping(value = "/detail")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
@PostMapping(value = "detail")
// @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_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/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);
}

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

@ -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 表决中议题详情支持反对数

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