Browse Source

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

dev_shibei_match
yinzuomei 5 years ago
parent
commit
1feda0ae35
  1. 7
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java
  2. 16
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java
  3. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java
  4. 21
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java
  5. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java
  6. 16
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml
  7. 1
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml
  8. 40
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java
  9. 4
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueResultDTO.java
  10. 3
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  11. 6
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  12. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java
  13. 9
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  14. 36
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java
  15. 10
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java
  16. 10
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java
  17. 17
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java
  18. 7
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java
  19. 8
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java
  20. 25
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  21. 22
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml
  22. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java

7
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.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.DataSourceConstant; import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.evaluationindex.screen.*; import com.epmet.datareport.dao.evaluationindex.screen.*;
@ -13,6 +14,7 @@ import com.epmet.evaluationindex.screen.dto.form.AgencyFormDTO;
import com.epmet.evaluationindex.screen.dto.form.AgencyNumTypeParamFormDTO; import com.epmet.evaluationindex.screen.dto.form.AgencyNumTypeParamFormDTO;
import com.epmet.evaluationindex.screen.dto.result.*; import com.epmet.evaluationindex.screen.dto.result.*;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
@ -87,6 +89,11 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
} }
PageHelper.startPage(NumConstant.ONE,param.getTopNum()); PageHelper.startPage(NumConstant.ONE,param.getTopNum());
List<DifficultProjectResultDTO> result = screenDifficultyDataDao.selectDifficulty(param.getAgencyId(),param.getType()); List<DifficultProjectResultDTO> result = screenDifficultyDataDao.selectDifficulty(param.getAgencyId(),param.getType());
for(DifficultProjectResultDTO resultDTO:result){
if (StringUtils.isNotBlank(resultDTO.getImgUrl()) && !resultDTO.getImgUrl().contains("http")) {
resultDTO.setImgUrl(StrConstant.EPMETY_STR);
}
}
if(null == result) return new ArrayList<>(); if(null == result) return new ArrayList<>();
return result; return result;
} }

