| | |
| | | History history = new History();
|
| | | history.setMac(mac);
|
| | | history.setMac_key(key);
|
| | | history.setTime(new Date(Long.parseLong(msgData.get("time"))));
|
| | | history.setSensor(sensor.getSensor());
|
| | | history.setMac_value(Double.valueOf(msgData.get(key)));
|
| | | histories.add(history);
|
| | |
| | | }
|
| | | //三级警报值阀值
|
| | | private static Map<String,Double[]> alarmLevles =new HashMap<String, Double[]>();
|
| | | /*
|
| | | * 设置三级警报阀值,把map数据结构转换成数组结构
|
| | | */
|
| | | @Value(value="alarmLevles.json")
|
| | | public void setAlarmLevles(String path) throws IOException {
|
| | | org.springframework.core.io.Resource resource = new ClassPathResource(path);
|