| | |
| | | import enumeration.general.WorkOrderStatusEnum; |
| | | import lombok.Data; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | @Slf4j |
| | | public class UYErrorTypeCheckServiceImpl implements UYErrorTypeCheckService { |
| | | |
| | | private final WorkOrderService workOrderService; |
| | |
| | | WorkOrder workOrder = new WorkOrder(); |
| | | // 信号缺失 |
| | | if (-1 == item.getSigna1()) { |
| | | this.genWorkOrder(workOrder, ErrorType.SIGNAL_LOSS, item.getDeviceId()); |
| | | this.genWorkOrder(workOrder, ErrorType.ABNORMAL_PIC, item.getDeviceId()); |
| | | } |
| | | // 画面偏色 |
| | | if (-1 == item.getColor()) { |
| | | this.genWorkOrder(workOrder, ErrorType.SCREEN_COLOR_DEVIATION, item.getDeviceId()); |
| | | this.genWorkOrder(workOrder, ErrorType.ABNORMAL_PIC, item.getDeviceId()); |
| | | } |
| | | // 雪花干扰 |
| | | if (-1 == item.getSnow()) { |
| | | this.genWorkOrder(workOrder, ErrorType.SNOW_STORM, item.getDeviceId()); |
| | | this.genWorkOrder(workOrder, ErrorType.ABNORMAL_PIC, item.getDeviceId()); |
| | | } |
| | | // 条纹干扰 |
| | | if (-1 == item.getStripe()) { |
| | | this.genWorkOrder(workOrder, ErrorType.STRIPE_INTERFERENCE, item.getDeviceId()); |
| | | this.genWorkOrder(workOrder, ErrorType.ABNORMAL_PIC, item.getDeviceId()); |
| | | } |
| | | // 画面遮挡 |
| | | if (-1 == item.getShade()) { |
| | | this.genWorkOrder(workOrder, ErrorType.SCREEN_OCCLUSION, item.getDeviceId()); |
| | | this.genWorkOrder(workOrder, ErrorType.ABNORMAL_PIC, item.getDeviceId()); |
| | | } |
| | | // 清晰度异常 |
| | | if (-1 == item.getBlur()) { |
| | | this.genWorkOrder(workOrder, ErrorType.ABNORMAL_CLARITY, item.getDeviceId()); |
| | | this.genWorkOrder(workOrder, ErrorType.ABNORMAL_PIC, item.getDeviceId()); |
| | | } |
| | | // // 亮度异常 |
| | | // if (-1 == item.getLight()) { |
| | |
| | | // } |
| | | long checkTime = item.getCheckTime().getTime(); |
| | | long osdTime = item.getSetTime().getTime(); |
| | | Long timeDiff = (checkTime - osdTime) / 1000; |
| | | Long timeDiff = Math.abs((checkTime - osdTime) / 1000); |
| | | ywThresholdService.check(YwThreadConstants.Video_DiffTime, timeDiff, item.getDeviceNo(), ywThresholdMap, workOrder, CompareType.MORE_THAN_EQ, ErrorType.CLOCK_SKEW.getValue()); |
| | | return workOrder; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | log.error("osdCheck获得插入工单:{}",workOrderList); |
| | | workOrderService.innerAddWorkOrder(workOrderList); |
| | | } |
| | | |