16
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.ProjectDetailResultDTO;
import com.epmet.project.dto.result.*; import com.epmet.project.dto.result.*;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -42,6 +43,7 @@ import java.util.List;
* @Author sun * @Author sun
* @Description 数据-项目 * @Description 数据-项目
**/ **/
@Slf4j
@Service @Service
public class ProjectServiceImpl implements ProjectService { public class ProjectServiceImpl implements ProjectService {
@ -197,9 +199,21 @@ public class ProjectServiceImpl implements ProjectService {
*/ */
@Override @Override
public ProjectDetailResultDTO projectDetail(ProcessListFormDTO processListFormDTO) { public ProjectDetailResultDTO projectDetail(ProcessListFormDTO processListFormDTO) {
ProjectDetailResultDTO projectDetailResultDTO = screenDifficultyDataService.projectDetail(processListFormDTO); /*ProjectDetailResultDTO projectDetailResultDTO = screenDifficultyDataService.projectDetail(processListFormDTO);
if (null == projectDetailResultDTO) { if (null == projectDetailResultDTO) {
return new ProjectDetailResultDTO(); return new ProjectDetailResultDTO();
}*/
ProjectDetailResultDTO projectDetailResultDTO=new ProjectDetailResultDTO();
//todo
Result<ProjectInfoDTO> 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<ProcessAndCurrentDeptResultDTO> processList = govProjectOpenFeignClient.getProcessList(processListFormDTO); Result<ProcessAndCurrentDeptResultDTO> processList = govProjectOpenFeignClient.getProcessList(processListFormDTO);
if (!processList.success()) { if (!processList.success()) {

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java

@ -23,8 +23,6 @@ import com.epmet.entity.crm.CustomerRelationEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 客户关系表(01.14 add) * 客户关系表(01.14 add)
* *
@ -35,10 +33,10 @@ import java.util.List;
public interface CustomerRelationDao extends BaseDao<CustomerRelationEntity> { public interface CustomerRelationDao extends BaseDao<CustomerRelationEntity> {
/** /**
* @param customerIds * @param customerId
* @author yinzuomei * @author yinzuomei
* @description 查询当前客户的area_code信息以及下一级客户列表 * @description 查询当前客户的area_code信息以及下一级客户列表
* @Date 2021/1/21 11:27 * @Date 2021/1/21 11:27
**/ **/
List<CustomerSubInfoDTO> selectCustomerSubInfo(@Param("list") List<String> customerIds); CustomerSubInfoDTO selectCustomerSubInfo(@Param("customerId")String customerId);
} }

21
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java

@ -22,11 +22,15 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.constant.DataSourceConstant; import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.crm.CustomerRelationDao; import com.epmet.dao.crm.CustomerRelationDao;
import com.epmet.dto.indexcal.CustomerSubInfoDTO; import com.epmet.dto.indexcal.CustomerSubInfoDTO;
import com.epmet.dto.stats.DimCustomerDTO;
import com.epmet.entity.crm.CustomerRelationEntity; import com.epmet.entity.crm.CustomerRelationEntity;
import com.epmet.service.crm.CustomerRelationService; import com.epmet.service.crm.CustomerRelationService;
import com.epmet.service.stats.DimCustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -38,11 +42,12 @@ import java.util.stream.Collectors;
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-14 * @since v1.0.0 2021-01-14
*/ */
@DataSource(DataSourceConstant.STATS) @DataSource(DataSourceConstant.OPER_CRM)
@Service @Service
public class CustomerRelationServiceImpl extends BaseServiceImpl<CustomerRelationDao, CustomerRelationEntity> implements CustomerRelationService { public class CustomerRelationServiceImpl extends BaseServiceImpl<CustomerRelationDao, CustomerRelationEntity> implements CustomerRelationService {
@Autowired
private DimCustomerService dimCustomerService;
/** /**
* @param customerIds * @param customerIds
* @return java.util.Map<java.lang.String, com.epmet.dto.indexcal.CustomerSubInfoDTO> * @return java.util.Map<java.lang.String, com.epmet.dto.indexcal.CustomerSubInfoDTO>
@ -52,7 +57,17 @@ public class CustomerRelationServiceImpl extends BaseServiceImpl<CustomerRelatio
**/ **/
@Override @Override
public Map<String, CustomerSubInfoDTO> getCustomerInfoMap(List<String> customerIds) { public Map<String, CustomerSubInfoDTO> getCustomerInfoMap(List<String> customerIds) {
List<CustomerSubInfoDTO> list = baseDao.selectCustomerSubInfo(customerIds); List<CustomerSubInfoDTO> list=new ArrayList<>();
for(String customerId:customerIds){
CustomerSubInfoDTO customerSubInfoDTO = baseDao.selectCustomerSubInfo(customerId);
if(null!=customerSubInfoDTO){
DimCustomerDTO dimCustomerDTO=dimCustomerService.get(customerId);
if(null!=dimCustomerDTO){
customerSubInfoDTO.setCustomerName(dimCustomerDTO.getCustomerName());
}
list.add(customerSubInfoDTO);
}
}
if(CollectionUtils.isEmpty(list)){ if(CollectionUtils.isEmpty(list)){
return new HashMap<>(); return new HashMap<>();
} }

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java

@ -163,10 +163,11 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
Map<String,String> contentMap = topicService.getTopicContent(projectSourceMap); Map<String,String> contentMap = topicService.getTopicContent(projectSourceMap);
difficulties.forEach( diff -> { difficulties.forEach( diff -> {
if(!CollectionUtils.isEmpty(imgMap)) {
List<ScreenDifficultyImgDataEntity> figureList = imgMap.get(diff.getEventId()); List<ScreenDifficultyImgDataEntity> figureList = CollectionUtils.isEmpty(imgMap) ? null : imgMap.get(diff.getEventId());
diff.setEventImgUrl(CollectionUtils.isEmpty(figureList) ? "" : figureList.get(NumConstant.ZERO).getEventImgUrl()); diff.setEventImgUrl(CollectionUtils.isEmpty(figureList) ? "" : figureList.get(NumConstant.ZERO).getEventImgUrl());
}
if(!CollectionUtils.isEmpty(contentMap)) { if(!CollectionUtils.isEmpty(contentMap)) {
diff.setEventContent(contentMap.get(diff.getEventId())); diff.setEventContent(contentMap.get(diff.getEventId()));
} }

16
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml

@ -4,7 +4,6 @@
<mapper namespace="com.epmet.dao.crm.CustomerRelationDao"> <mapper namespace="com.epmet.dao.crm.CustomerRelationDao">
<resultMap id="CustomerSubInfoDTOResMap" type="com.epmet.dto.indexcal.CustomerSubInfoDTO"> <resultMap id="CustomerSubInfoDTOResMap" type="com.epmet.dto.indexcal.CustomerSubInfoDTO">
<result property="customerId" column="customerId"></result> <result property="customerId" column="customerId"></result>
<result property="customerName" column="customerName"></result>
<result property="customerAreaCode" column="customerAreaCode"></result> <result property="customerAreaCode" column="customerAreaCode"></result>
<collection property="subCustomerIds" ofType="java.lang.String"> <collection property="subCustomerIds" ofType="java.lang.String">
<result column="subCustomerId"/> <result column="subCustomerId"/>
@ -14,22 +13,13 @@
<select id="selectCustomerSubInfo" parameterType="map" resultMap="CustomerSubInfoDTOResMap"> <select id="selectCustomerSubInfo" parameterType="map" resultMap="CustomerSubInfoDTOResMap">
SELECT SELECT
CR.PARENT_CUSTOMER_ID AS customerId, CR.PARENT_CUSTOMER_ID AS customerId,
dc.CUSTOMER_NAME AS customerName, CR.CUSTOMER_ID AS subCustomerId,
dc.AREA_CODE AS customerAreaCode, (select c.AREA_CODE from customer_relation c where c.del_flag='0' and c.CUSTOMER_ID=#{customerId}) as customerAreaCode
CR.CUSTOMER_ID AS subCustomerId
FROM FROM
customer_relation cr customer_relation cr
LEFT JOIN dim_customer dc ON ( cr.PARENT_CUSTOMER_ID = DC.ID and dc.del_flag='0')
WHERE WHERE
cr.DEL_FLAG = '0' cr.DEL_FLAG = '0'
AND cr.`STATUS` = 'open' AND cr.`STATUS` = 'open'
AND cr.PARENT_CUSTOMER_ID != '0' AND cr.PARENT_CUSTOMER_ID =#{customerId}
<if test="null !=list and list.size()>0">
AND cr.PARENT_CUSTOMER_ID IN
<foreach collection="list" item="customerId" index="index" open="(" close=")" separator=",">
#{customerId}
</foreach>
</if>
</select> </select>
</mapper> </mapper>

1
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml

@ -225,6 +225,7 @@
resi_topic_attachment resi_topic_attachment
WHERE WHERE
DEL_FLAG = '0' DEL_FLAG = '0'
AND ATTACHMENT_TYPE = 'image'
<foreach collection="list" item="item" open="AND (" separator=" OR " close=")"> <foreach collection="list" item="item" open="AND (" separator=" OR " close=")">
TOPIC_ID = #{item.sourceId} TOPIC_ID = #{item.sourceId}
</foreach> </foreach>

40
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java

@ -386,6 +386,7 @@ public class AreaCodeServiceImpl extends BaseServiceImpl<AreaCodeDao, AreaCodeEn
// 查询所有街道、社区 // 查询所有街道、社区
List<AreaCodeChildDTO> areaCodeChildDTOS = childDao.selectAllChild(); List<AreaCodeChildDTO> areaCodeChildDTOS = childDao.selectAllChild();
List<AreaCodeDictResultDTO> fourResult = new ArrayList<>(); List<AreaCodeDictResultDTO> fourResult = new ArrayList<>();
List<AreaCodeDictResultDTO> fiveResult = new ArrayList<>();
// 街道-社区 // 街道-社区
Map<Integer, List<AreaCodeChildDTO>> groupByLevel = areaCodeChildDTOS.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getLevel)); Map<Integer, List<AreaCodeChildDTO>> groupByLevel = areaCodeChildDTOS.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getLevel));
//社区 //社区
@ -393,23 +394,40 @@ public class AreaCodeServiceImpl extends BaseServiceImpl<AreaCodeDao, AreaCodeEn
Map<String, List<AreaCodeChildDTO>> groupByPCode = levelFive.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getPCode)); Map<String, List<AreaCodeChildDTO>> groupByPCode = levelFive.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getPCode));
//街道 //街道
List<AreaCodeChildDTO> levelFour = groupByLevel.get(NumConstant.FOUR); List<AreaCodeChildDTO> levelFour = groupByLevel.get(NumConstant.FOUR);
// 6级
List<AreaCodeChildDTO> levelSix = groupByLevel.get(NumConstant.SIX);
Map<String, List<AreaCodeChildDTO>> groupBySixPCode = levelSix.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getPCode));
levelFive.forEach(f -> {
AreaCodeDictResultDTO dto = new AreaCodeDictResultDTO();
dto.setCode(f.getCode());
dto.setName(f.getName());
dto.setParentCode(f.getPCode());
groupBySixPCode.forEach((k,v) -> {
if (dto.getCode().equals(k)){
List<AreaCodeDictResultDTO> six = new ArrayList<>();
v.forEach(s -> {
AreaCodeDictResultDTO sixDto = new AreaCodeDictResultDTO();
sixDto.setCode(s.getCode());
sixDto.setName(s.getName());
sixDto.setParentCode(k);
six.add(sixDto);
});
List<AreaCodeDictResultDTO> collect = six.stream().sorted(Comparator.comparing(AreaCodeDictResultDTO::getCode)).collect(Collectors.toList());
dto.setChildren(collect);
}
});
fiveResult.add(dto);
});
Map<String, List<AreaCodeDictResultDTO>> groupByFivePCode = fiveResult.stream().collect(Collectors.groupingBy(AreaCodeDictResultDTO::getParentCode));
levelFour.forEach(four -> { levelFour.forEach(four -> {
AreaCodeDictResultDTO dto = new AreaCodeDictResultDTO(); AreaCodeDictResultDTO dto = new AreaCodeDictResultDTO();
dto.setCode(four.getCode()); dto.setCode(four.getCode());
dto.setName(four.getName()); dto.setName(four.getName());
dto.setParentCode(four.getPCode()); dto.setParentCode(four.getPCode());
groupByPCode.forEach((pCode,v) -> { groupByFivePCode.forEach((pCode,v) -> {
if (dto.getCode().equals(pCode)){ if (dto.getCode().equals(pCode)){
List<AreaCodeDictResultDTO> fiveResult = new ArrayList<>(); dto.setChildren(v);
v.forEach(five -> {
AreaCodeDictResultDTO fiveDto = new AreaCodeDictResultDTO();
fiveDto.setCode(five.getCode());
fiveDto.setName(five.getName());
fiveDto.setParentCode(pCode);
fiveResult.add(fiveDto);
});
List<AreaCodeDictResultDTO> fiveSort = fiveResult.stream().sorted(Comparator.comparing(AreaCodeDictResultDTO::getCode)).collect(Collectors.toList());
dto.setChildren(fiveSort);
} }
}); });
fourResult.add(dto); fourResult.add(dto);

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; 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") @PostMapping("/gov/issue/issuesharelink/sharelinkinfo")
Result<IssueShareLinkRecordDTO> shareLinkInfo(@RequestParam String shareLinkId); 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.from.MyShiftIssueTopicsFormDTO;
import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO; import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -207,4 +206,9 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient
public Result<IssueShareLinkRecordDTO> shareLinkInfo(String shareLinkId) { public Result<IssueShareLinkRecordDTO> shareLinkInfo(String shareLinkId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "shareLinkInfo", 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 议题详情 * @Description 议题详情
* @param issueDetail * @param issueDetail
* @author zxc * @author zxc 这个接口内部feign也调用不要加权限注解
* @date 2020/5/11 9:42 * @date 2020/5/11 9:42
*/ */
@PostMapping(value = "detail") @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) { public IssueResultDTO detail(IssueDetailFormDTO issueDetail) {
//议题信息 //议题信息
IssueResultDTO issueResult = issueDao.issueDetail(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; return issueResult;
} }

36
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<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.ProcessListFormDTO;
import com.epmet.dto.form.ProjectByCreateTopicUserFormDTO; import com.epmet.dto.form.ProjectByCreateTopicUserFormDTO;
import com.epmet.dto.form.ProjectListFromDTO; import com.epmet.dto.form.ProjectListFromDTO;
import com.epmet.dto.result.MyPartProjectsResultDTO; import com.epmet.dto.result.*;
import com.epmet.dto.result.PendProjectListResultDTO;
import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO;
import com.epmet.dto.result.ProjectOfCreateTopicUserResultDTO;
import com.epmet.feign.fallback.GovProjectOpenFeignClientFallback; import com.epmet.feign.fallback.GovProjectOpenFeignClientFallback;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import org.springframework.cloud.openfeign.FeignClient; 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.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
@ -75,4 +74,7 @@ public interface GovProjectOpenFeignClient {
*/ */
@PostMapping("gov/project/project/list-by-createtopic-userid") @PostMapping("gov/project/project/list-by-createtopic-userid")
Result<List<ProjectOfCreateTopicUserResultDTO>> listProjectsByCreateTopicUserId(@RequestBody ProjectByCreateTopicUserFormDTO form); 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.ProcessListFormDTO;
import com.epmet.dto.form.ProjectByCreateTopicUserFormDTO; import com.epmet.dto.form.ProjectByCreateTopicUserFormDTO;
import com.epmet.dto.form.ProjectListFromDTO; import com.epmet.dto.form.ProjectListFromDTO;
import com.epmet.dto.result.MyPartProjectsResultDTO; import com.epmet.dto.result.*;
import com.epmet.dto.result.PendProjectListResultDTO;
import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO;
import com.epmet.dto.result.ProjectOfCreateTopicUserResultDTO;
import com.epmet.feign.GovProjectOpenFeignClient; import com.epmet.feign.GovProjectOpenFeignClient;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -69,4 +66,9 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli
public Result<List<ProjectOfCreateTopicUserResultDTO>> listProjectsByCreateTopicUserId(ProjectByCreateTopicUserFormDTO form) { public Result<List<ProjectOfCreateTopicUserResultDTO>> listProjectsByCreateTopicUserId(ProjectByCreateTopicUserFormDTO form) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "listProjectsByCreateTopicUserId", 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; package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData; 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.ExcelUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.AssertUtils;
@ -33,6 +31,7 @@ import com.epmet.dto.result.*;
import com.epmet.excel.ProjectExcel; import com.epmet.excel.ProjectExcel;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import com.epmet.service.ProjectService; import com.epmet.service.ProjectService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; 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()); List<ProjectOfCreateTopicUserResultDTO> projects = projectService.listProjectsByCreateTopicUserId(form.getUserId(), form.getCustomerId(), form.getPageNo(), form.getPageSize());
return new Result().ok(projects); 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.LatestListFormDTO;
import com.epmet.dto.form.ProjectListFromDTO; import com.epmet.dto.form.ProjectListFromDTO;
import com.epmet.dto.form.ShiftProjectsFromDTO; import com.epmet.dto.form.ShiftProjectsFromDTO;
import com.epmet.dto.result.LatestListResultDTO; import com.epmet.dto.result.*;
import com.epmet.dto.result.MyPartProjectsResultDTO;
import com.epmet.dto.result.ProjectDetailResultDTO;
import com.epmet.dto.result.ProjectOfCreateTopicUserResultDTO;
import com.epmet.entity.ProjectEntity; import com.epmet.entity.ProjectEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -148,4 +145,6 @@ public interface ProjectDao extends BaseDao<ProjectEntity> {
*/ */
List<ProjectOfCreateTopicUserResultDTO> listProjectsByCreateTopicUserId(@Param("userId") String userId, List<ProjectOfCreateTopicUserResultDTO> listProjectsByCreateTopicUserId(@Param("userId") String userId,
@Param("customerId") String customerId); @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 * @author sun
*/ */
void responseV2(ProjectResponseFormDTO formDTO); 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; private ProjectOrgRelationDao relationDao;
@Autowired @Autowired
private ProjectProcessAttachmentService projectProcessAttachmentService; private ProjectProcessAttachmentService projectProcessAttachmentService;
@Autowired
private GovIssueOpenFeignClient govIssueOpenFeignClient;
private final static String ONE_DAY = "<1"; 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 order by p.CREATED_TIME desc
</select> </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> </mapper>

1
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java

@ -175,6 +175,7 @@ public class UserBadgeServiceImpl implements UserBadgeService {
return; return;
} }
List<UserBaseInfoResultDTO> userBaseInfoResultDTOS = userBaseInfoService.queryUserBaseInfo(reUserIds); List<UserBaseInfoResultDTO> userBaseInfoResultDTOS = userBaseInfoService.queryUserBaseInfo(reUserIds);
log.info("user基本信息:"+userBaseInfoResultDTOS.toString());
if (CollectionUtils.isEmpty(userBaseInfoResultDTOS)) { if (CollectionUtils.isEmpty(userBaseInfoResultDTOS)) {
log.error("未查询到党员基本信息......"); log.error("未查询到党员基本信息......");
throw new RenException("未查询到党员基本信息......"); throw new RenException("未查询到党员基本信息......");

Loading…
Cancel
Save