Browse Source

项目分类标签统计修改

dev
zxc 4 years ago
parent
commit
3ab0aeae4a
  1. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java

@ -378,12 +378,12 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl<Sc
});
});
Map<Boolean, List<CategoryProjectResultDTO>> groupByStatus = categoryProjectGrid.stream().collect(Collectors.groupingBy(CategoryProjectResultDTO::getStatus));
// 取出分类标签code不一样的数据
// 取出分类标签code同agency级别不一样的数据
List<CategoryProjectResultDTO> categoryProjectResultDTOS1 = groupByStatus.get(false);
categoryProjectResultDTOS.addAll(categoryProjectResultDTOS1);
}
}
// result = ConvertUtils.sourceToTarget(categoryProjectResultDTOS,ScreenProjectCategoryOrgDailyEntity.class);
result = ConvertUtils.sourceToTarget(categoryProjectResultDTOS,ScreenProjectCategoryOrgDailyEntity.class);
/**
* 查询父子客户所有的分类根据分类分组然后把agencyId统一换成父客户的
* 在保存一份子客户自己agencyId的
@ -409,6 +409,8 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl<Sc
}
// 此时的 'categoryProjectResultDTOS' 等于 父子客户所有的分类标签
Map<String, List<CategoryProjectResultDTO>> groupByCategoryCode = categoryProjectResultDTOS.stream().collect(Collectors.groupingBy(CategoryProjectResultDTO::getCategoryCode));
// 这时的result集合要清空,因为被上边使用 【result = ConvertUtils.sourceToTarget(categoryProjectResultDTOS,ScreenProjectCategoryOrgDailyEntity.class);】
result.clear();
List<ScreenProjectCategoryOrgDailyEntity> finalResult = result;
groupByCategoryCode.forEach((code, list) -> {
ScreenProjectCategoryOrgDailyEntity e = new ScreenProjectCategoryOrgDailyEntity();

Loading…
Cancel
Save