| | |
| | | private TMonitorResult monitor; |
| | | private CheckPointUtil checkPointUtil; |
| | | private Integer times; |
| | | |
| | | public OnlineCheckThread(TMonitorResult monitor, CheckPointUtil checkPointUtil,Integer times) { |
| | | this.monitor = monitor; |
| | | this.checkPointUtil = checkPointUtil; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public TMonitorResult call() throws Exception { |
| | | public TMonitorResult call() { |
| | | TMonitorResult result = checkPointUtil.check(monitor); |
| | | // 一天内监测到离线1次以上,生成工单 |
| | | if (result.getOffLineCount() >= times) { |
| | |
| | | workOrder.setStatus(WorkOrderStatusEnum.DISTRIBUTED); |
| | | result.setWorkOrder(workOrder); |
| | | } |
| | | log.info("监测对象:"+result); |
| | | return result; |
| | | } |
| | | |