Browse Source

Merge remote-tracking branch 'origin/dev_bugfix_ljj' into develop

master
yinzuomei 4 years ago
parent
commit
c61569f6aa
  1. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java
  2. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java
  3. 23
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java
  4. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java
  5. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java
  6. 18
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java

@ -139,6 +139,7 @@ public interface ProjectDao extends BaseDao<ProjectEntity> {
List<com.epmet.dto.ProjectCategoryDTO> getProjectCategoryData(@Param("customerId") String customerId, @Param("dateId") String dateId);
List<com.epmet.dto.ProjectCategoryDTO> selectProjectCategoryData(@Param("customerId") String customerId, @Param("dateId") String dateId);
/**
* 获取项目满意度
*

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java

@ -74,7 +74,9 @@ public class FactOriginProjectCategoryDailyServiceImpl extends BaseServiceImpl<F
if (NumConstant.ZERO == count){
dateString = null;
}
List<ProjectCategoryDTO> projectCategoryData = projectService.getProjectCategoryData(customerId, dateString);
// 原来一个项目有多个分类,现在几个分类可能会对上同一个省里的编码,所以去重一下,插入到fact_origin_project_category表
// List<ProjectCategoryDTO> projectCategoryData = projectService.getProjectCategoryData(customerId, dateString);
List<ProjectCategoryDTO> projectCategoryData = projectService.queryProjectCategoryData(customerId, dateString);
HashSet<String> projectIdSet=new HashSet<>();
if (!CollectionUtils.isEmpty(projectCategoryData)){
projectCategoryData.forEach(data->{

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

@ -249,8 +249,8 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
//项目分类数据 todo 暂时查询所有
List<ProjectCategoryDTO> projectCategoryData = projectService.getProjectCategoryData(param.getCustomerId(), null);
//key projectId:categoryCode Set
Map<String, List<String>> projectCategoryMap = projectCategoryData.stream()
.collect(Collectors.groupingBy(ProjectCategoryDTO::getProjectId, Collectors.mapping(ProjectCategoryDTO::getCategoryCode, Collectors.toList())));
Map<String, Set<String>> projectCategoryMap = projectCategoryData.stream()
.collect(Collectors.groupingBy(ProjectCategoryDTO::getProjectId, Collectors.mapping(ProjectCategoryDTO::getCategoryCode, Collectors.toSet())));
//2.获取项目的所有节点耗时数据
List<FactOriginProjectOrgPeriodDailyEntity> projectPeriodList = factOriginProjectMainDailyService.getProjectPeriod(param);
@ -370,15 +370,15 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
* @param categoryList
* @param projectCategoryMap
*/
private void setCategoryInfo(ScreenDifficultyDataEntity diffEntity, String projectId, List<IssueProjectCategoryDictEntity> categoryList, Map<String, List<String>> projectCategoryMap) {
List<String> categorySet = projectCategoryMap.get(projectId);
private void setCategoryInfo(ScreenDifficultyDataEntity diffEntity, String projectId, List<IssueProjectCategoryDictEntity> categoryList, Map<String, Set<String>> projectCategoryMap) {
Set<String> categorySet = projectCategoryMap.get(projectId);
if (CollectionUtils.isEmpty(categorySet)) {
return;
}
projectCategoryMap.forEach((k, v) -> {
StringBuilder code = new StringBuilder();
StringBuilder name = new StringBuilder();
v.forEach(categoryCode -> {
StringBuilder code = new StringBuilder();
StringBuilder name = new StringBuilder();
//projectCategoryMap.forEach((k, v) -> {
categorySet.forEach(categoryCode -> {
List<IssueProjectCategoryDictEntity> childCategory = new ArrayList<>();
getParentNode(childCategory, categoryList, categoryCode);
String categoryCodes = childCategory.stream().map(IssueProjectCategoryDictEntity::getCategoryCode).collect(Collectors.joining(StrConstant.HYPHEN));
@ -389,12 +389,11 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
});
code.deleteCharAt(code.length() - NumConstant.ONE);
name.deleteCharAt(name.length() - NumConstant.ONE);
diffEntity.setEventCategoryCode(code.toString());
diffEntity.setEventCategoryName(name.toString());
log.debug("code:{}",code.toString());
log.debug("name:{}",name.toString());
});
//});
diffEntity.setEventCategoryCode(code.toString());
diffEntity.setEventCategoryName(name.toString());
}
/**

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java

@ -155,6 +155,7 @@ public interface ProjectService extends BaseService<ProjectEntity> {
*/
List<ProjectCategoryDTO> getProjectCategoryData(String customerId, String dateId);
List<ProjectCategoryDTO> queryProjectCategoryData(String customerId, String dateId);
/**
* 获取项目满意度
* @author zhaoqifeng

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java

@ -161,6 +161,10 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
return baseDao.getProjectCategoryData(customerId,dateId);
}
@Override
public List<com.epmet.dto.ProjectCategoryDTO> queryProjectCategoryData(String customerId, String dateId) {
return baseDao.selectProjectCategoryData(customerId,dateId);
}
/**
* 获取项目满意度
*

18
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml

@ -146,6 +146,24 @@
AND DATE_FORMAT(CREATED_TIME,'%Y%m%d')=#{dateId}
</if>
</select>
<!-- 原来一个项目有多个分类,现在几个分类可能会对上同一个省里的编码,所以去重一下,插入到fact_origin_project_category表 -->
<select id="selectProjectCategoryData" parameterType="map" resultType="com.epmet.dto.ProjectCategoryDTO">
select
distinct pc.CATEGORY_ID,
pc.CATEGORY_CODE,
pc.CATEGORY_PIDS,
pc.PROJECT_ID,
pc.CREATED_TIME
from
`project_category` pc
where pc.del_flag = '0'
and pc.customer_id = #{customerId}
<if test="dateId != null">
AND DATE_FORMAT(pc.CREATED_TIME,'%Y%m%d')=#{dateId}
</if>
</select>
<select id="selectProjectSatisfaction" resultType="com.epmet.dto.project.ProjectPointDTO">
SELECT
PROJECT_ID,

Loading…
Cancel
Save