Browse Source

龙湾:项目详情;难点赌点主图两个接口修改

dev_shibei_match
yinzuomei 5 years ago
parent
commit
8176c3542f
  1. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java
  2. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java
  3. 4
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueResultDTO.java
  4. 3
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  5. 6
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  6. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java
  7. 9
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  8. 17
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java
  9. 10
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java
  10. 10
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java
  11. 17
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java
  12. 7
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java
  13. 8
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java
  14. 25
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  15. 22
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml

6
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java

@ -2,6 +2,7 @@ package com.epmet.datareport.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.evaluationindex.screen.*;
@ -87,6 +88,11 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
}
PageHelper.startPage(NumConstant.ONE,param.getTopNum());
List<DifficultProjectResultDTO> result = screenDifficultyDataDao.selectDifficulty(param.getAgencyId(),param.getType());
for(DifficultProjectResultDTO resultDTO:result){
if(!resultDTO.getImgUrl().contains("http")){
resultDTO.setImgUrl(StrConstant.EPMETY_STR);
}
}
if(null == result) return new ArrayList<>();
return result;
}

6
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java

@ -205,16 +205,16 @@ public class ProjectServiceImpl implements ProjectService {
}*/
ProjectDetailResultDTO projectDetailResultDTO=new ProjectDetailResultDTO();
//todo
/*Result<ProjectInfoDTO> result=govProjectOpenFeignClient.queryProjectInfoByProjectId(processListFormDTO.getProjectId());
Result<ProjectInfoDTO> result=govProjectOpenFeignClient.queryProjectInfoByProjectId(processListFormDTO.getProjectId());
if(result.success()&&null!=result.getData()){
ProjectInfoDTO projectInfoDTO=result.getData();
projectDetailResultDTO.setImgUrlList(projectInfoDTO.getImgUrlList());
projectDetailResultDTO.setEventSource(projectInfoDTO.getFromGridName());
projectDetailResultDTO.setEventSource(projectInfoDTO.getGridName());
projectDetailResultDTO.setEventTitle(projectInfoDTO.getEventTitle());
projectDetailResultDTO.setEventContent(projectInfoDTO.getEventContent());
}else{
log.warn(String.format("项目信息查询失败,projectId:%s",processListFormDTO.getProjectId()));
}*/
}
Result<ProcessAndCurrentDeptResultDTO> processList = govProjectOpenFeignClient.getProcessList(processListFormDTO);
if (!processList.success()) {
throw new RenException(ProjectConstant.PROCESS_FAILURE);

4
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueResultDTO.java

@ -44,5 +44,9 @@ public class IssueResultDTO implements Serializable {
*/
private String topicId;
/**
* 上级-网格名 20210224add
*/
private String gridName;
}

3
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java

@ -241,4 +241,7 @@ public interface GovIssueOpenFeignClient {
*/
@PostMapping("/gov/issue/issuesharelink/sharelinkinfo")
Result<IssueShareLinkRecordDTO> shareLinkInfo(@RequestParam String shareLinkId);
@PostMapping("/gov/issue/issue/detail")
Result<IssueResultDTO> queryIssueDetail(@RequestBody IssueDetailFormDTO formDTO);
}

6
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java

@ -18,7 +18,6 @@ import com.epmet.resi.group.dto.group.result.*;
import com.epmet.resi.mine.dto.from.MyShiftIssueTopicsFormDTO;
import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;
@ -207,4 +206,9 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient
public Result<IssueShareLinkRecordDTO> shareLinkInfo(String shareLinkId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "shareLinkInfo", shareLinkId);
}
@Override
public Result<IssueResultDTO> queryIssueDetail(IssueDetailFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "detail", formDTO);
}
}

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

