|
|
|
@ -1,7 +1,11 @@
|
|
|
|
|
package com.shxy.xymanager_common.entity;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
|
|
import cn.hutool.core.date.DateUnit;
|
|
|
|
|
import com.alibaba.excel.util.StringUtils;
|
|
|
|
|
import com.shxy.xymanager_common.util.MyDateUtils;
|
|
|
|
|
import com.shxy.xymanager_common.util.RawReportUtil;
|
|
|
|
|
import com.shxy.xymanager_common.util.xinyin.TerminalUtils;
|
|
|
|
|
import com.shxy.xymanager_common.vo.TerminalSelectVo;
|
|
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
@ -397,8 +401,27 @@ public class MntnStatus {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (vo.getIsonline() != null) {
|
|
|
|
|
if (vo.getIsonline().equals(this.getOnlinestatus())) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Integer getOnlinestatus() {
|
|
|
|
|
if (rawReportTime == null) {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
long time = MyDateUtils.TimeSecond2MillSecond(rawReportTime);
|
|
|
|
|
DateTime date = MyDateUtils.date(time);
|
|
|
|
|
long between = MyDateUtils.between(MyDateUtils.getNowDate(), date, DateUnit.MINUTE);
|
|
|
|
|
if (between > TerminalUtils.hearttime) {
|
|
|
|
|
return 0;
|
|
|
|
|
} else {
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|