|
@@ -162,7 +162,7 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
Date beginTime = DateUtil.offsetMonth(DateUtil.beginOfMonth(yearDay), 1);
|
|
Date beginTime = DateUtil.offsetMonth(DateUtil.beginOfMonth(yearDay), 1);
|
|
Map<String, Long> startAndEnd = prophaseWeatherDataService.getDataTimeStartAndEnd(equipmentId);
|
|
Map<String, Long> startAndEnd = prophaseWeatherDataService.getDataTimeStartAndEnd(equipmentId);
|
|
|
|
|
|
- if(beginTime.getTime() < startAndEnd.get("startTime")){
|
|
|
|
|
|
+ if (beginTime.getTime() < startAndEnd.get("startTime")) {
|
|
beginTime = DateUtil.beginOfDay(new Date(startAndEnd.get("startTime")));
|
|
beginTime = DateUtil.beginOfDay(new Date(startAndEnd.get("startTime")));
|
|
}
|
|
}
|
|
Date endTime = lastDataCalculation.getTime();
|
|
Date endTime = lastDataCalculation.getTime();
|
|
@@ -543,7 +543,7 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
//压强
|
|
//压强
|
|
dataMap.put("pa", this.getDataForCalculationByEb(equipmentAttributeList, windTowerCalculationDataList, "paAVE"));
|
|
dataMap.put("pa", this.getDataForCalculationByEb(equipmentAttributeList, windTowerCalculationDataList, "paAVE"));
|
|
//湍流
|
|
//湍流
|
|
- dataMap.put("turbulence",getTurTi(prophaseAnemometryDataList));
|
|
|
|
|
|
+ dataMap.put("turbulence", getTurTi(prophaseAnemometryDataList));
|
|
//风切变
|
|
//风切变
|
|
dataMap.put("windShear", this.getDataForCalculationByEb(equipmentAttributeList, windTowerCalculationDataList, "windShearMonth"));
|
|
dataMap.put("windShear", this.getDataForCalculationByEb(equipmentAttributeList, windTowerCalculationDataList, "windShearMonth"));
|
|
//层高
|
|
//层高
|
|
@@ -602,7 +602,6 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
Integer maxHeight = heightList.get(heightList.size() - 1);
|
|
Integer maxHeight = heightList.get(heightList.size() - 1);
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
//获取最后一条记录
|
|
//获取最后一条记录
|
|
WindTowerCalculationData lastDataCalculation = windTowerCalculationDataService.getLastDataCalculation(equipmentId);
|
|
WindTowerCalculationData lastDataCalculation = windTowerCalculationDataService.getLastDataCalculation(equipmentId);
|
|
|
|
|
|
@@ -684,7 +683,7 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
return BigDecimal.valueOf(prophaseAnemometryDataList.stream().filter(p -> p.getWsAve() != null && p.getWsAve() >= 14.5 && p.getWsAve() <= 15.5 && p.getWsSta() > 0)
|
|
return BigDecimal.valueOf(prophaseAnemometryDataList.stream().filter(p -> p.getWsAve() != null && p.getWsAve() >= 14.5 && p.getWsAve() <= 15.5 && p.getWsSta() > 0)
|
|
.map(a -> {
|
|
.map(a -> {
|
|
return BigDecimal.valueOf(a.getWsSta()).divide(BigDecimal.valueOf(a.getWsAve()), 2, RoundingMode.HALF_UP);
|
|
return BigDecimal.valueOf(a.getWsSta()).divide(BigDecimal.valueOf(a.getWsAve()), 2, RoundingMode.HALF_UP);
|
|
- }).collect(Collectors.averagingDouble(BigDecimal::doubleValue))).setScale(2,RoundingMode.HALF_UP);
|
|
|
|
|
|
+ }).collect(Collectors.averagingDouble(BigDecimal::doubleValue))).setScale(2, RoundingMode.HALF_UP);
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -716,13 +715,19 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
}));
|
|
}));
|
|
//循环数据 存放Id和项目名称
|
|
//循环数据 存放Id和项目名称
|
|
for (Map.Entry<String, List<ProjectInfo>> entry : four.entrySet()) {
|
|
for (Map.Entry<String, List<ProjectInfo>> entry : four.entrySet()) {
|
|
- ArrayList<ProjectInfoDto> projectInfoDtoList = new ArrayList<>();
|
|
|
|
|
|
+ List<ProjectInfoDto> projectInfoDtoList = new ArrayList<>();
|
|
for (ProjectInfo projectInfo : entry.getValue()) {
|
|
for (ProjectInfo projectInfo : entry.getValue()) {
|
|
ProjectInfoDto projectInfoDto = new ProjectInfoDto();
|
|
ProjectInfoDto projectInfoDto = new ProjectInfoDto();
|
|
projectInfoDto.setId(projectInfo.getId());
|
|
projectInfoDto.setId(projectInfo.getId());
|
|
projectInfoDto.setProjectSort(projectInfo.getProjectBasicInfo().getProjectName());
|
|
projectInfoDto.setProjectSort(projectInfo.getProjectBasicInfo().getProjectName());
|
|
|
|
+ if (projectInfo.getProjectBasicInfo().getProjectNo() != null) {
|
|
|
|
+ projectInfoDto.setProjectNo(Integer.parseInt(projectInfo.getProjectBasicInfo().getProjectNo().substring(1)));
|
|
|
|
+ } else {
|
|
|
|
+ projectInfoDto.setProjectNo(999);
|
|
|
|
+ }
|
|
projectInfoDtoList.add(projectInfoDto);
|
|
projectInfoDtoList.add(projectInfoDto);
|
|
}
|
|
}
|
|
|
|
+ projectInfoDtoList = projectInfoDtoList.stream().sorted(Comparator.comparing(ProjectInfoDto::getProjectNo)).collect(Collectors.toList());
|
|
dataMap.put(entry.getKey(), projectInfoDtoList);
|
|
dataMap.put(entry.getKey(), projectInfoDtoList);
|
|
}
|
|
}
|
|
//项目基本信息
|
|
//项目基本信息
|