| | |
| | | import com.ycl.utils.DateUtils; |
| | | import com.ycl.utils.StringUtils; |
| | | import constant.ApiConstants; |
| | | import constant.CheckConstants; |
| | | import enumeration.DeviceType; |
| | | import enumeration.general.AreaDeptEnum; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | Query pyQuery = new Query(Criteria |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(pyQuery, OsdCheckResult.class); |
| | | pointService.setDeviceTagByGB(checkResults); |
| | | pointService.setDeviceTagByGB(checkResults,CheckConstants.Rule_Category_Video); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(checkResults); |
| | | // 工单生成 |
| | |
| | | if (osdResult.getCheckTime() != null && osdResult.getOsdTime() != null) { |
| | | long checkTime = osdResult.getCheckTime().getTime(); |
| | | long osdTime = osdResult.getOsdTime().getTime(); |
| | | long timeDiff = (checkTime - osdTime) / 1000; |
| | | long timeDiff = Math.abs((checkTime - osdTime) / 1000); |
| | | if (timeDiff <= 60) { |
| | | osdCheckResult.setOsdTimeCorrect(ApiConstants.OSD_Correct); |
| | | } else { |