离线推送改为10分钟,新增高温低温预警日志
This commit is contained in:
parent
7947f18e96
commit
b44ca6e533
|
|
@ -90,8 +90,8 @@ public class MinaServerHandler extends IoHandlerAdapter {
|
|||
//离线时间
|
||||
jobGroup.setTimestamp(IfishUtil.format(new Date()));
|
||||
//10分钟后推送 update 30分钟
|
||||
jobGroup.setStartTime(new Date(System.currentTimeMillis() + 600000L * 3));
|
||||
// jobGroup.setStartTime(new Date(System.currentTimeMillis() + 60000L));
|
||||
// jobGroup.setStartTime(new Date(System.currentTimeMillis() + 600000L * 3));
|
||||
jobGroup.setStartTime(new Date(System.currentTimeMillis() + 600000L));
|
||||
scheduleJob.addJob(jobGroup);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -161,9 +161,11 @@ public class SomeServer {
|
|||
//推送类型
|
||||
Integer warnType = receive.getWarn_type() & 0xff;
|
||||
if(warnType==0){
|
||||
log.info("mac : " + strSrc + ", 低温预警 : " + receive);
|
||||
pushNotifcation(strSrc,PushTypeEnum.wendu_warn.getValue(),"温度达到"+(float)receive.getWendu()/10f+"℃,已低于"+(float)receive.getWarn_wendu()/10f+"℃,请及时查看!");
|
||||
}
|
||||
else if(warnType==1){
|
||||
log.info("mac : " + strSrc + ", 高温预警 : " + receive);
|
||||
pushNotifcation(strSrc,PushTypeEnum.wendu_warn.getValue(),"温度达到"+(float)receive.getWendu()/10f+"℃,已高于"+(float)receive.getWarn_wendu()/10f+"℃,请及时查看!");
|
||||
}
|
||||
else{
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ public class ServerDecode implements ProtocolDecoder {
|
|||
}
|
||||
//设备报警
|
||||
else if(check_code==9){
|
||||
log.info("length:[" + length + "];limit:[" + buf.limit() + "],HexDump:[" + buf.getHexDump() + "]");
|
||||
functionCode9(buf, out);
|
||||
}
|
||||
//模块版本指令
|
||||
|
|
|
|||
|
|
@ -38,5 +38,12 @@ public class OrderFunctionCode9 extends HeadModel implements Serializable {
|
|||
this.warn_wendu = warn_wendu;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OrderFunctionCode9{" +
|
||||
"warn_type=" + warn_type +
|
||||
", wendu=" + wendu +
|
||||
", warn_wendu=" + warn_wendu +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue