diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java index e33e7c9334..fca810d21f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java +++ b/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 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; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java index 9c2336d992..e0742c8a0c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java @@ -27,6 +27,7 @@ import com.epmet.project.dto.form.ProjectIncrTrendFormDTO; import com.epmet.project.dto.result.ProjectDetailResultDTO; import com.epmet.project.dto.result.*; import com.github.pagehelper.PageHelper; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -42,6 +43,7 @@ import java.util.List; * @Author sun * @Description 数据-项目 **/ +@Slf4j @Service public class ProjectServiceImpl implements ProjectService { @@ -197,9 +199,21 @@ public class ProjectServiceImpl implements ProjectService { */ @Override public ProjectDetailResultDTO projectDetail(ProcessListFormDTO processListFormDTO) { - ProjectDetailResultDTO projectDetailResultDTO = screenDifficultyDataService.projectDetail(processListFormDTO); + /*ProjectDetailResultDTO projectDetailResultDTO = screenDifficultyDataService.projectDetail(processListFormDTO); if (null == projectDetailResultDTO) { return new ProjectDetailResultDTO(); + }*/ + ProjectDetailResultDTO projectDetailResultDTO=new ProjectDetailResultDTO(); + //todo + Result result=govProjectOpenFeignClient.queryProjectInfoByProjectId(processListFormDTO.getProjectId()); + if(result.success()&&null!=result.getData()){ + ProjectInfoDTO projectInfoDTO=result.getData(); + projectDetailResultDTO.setImgUrlList(projectInfoDTO.getImgUrlList()); + projectDetailResultDTO.setEventSource(projectInfoDTO.getGridName()); + projectDetailResultDTO.setEventTitle(projectInfoDTO.getEventTitle()); + projectDetailResultDTO.setEventContent(projectInfoDTO.getEventContent()); + }else{ + log.warn(String.format("项目信息查询失败,projectId:%s",processListFormDTO.getProjectId())); } Result processList = govProjectOpenFeignClient.getProcessList(processListFormDTO); if (!processList.success()) { diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueResultDTO.java index b278b9f585..c2dbdb85eb 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueResultDTO.java +++ b/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; } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java index 8f04ff87b0..f5d2786c93 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java +++ b/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 shareLinkInfo(@RequestParam String shareLinkId); + + @PostMapping("/gov/issue/issue/detail") + Result queryIssueDetail(@RequestBody IssueDetailFormDTO formDTO); } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java index 50e37286e5..84b1220993 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java +++ b/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 shareLinkInfo(String shareLinkId) { return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "shareLinkInfo", shareLinkId); } + + @Override + public Result queryIssueDetail(IssueDetailFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "detail", formDTO); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java index 8ccb30aa15..c64573730a 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java +++ b/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") diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 3b724521a5..40fb145f77 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/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 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 result = govOrgOpenFeignClient.getGridNameByGridId(formDTO); + logger.info("根据网格id查询网格名称接口返参:" + JSON.toJSONString(result)); + if (result.success() && null != result.getData()) { + issueResult.setGridName(result.getData().getBelongsGridName()); + } + } return issueResult; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java new file mode 100644 index 0000000000..b427707f58 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java @@ -0,0 +1,36 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.util.List; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/24 16:11 + */ +@Data +public class ProjectInfoDTO { + // 【事件 = 项目】 + private String projectId; + + /** + * 项目标题 + */ + private String eventTitle; + + /** + * 项目内容 + */ + private String eventContent; + + private String issueId; + private String gridName; + private String gridId; + + /** + * 项目附件图片集合 + */ + private List imgUrlList; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java index 2cd5f5f5fb..49b573f0be 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java +++ b/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> listProjectsByCreateTopicUserId(@RequestBody ProjectByCreateTopicUserFormDTO form); + + @GetMapping("gov/project/project/queryprojectinfobyprojectid/{projectId}") + Result queryProjectInfoByProjectId(@PathVariable("projectId")String projectId); } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java index fd478f1245..ca4488be17 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java +++ b/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> listProjectsByCreateTopicUserId(ProjectByCreateTopicUserFormDTO form) { return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "listProjectsByCreateTopicUserId", form); } + + @Override + public Result queryProjectInfoByProjectId(String projectId) { + return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "queryProjectInfoByProjectId", projectId); + } } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index 3c3641dac5..05fe6c04b4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/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 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 queryProjectInfoByProjectId(@PathVariable("projectId")String projectId){ + if(StringUtils.isNotBlank(projectId)){ + return new Result().ok(projectService.queryProjectInfoByProjectId(projectId)); + } + return new Result<>(); + } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java index e4dfd04800..5eccc08f67 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java +++ b/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 { */ List listProjectsByCreateTopicUserId(@Param("userId") String userId, @Param("customerId") String customerId); + + ProjectInfoDTO queryProjectInfoByProjectId(String projectId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java index e60657fa26..3216f2d576 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java @@ -268,4 +268,12 @@ public interface ProjectService extends BaseService { * @author sun */ void responseV2(ProjectResponseFormDTO formDTO); + + /** + * @param projectId + * @author yinzuomei + * @description 查询项目信息(龙湾临时调用) + * @Date 2021/2/24 17:07 + **/ + ProjectInfoDTO queryProjectInfoByProjectId(String projectId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index a72ad4c6f2..2fb4b5f45c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/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 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; + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index a3747fe72e..c47def3cc0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -246,4 +246,26 @@ order by p.CREATED_TIME desc + + + + + + + + + + + + + \ No newline at end of file