|
@@ -1,5 +1,7 @@
|
|
package com.bz.rmcp.alarm;
|
|
package com.bz.rmcp.alarm;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
|
+
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
import com.google.common.collect.Maps;
|
|
import com.google.common.collect.Maps;
|
|
|
|
|
|
import com.bz.rmcp.alarm.service.impl.DeviceAlarmServiceImpl;
|
|
import com.bz.rmcp.alarm.service.impl.DeviceAlarmServiceImpl;
|
|
@@ -33,12 +35,11 @@ public class AlarmTests {
|
|
|
|
|
|
@Test
|
|
@Test
|
|
public void alarm(){
|
|
public void alarm(){
|
|
- Map<String,Object> map = new HashMap<>();
|
|
|
|
- map.put("WSV",90);
|
|
|
|
- map.put("VALVE","01");
|
|
|
|
|
|
+ String json = "{\"VOL\":3.56,\"ALARM\":\"0\",\"VOL_STATUS\":\"0\",\"VALVE\":\"01\",\"WSV\":110,\"FORCED\":\"1\",\"DISTURB\":\"1\",\"OVERDRAFT\":\"1\"}";
|
|
|
|
+ Map<String,Object> map = JSON.parseObject(json, HashMap.class);
|
|
|
|
|
|
MeasureDataDto measureDataDto = new MeasureDataDto();
|
|
MeasureDataDto measureDataDto = new MeasureDataDto();
|
|
- measureDataDto.setDeviceId(870001919702208512L);
|
|
|
|
|
|
+ measureDataDto.setDeviceId(880829562492162048L);
|
|
measureDataDto.setReceiveDate(new Date());
|
|
measureDataDto.setReceiveDate(new Date());
|
|
measureDataDto.setMeasureMap(map);
|
|
measureDataDto.setMeasureMap(map);
|
|
|
|
|