修改设备getRealTimeDataByDevicerId实时数据接口
This commit is contained in:
@ -10,10 +10,7 @@ import com.fastbee.common.core.domain.CommonResult;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
import com.fastbee.common.model.vo.TreeItemVo;
|
||||
import com.fastbee.common.model.vo.iot.GisDeviceListVo;
|
||||
import com.fastbee.common.utils.DateUtils;
|
||||
import com.fastbee.common.utils.DevParamsUtils;
|
||||
import com.fastbee.common.utils.SecurityUtils;
|
||||
import com.fastbee.common.utils.StringUtils;
|
||||
import com.fastbee.common.utils.*;
|
||||
import com.fastbee.data.service.gis.IGisDeviceService;
|
||||
import com.fastbee.iot.domain.Device;
|
||||
import com.fastbee.iot.domain.DeviceLog;
|
||||
@ -302,10 +299,12 @@ public class GisDeviceServiceImpl implements IGisDeviceService {
|
||||
}};
|
||||
List<DeviceLog> deviceLogs1 = liuliangCollect.get(thingsModel.getIdentifier());
|
||||
if(deviceLogs1.size() > 0){
|
||||
if(Float.parseFloat(deviceLogs1.get(0).getLogValue()) == 1f){
|
||||
hashMap1.put("value", "启动");
|
||||
}else{
|
||||
hashMap1.put("value", "停止");
|
||||
if(NumberUtils.isNumeric(deviceLogs1.get(0).getLogValue())){
|
||||
if(Float.parseFloat(deviceLogs1.get(0).getLogValue()) == 1f){
|
||||
hashMap1.put("value", "启动");
|
||||
}else{
|
||||
hashMap1.put("value", "停止");
|
||||
}
|
||||
}
|
||||
}
|
||||
rMap.put("水泵状态", hashMap1);
|
||||
@ -319,11 +318,16 @@ public class GisDeviceServiceImpl implements IGisDeviceService {
|
||||
}};
|
||||
List<DeviceLog> deviceLogs1 = liuliangCollect.get(thingsModel.getIdentifier());
|
||||
if(deviceLogs1.size() > 0){
|
||||
if(Float.parseFloat(deviceLogs1.get(0).getLogValue()) == 1f){
|
||||
hashMap1.put("value", "关闭");
|
||||
if(NumberUtils.isNumeric(deviceLogs1.get(0).getLogValue())){
|
||||
if(Float.parseFloat(deviceLogs1.get(0).getLogValue()) == 1f){
|
||||
hashMap1.put("value", "关闭");
|
||||
}else{
|
||||
hashMap1.put("value", "开启");
|
||||
}
|
||||
}else{
|
||||
hashMap1.put("value", "开启");
|
||||
hashMap1.put("value", "关闭");
|
||||
}
|
||||
|
||||
}
|
||||
rMap.put("阀门状态", hashMap1);
|
||||
}else if(thingsModel.getIdentifier().equals("三菱FX2N_1_FlowDown")){
|
||||
@ -336,11 +340,16 @@ public class GisDeviceServiceImpl implements IGisDeviceService {
|
||||
}};
|
||||
List<DeviceLog> deviceLogs1 = liuliangCollect.get(thingsModel.getIdentifier());
|
||||
if(deviceLogs1.size() > 0){
|
||||
if(Float.parseFloat(deviceLogs1.get(0).getLogValue()) == 1f){
|
||||
hashMap1.put("value", "断线");
|
||||
if(NumberUtils.isNumeric(deviceLogs1.get(0).getLogValue())){
|
||||
if(Float.parseFloat(deviceLogs1.get(0).getLogValue()) == 1f){
|
||||
hashMap1.put("value", "断线");
|
||||
}else{
|
||||
hashMap1.put("value", "正常");
|
||||
}
|
||||
}else{
|
||||
hashMap1.put("value", "正常");
|
||||
}
|
||||
|
||||
}
|
||||
rMap.put("阀门状态", hashMap1);
|
||||
}else{
|
||||
|
Reference in New Issue
Block a user