@ -34,7 +34,7 @@ public class IssueController {
/**
* @Description 议题详情
* @param issueDetail
* @author zxc
* @author zxc 这个接口内部feign也调用不要加权限注解
* @date 2020/5/11 9:42
*/
@PostMapping(value = "detail")

9
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -181,6 +181,15 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
public IssueResultDTO detail(IssueDetailFormDTO issueDetail) {
//议题信息
IssueResultDTO issueResult = issueDao.issueDetail(issueDetail);
if (null != issueResult && StringUtils.isNotBlank(issueResult.getGridId())) {
BelongGridNameFormDTO formDTO = new BelongGridNameFormDTO();
formDTO.setGridId(issueResult.getGridId());
Result<BelongGridNameResultDTO> result = govOrgOpenFeignClient.getGridNameByGridId(formDTO);
logger.info("根据网格id查询网格名称接口返参:" + JSON.toJSONString(result));
if (result.success() && null != result.getData()) {
issueResult.setGridName(result.getData().getBelongsGridName());
}
}
return issueResult;
}

17
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java

@ -13,13 +13,7 @@ import java.util.List;
@Data
public class ProjectInfoDTO {
// 【事件 = 项目】
/**
* 事件图片集合
*/
private List<String> imgUrlList;
private String fromGridName;
private String projectId;
/**
* 项目标题
@ -30,4 +24,13 @@ public class ProjectInfoDTO {
* 项目内容
*/
private String eventContent;
private String issueId;
private String gridName;
private String gridId;
/**
* 项目附件图片集合
*/
private List<String> imgUrlList;
}

10
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java

@ -6,13 +6,12 @@ import com.epmet.dto.ProjectDTO;
import com.epmet.dto.form.ProcessListFormDTO;
import com.epmet.dto.form.ProjectByCreateTopicUserFormDTO;
import com.epmet.dto.form.ProjectListFromDTO;
import com.epmet.dto.result.MyPartProjectsResultDTO;
import com.epmet.dto.result.PendProjectListResultDTO;
import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO;
import com.epmet.dto.result.ProjectOfCreateTopicUserResultDTO;
import com.epmet.dto.result.*;
import com.epmet.feign.fallback.GovProjectOpenFeignClientFallback;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -75,4 +74,7 @@ public interface GovProjectOpenFeignClient {
*/
@PostMapping("gov/project/project/list-by-createtopic-userid")
Result<List<ProjectOfCreateTopicUserResultDTO>> listProjectsByCreateTopicUserId(@RequestBody ProjectByCreateTopicUserFormDTO form);
@GetMapping("gov/project/project/queryprojectinfobyprojectid/{projectId}")
Result<ProjectInfoDTO> queryProjectInfoByProjectId(@PathVariable("projectId")String projectId);
}

10
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java

@ -7,10 +7,7 @@ import com.epmet.dto.ProjectDTO;
import com.epmet.dto.form.ProcessListFormDTO;
import com.epmet.dto.form.ProjectByCreateTopicUserFormDTO;
import com.epmet.dto.form.ProjectListFromDTO;
import com.epmet.dto.result.MyPartProjectsResultDTO;
import com.epmet.dto.result.PendProjectListResultDTO;
import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO;
import com.epmet.dto.result.ProjectOfCreateTopicUserResultDTO;
import com.epmet.dto.result.*;
import com.epmet.feign.GovProjectOpenFeignClient;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import org.springframework.stereotype.Component;
@ -69,4 +66,9 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli
public Result<List<ProjectOfCreateTopicUserResultDTO>> listProjectsByCreateTopicUserId(ProjectByCreateTopicUserFormDTO form) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "listProjectsByCreateTopicUserId", form);
}
@Override
public Result<ProjectInfoDTO> queryProjectInfoByProjectId(String projectId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "queryProjectInfoByProjectId", projectId);
}
}

17
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java

@ -17,9 +17,7 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
@ -33,6 +31,7 @@ import com.epmet.dto.result.*;
import com.epmet.excel.ProjectExcel;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import com.epmet.service.ProjectService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -204,4 +203,18 @@ public class ProjectController {
List<ProjectOfCreateTopicUserResultDTO> projects = projectService.listProjectsByCreateTopicUserId(form.getUserId(), form.getCustomerId(), form.getPageNo(), form.getPageSize());
return new Result().ok(projects);
}
/**
* @param projectId
* @author yinzuomei
* @description 查询项目信息龙湾临时调用
* @Date 2021/2/24 17:04
**/
@GetMapping("queryprojectinfobyprojectid/{projectId}")
public Result<ProjectInfoDTO> queryProjectInfoByProjectId(@PathVariable("projectId")String projectId){
if(StringUtils.isNotBlank(projectId)){
return new Result<ProjectInfoDTO>().ok(projectService.queryProjectInfoByProjectId(projectId));
}
return new Result<>();
}
}

