Browse Source

Merge branch 'dev_grid_lively_syc' into dev

dev
sunyuchao 4 years ago
parent
commit
57e040415b
  1. 12
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java

12
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java

@ -617,16 +617,8 @@ public class GovOrgServiceImpl implements GovOrgService {
//3.查询直属下级组织下网格在查询时间段内存在上报事件(直接立项)数的网格,一天一条
List<GridDateIdResultDTO> projectList = dataStatsService.getGridDateProjectIncrList(formDTO);
//4.汇总数据,一个网格一天只记录一条数据,这条数据可能是例行工作的也可能是上报事件的,也可能某一天两个数都有,但只记录一条
Map<String, String> map = new HashMap<>();
workList.forEach(w -> {
map.put(w.getGridId() + w.getDateId(), w.getDateId());
});
//projectList.stream().filter(pro -> !map.containsKey(pro.getGridId() + pro.getDateId())).forEach(p -> workList.add(p));
projectList.forEach(pro -> {
if (!map.containsKey(pro.getGridId() + pro.getDateId())) {
workList.add(pro);
}
});
Set<String> map = workList.stream().map(o -> o.getGridId() + o.getDateId()).collect(Collectors.toSet());
projectList.stream().filter(pro -> !map.contains(pro.getGridId() + pro.getDateId())).forEach(p -> workList.add(p));
//5.按组织封装数据
//计算百分比使用,保留小数点后两位
NumberFormat numberFormat = NumberFormat.getInstance();

Loading…
Cancel
Save