| | |
| | | |
| | | @GetMapping("/windAndDeviceData") |
| | | @ResponseBody |
| | | public List windAndDeviceData(/*String monitorPointId*/) { |
| | | String monitorPointId="539"; |
| | | public Map<String, List> windAndDeviceData() { |
| | | /*String monitorPointId="539"; |
| | | Calendar c = Calendar.getInstance();//可以对每个时间域单独修改 对时间进行加减操作等 |
| | | int year = c.get(Calendar.YEAR); |
| | | int month = c.get(Calendar.MONTH); |
| | |
| | | String time=year + "-" + mon + "-" + dt + " " +hu + ":" +mu + ":" + "00"; |
| | | String table="history_minutely_"+year+mon; |
| | | List list=deviceService.byMonitorIdGetDeviceAndWind(monitorPointId,time,table); |
| | | return list; |
| | | return list;*/ |
| | | List<String> macList=deviceService.getAllMac(); |
| | | Map<String,List> latlngMap=new HashMap<String,List>(); |
| | | Map devMap=null; |
| | | List list=new ArrayList(); |
| | | for (String mac : macList) { |
| | | devMap=new HashMap(); |
| | | if (mac!=null){ |
| | | Device device=deviceService.byMacGetDevice(mac); |
| | | List list1= LatLngTransformation.Convert_BD09_To_GCJ02(device.getLatitude(),device.getLongitude()); |
| | | devMap.put("lat",list1.get(1)); |
| | | devMap.put("lng",list1.get(0)); |
| | | devMap.put("monitorPointId",device.getMonitorPointId()); |
| | | //System.out.println(device); |
| | | list.add(devMap); |
| | | }else { |
| | | continue; |
| | | } |
| | | } |
| | | latlngMap.put("latlng",list); |
| | | return latlngMap; |
| | | } |
| | | @GetMapping("forecastO3") |
| | | @ApiOperation(value = "预测和实际臭氧对比", notes = "预测和实际臭氧对比") |