|
@@ -739,34 +739,83 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
|
//查询项目概况
|
|
|
public HashMap<String, Object> projectMapInfo(String projectId) {
|
|
|
HashMap<String, Object> dataMap = new HashMap<>();
|
|
|
+ //获取项目信息
|
|
|
List<ProjectInfo> projectInfoList = projectInfoService.getProjectInfoList();
|
|
|
//根据项目ID过滤指定数据
|
|
|
List<ProjectInfo> collect = projectInfoList.stream().filter(p -> p.getId().equals(projectId)).collect(Collectors.toList());
|
|
|
- ArrayList<HashMap<String, String>> arrayList = new ArrayList<>();
|
|
|
+ //获取对应项目概述
|
|
|
+ if (!collect.isEmpty()) {
|
|
|
+ for (ProjectInfo projectInfo : collect) {
|
|
|
+ dataMap.put("projectOverview", projectInfo.getProjectBasicInfo().getProjectOverview());
|
|
|
+ dataMap.put("resourcesOverview", projectInfo.getProjectBasicInfo().getResourcesOverview());
|
|
|
+ if (projectInfo.getEquipment() != null && projectInfo.getEquipment().size() > 0) {
|
|
|
+ dataMap.put("longitude", projectInfo.getEquipment().get(0).getLongitude());
|
|
|
+ dataMap.put("latitude", projectInfo.getEquipment().get(0).getLatitude());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return dataMap;
|
|
|
+ }
|
|
|
|
|
|
- if (collect.size() > 0) {
|
|
|
- ProjectInfo projectInfo = collect.get(0);
|
|
|
- dataMap.put("projectOverview", projectInfo.getProjectBasicInfo().getProjectOverview());
|
|
|
- dataMap.put("resourcesOverview", projectInfo.getProjectBasicInfo().getResourcesOverview());
|
|
|
+ //地图点位坐标 (风机、测风塔、拐点)
|
|
|
+ public HashMap<String, Object> getPointMap() {
|
|
|
+ HashMap<String, Object> dataMap = new HashMap<>();
|
|
|
+ //获取项目信息
|
|
|
+ List<ProjectInfo> projectInfoList = projectInfoService.getProjectInfoList();
|
|
|
+ //获取场站数据
|
|
|
+ List<StationInfo> stationInfoList = stationInfoService.selectStationInfo();
|
|
|
+ //循环所有项目于信息
|
|
|
+ //测风塔List
|
|
|
+ ArrayList<Map<String, Object>> towerList = new ArrayList<>();
|
|
|
+ //拐点坐标List
|
|
|
+ ArrayList<List<Coordinates>> coordinateList = new ArrayList<>();
|
|
|
+ //风机List
|
|
|
+ ArrayList<List<FanTower>> fanList = new ArrayList<>();
|
|
|
+ for (ProjectInfo projectInfo : projectInfoList) {
|
|
|
//拐点坐标
|
|
|
- dataMap.put("coordinates", projectInfo.getCoordinates());
|
|
|
- if (projectInfo.getEquipment().size() > 0) {
|
|
|
- HashMap<String, String> map = new HashMap<>();
|
|
|
+ coordinateList.add(projectInfo.getCoordinates());
|
|
|
+
|
|
|
+ if (projectInfo.getEquipment() != null && projectInfo.getEquipment().size() > 0) {
|
|
|
+ //循环测风塔信息
|
|
|
for (Equipment equipment : projectInfo.getEquipment()) {
|
|
|
- //经度
|
|
|
+ HashMap<String, Object> map = new HashMap<>();
|
|
|
map.put("longitude", equipment.getLongitude());
|
|
|
map.put("latitude", equipment.getLatitude());
|
|
|
map.put("towerName", equipment.getName());
|
|
|
- arrayList.add(map);
|
|
|
+ map.put("projectName", projectInfo.getProjectBasicInfo().getProjectNameEasy());
|
|
|
+ towerList.add(map);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- //测风塔坐标
|
|
|
- dataMap.put("towerInfo", arrayList);
|
|
|
}
|
|
|
+
|
|
|
+ dataMap.put("towerList", towerList);
|
|
|
+ dataMap.put("coordinatesList", coordinateList);
|
|
|
+
|
|
|
+
|
|
|
+ for (StationInfo stationInfo : stationInfoList) {
|
|
|
+
|
|
|
+ if (stationInfo.getEquipment() != null && stationInfo.getEquipment().size() > 0) {
|
|
|
+ //循环测风塔信息
|
|
|
+ ArrayList<Map<String, Object>> arrayList = new ArrayList<>();
|
|
|
+ for (Equipment equipment : stationInfo.getEquipment()) {
|
|
|
+ HashMap<String, Object> map = new HashMap<>();
|
|
|
+ map.put("longitude", equipment.getLongitude());
|
|
|
+ map.put("latitude", equipment.getLatitude());
|
|
|
+ map.put("towerName", equipment.getName());
|
|
|
+ map.put("stationName", stationInfo.getStationBasicInfo().getStationName());
|
|
|
+ arrayList.add(map);
|
|
|
+ }
|
|
|
+ towerList.addAll(arrayList);
|
|
|
+ }
|
|
|
+ fanList.add(stationInfo.getFanTowerList());
|
|
|
+ }
|
|
|
+ dataMap.put("fan", fanList);
|
|
|
+
|
|
|
return dataMap;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 项目测风塔下拉框
|
|
|
*
|
|
@@ -869,24 +918,16 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
|
|
|
|
}
|
|
|
//过滤塔信息
|
|
|
- List<Equipment> equipmentList = stationInfoList.get(0).getEquipment();
|
|
|
- ArrayList<HashMap<String, String>> towerList = new ArrayList<>();
|
|
|
- if (equipmentList.size() > 0) {
|
|
|
- for (Equipment equipment : equipmentList) {
|
|
|
- HashMap<String, String> towerMap = new HashMap<>();
|
|
|
- towerMap.put("name", equipment.getName());
|
|
|
- towerMap.put("towerId", equipment.getId());
|
|
|
- towerMap.put("equipmentNo", equipment.getEquipmentNo());
|
|
|
- towerMap.put("longitude", equipment.getLongitude());
|
|
|
- towerMap.put("latitude", equipment.getLatitude());
|
|
|
- towerList.add(towerMap);
|
|
|
- }
|
|
|
-
|
|
|
+ StationInfo stationInfo = stationInfoList.get(0);
|
|
|
+ if (stationInfo.getEquipment() != null && stationInfo.getEquipment().size() > 0) {
|
|
|
+ dataMap.put("longitude", stationInfo.getEquipment().get(0).getLongitude());
|
|
|
+ dataMap.put("latitude", stationInfo.getEquipment().get(0).getLatitude());
|
|
|
+ } else {
|
|
|
+ dataMap.put("longitude", stationInfo.getFanTowerList().get(0).getLongitudeFan());
|
|
|
+ dataMap.put("latitude", stationInfo.getFanTowerList().get(0).getLatitudeFan());
|
|
|
}
|
|
|
+
|
|
|
dataMap.put("modelT", arrayList);
|
|
|
- //风机点位
|
|
|
- dataMap.put("modelFan", stationInfoList.get(0).getFanTowerList());
|
|
|
- dataMap.put("tower", towerList);
|
|
|
}
|
|
|
return dataMap;
|
|
|
}
|
|
@@ -942,33 +983,45 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
|
projectEvolveDtoOne.setIndex(menusOne.getIndex());
|
|
|
projectEvolveDtoOne.setTaskContent(menusOne.getWorkContent());
|
|
|
projectEvolveDtoOne.setPlanTime(menusOne.getPlanTime());
|
|
|
- projectEvolveDtoOne.setStatus(menusOne.getStatus());
|
|
|
- projectEvolveList.add(projectEvolveDtoOne);
|
|
|
-
|
|
|
- if (menusOne.getProjectMenusTows() != null && menusOne.getProjectMenusTows().size() > 0) {
|
|
|
- //循环二级菜单
|
|
|
- for (ProjectMenusTow menusTow : menusOne.getProjectMenusTows()) {
|
|
|
- if (menusTow.getProjectMenusThreeList() != null && menusTow.getProjectMenusThreeList().size() > 0) {
|
|
|
- //循环三级菜单
|
|
|
- for (ProjectMenusThree menusThree : menusTow.getProjectMenusThreeList()) {
|
|
|
+ if (menusOne.getProjectMenusTows().size() > 0 && menusOne.getProjectMenusTows().get(0).getIndex().equals("")) {
|
|
|
+ if (menusOne.getProjectMenusTows().get(0).getProjectMenusThreeList().size() > 0) {
|
|
|
+ projectEvolveDtoOne.setStatus(menusOne.getProjectMenusTows().get(0).getProjectMenusThreeList().get(0).getRealTime());
|
|
|
+ projectEvolveList.add(projectEvolveDtoOne);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ projectEvolveList.add(projectEvolveDtoOne);
|
|
|
+ if (menusOne.getProjectMenusTows() != null && menusOne.getProjectMenusTows().size() > 0) {
|
|
|
+ //循环二级菜单
|
|
|
+ for (ProjectMenusTow menusTow : menusOne.getProjectMenusTows()) {
|
|
|
+ if (menusTow.getProjectMenusThreeList() != null && menusTow.getProjectMenusThreeList().size() > 0) {
|
|
|
+ //循环三级菜单
|
|
|
+ for (ProjectMenusThree menusThree : menusTow.getProjectMenusThreeList()) {
|
|
|
+ ProjectEvolveDto projectEvolveDto = new ProjectEvolveDto();
|
|
|
+ //放入二级序号
|
|
|
+ projectEvolveDto.setIndex(menusTow.getIndex());
|
|
|
+ //放入二级计划时间
|
|
|
+ projectEvolveDto.setPlanTime(menusTow.getPlanTime());
|
|
|
+ //放入二级工作内容
|
|
|
+ projectEvolveDto.setTaskContent(menusTow.getWorkContent());
|
|
|
+ //详细工作信息 三级工作内容
|
|
|
+ projectEvolveDto.setDetailedTaskContent(menusThree.getWorkContent());
|
|
|
+ //实际完成时间 三级时间
|
|
|
+ projectEvolveDto.setRealTime(menusThree.getRealTime());
|
|
|
+ //放入状态 三级备注
|
|
|
+ projectEvolveDto.setStatus(menusThree.getRemark());
|
|
|
+ projectEvolveList.add(projectEvolveDto);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
ProjectEvolveDto projectEvolveDto = new ProjectEvolveDto();
|
|
|
- //放入二级序号
|
|
|
projectEvolveDto.setIndex(menusTow.getIndex());
|
|
|
- //放入二级计划时间
|
|
|
- projectEvolveDto.setPlanTime(menusOne.getPlanTime());
|
|
|
- //放入二级工作内容
|
|
|
projectEvolveDto.setTaskContent(menusTow.getWorkContent());
|
|
|
- //详细工作信息 三级工作内容
|
|
|
- projectEvolveDto.setDetailedTaskContent(menusThree.getWorkContent());
|
|
|
- //实际完成时间 三级时间
|
|
|
- projectEvolveDto.setRealTime(menusThree.getRealTime());
|
|
|
- //放入状态 三级备注
|
|
|
- projectEvolveDto.setStatus(menusThree.getRemark());
|
|
|
+ projectEvolveDto.setPlanTime(menusTow.getPlanTime());
|
|
|
projectEvolveList.add(projectEvolveDto);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|