添加流量计设备实时数据相关接口以及定时任务,统计流量计设备在线数量等
This commit is contained in:
@ -83,15 +83,22 @@ public class DeviceOtherMsgConsumer {
|
||||
//收到定时报文
|
||||
if(JSONUtil.parseObj(data1).get("action").equals("timeMsg")){
|
||||
pumpUsageRecords.setMessageContent(JSONUtil.toJsonStr(jsonObject));
|
||||
int i = ngWaterPumpUsageRecordsMapper.insertNgWaterPumpUsageRecords(pumpUsageRecords);
|
||||
if(i<1){
|
||||
System.err.println("--------------------------保存使用记录失败!---------------------------");
|
||||
}
|
||||
// int i = ngWaterPumpUsageRecordsMapper.insertNgWaterPumpUsageRecords(pumpUsageRecords);
|
||||
// if(i<1){
|
||||
// System.err.println("--------------------------保存使用记录失败!---------------------------");
|
||||
// }
|
||||
}else if(JSONUtil.parseObj(data1).get("action").equals("safeMsg")){
|
||||
//续费在线状态
|
||||
updateDeviceOnlineStatus( productId,serialNumber);
|
||||
//保存数据
|
||||
pumpUsageRecords.setMessageContent(JSONUtil.toJsonStr(jsonObject));
|
||||
// int i = ngWaterPumpUsageRecordsMapper.insertNgWaterPumpUsageRecords(pumpUsageRecords);
|
||||
// if(i<1){
|
||||
// System.err.println("--------------------------保存使用记录失败!---------------------------");
|
||||
// }
|
||||
|
||||
}//开阀门,关阀门
|
||||
else if(JSONUtil.parseObj(data1).get("action").equals("startPump")||JSONUtil.parseObj(data1).get("action").equals("stopPump")){
|
||||
int i = ngWaterPumpUsageRecordsMapper.insertNgWaterPumpUsageRecords(pumpUsageRecords);
|
||||
if(i<1){
|
||||
System.err.println("--------------------------保存使用记录失败!---------------------------");
|
||||
|
Reference in New Issue
Block a user