7
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java

@ -23,10 +23,7 @@ import com.epmet.dto.ProjectStaffDTO;
import com.epmet.dto.form.LatestListFormDTO;
import com.epmet.dto.form.ProjectListFromDTO;
import com.epmet.dto.form.ShiftProjectsFromDTO;
import com.epmet.dto.result.LatestListResultDTO;
import com.epmet.dto.result.MyPartProjectsResultDTO;
import com.epmet.dto.result.ProjectDetailResultDTO;
import com.epmet.dto.result.ProjectOfCreateTopicUserResultDTO;
import com.epmet.dto.result.*;
import com.epmet.entity.ProjectEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -148,4 +145,6 @@ public interface ProjectDao extends BaseDao<ProjectEntity> {
*/
List<ProjectOfCreateTopicUserResultDTO> listProjectsByCreateTopicUserId(@Param("userId") String userId,
@Param("customerId") String customerId);
ProjectInfoDTO queryProjectInfoByProjectId(String projectId);
}

8
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java

@ -268,4 +268,12 @@ public interface ProjectService extends BaseService<ProjectEntity> {
* @author sun
*/
void responseV2(ProjectResponseFormDTO formDTO);
/**
* @param projectId
* @author yinzuomei
* @description 查询项目信息龙湾临时调用
* @Date 2021/2/24 17:07
**/
ProjectInfoDTO queryProjectInfoByProjectId(String projectId);
}

25
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -105,6 +105,8 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
private ProjectOrgRelationDao relationDao;
@Autowired
private ProjectProcessAttachmentService projectProcessAttachmentService;
@Autowired
private GovIssueOpenFeignClient govIssueOpenFeignClient;
private final static String ONE_DAY = "<1";
@ -1917,4 +1919,27 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
}
/**
* @param projectId
* @author yinzuomei
* @description 查询项目信息龙湾临时调用
* @Date 2021/2/24 17:07
**/
@Override
public ProjectInfoDTO queryProjectInfoByProjectId(String projectId) {
ProjectInfoDTO projectInfoDTO=baseDao.queryProjectInfoByProjectId(projectId);
if(StringUtils.isNotBlank(projectInfoDTO.getIssueId())){
IssueDetailFormDTO formDTO=new IssueDetailFormDTO();
formDTO.setIssueId(projectInfoDTO.getIssueId());
Result<IssueResultDTO> issueDTOResult=govIssueOpenFeignClient.queryIssueDetail(formDTO);
if(issueDTOResult.success()&&null!=issueDTOResult.getData()){
projectInfoDTO.setGridId(issueDTOResult.getData().getGridId());
projectInfoDTO.setGridName(issueDTOResult.getData().getGridName());
}else{
log.warn("查询议题详情失败issueId="+formDTO.getIssueId());
}
}
return projectInfoDTO;
}
}

22
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml

@ -246,4 +246,26 @@
order by p.CREATED_TIME desc
</select>
<resultMap type="com.epmet.dto.result.ProjectInfoDTO" id="ProjectInfoDTOMap">
<result property="projectId" column="ID"/>
<result property="issueId" column="ORIGIN_ID"/>
<result property="eventTitle" column="TITLE"/>
<result property="eventContent" column="TITLE1"/>
<collection property="imgUrlList" ofType="java.lang.String">
<constructor>
<arg column="imgUrl"/>
</constructor>
</collection>
</resultMap>
<select id="queryProjectInfoByProjectId" resultMap="ProjectInfoDTOMap" parameterType="java.lang.String">
select p.id,p.TITLE,p.TITLE as TITLE1,P.ORIGIN_ID,
M.ATTACHMENT_URL AS imgUrl
from project p
LEFT JOIN project_process_attachment M
ON(P.ID=M.PROJECT_ID AND M.DEL_FLAG='0'
AND M.ATTACHMENT_TYPE='image')
where P.DEL_FLAG='0'
AND p.id=#{projectId}
</select>
</mapper>
Loading…
Cancel
Save