package com.ruoyi.http.service.controller;
|
|
import com.ruoyi.framework.web.controller.BaseController;
|
import com.ruoyi.framework.web.domain.AjaxResult;
|
import com.ruoyi.http.service.impl.RealTimeEnergyConsumptionServiceImpl;
|
import io.swagger.annotations.Api;
|
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.RestController;
|
|
import javax.naming.ldap.PagedResultsControl;
|
import java.util.*;
|
|
@RestController
|
@RequestMapping("/iot")
|
@Api(tags = "数采接口")
|
public class JclyController extends BaseController {
|
|
@Autowired
|
private RealTimeEnergyConsumptionServiceImpl realTimeEnergyConsumptionService;
|
|
private final String DEVICE_GUID = "90444196515214284663";
|
|
private final String DEVICE_GUID_2 = "90187099059463151919";
|
|
private final String DEVICE_GUID_3 = "90299548548536240693";
|
|
private final String DEVICE_GUID_4 = "90558670647417764794";
|
|
private final String DEVICE_GUID_5 = "90802100373808917949";
|
|
private final String DEVICE_GUID_6 = "90878497978270816672";
|
|
/**
|
* 实时获取温湿度,二氧化碳数据
|
*/
|
@GetMapping("/getRealData")
|
public AjaxResult getRealData() {
|
List<Map<String,String>> maps = realTimeEnergyConsumptionService
|
.getRealData(Arrays.
|
asList(DEVICE_GUID,
|
DEVICE_GUID_2,
|
DEVICE_GUID_3,
|
DEVICE_GUID_4,
|
DEVICE_GUID_5,
|
DEVICE_GUID_6));
|
return AjaxResult.success(maps);
|
}
|
|
}
|