工业级运维app手机api
fengxiang
2017-10-31 465d1f03afa058d9ce210f2fc48e5c06ce291a68
src/main/java/com/moral/monitor/listener/TaskListener.java
@@ -112,6 +112,7 @@
                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);
@@ -137,6 +138,9 @@
    }
    //三级警报值阀值
    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);