| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.naming.ldap.PagedResultsControl; |
| | |
| | | |
| | | private final String DEVICE_GUID_6 = "90878497978270816672"; |
| | | |
| | | private final String DEVICE_GUID_7 = "90140305546502568592"; |
| | | |
| | | private final String DEVICE_GUID_8 = "90169534185157152878"; |
| | | |
| | | private final String DEVICE_GUID_9 = "90276104525436465283"; |
| | | |
| | | private final String DEVICE_GUID_10 = "90543538108119559625"; |
| | | |
| | | private final String DEVICE_GUID_11 = "90689981408895835872"; |
| | | |
| | | private final String DEVICE_GUID_12 = "90943795336343088068"; |
| | | |
| | | /** |
| | | * 实时获取温湿度,二氧化碳数据 |
| | | */ |
| | |
| | | DEVICE_GUID_3, |
| | | DEVICE_GUID_4, |
| | | DEVICE_GUID_5, |
| | | DEVICE_GUID_6)); |
| | | DEVICE_GUID_6, |
| | | DEVICE_GUID_7, |
| | | DEVICE_GUID_8, |
| | | DEVICE_GUID_9, |
| | | DEVICE_GUID_10, |
| | | DEVICE_GUID_11, |
| | | DEVICE_GUID_12)); |
| | | return AjaxResult.success(maps); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取历史数据 |
| | | */ |
| | | @GetMapping("/getHistoryData") |
| | | public AjaxResult getHistoryData(@RequestParam(value = "guid") String guid, |
| | | @RequestParam(value = "startTime") long startTime, |
| | | @RequestParam(value = "endTime") long endTime) { |
| | | List<Map<String,String>> maps = realTimeEnergyConsumptionService.getHistoryData(guid, startTime, endTime); |
| | | return AjaxResult.success(maps); |
| | | } |
| | | |