zxl
9 小时以前 3b0516a2959e25576e4f3fda697a3b025d06c8c9
ycl-server/src/main/java/com/ycl/platform/service/impl/UYErrorTypeCheckServiceImpl.java
@@ -19,6 +19,7 @@
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;
@@ -36,6 +37,7 @@
 */
@Service
@RequiredArgsConstructor
@Slf4j
public class UYErrorTypeCheckServiceImpl implements UYErrorTypeCheckService {
    private final WorkOrderService workOrderService;
@@ -56,27 +58,27 @@
                    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()) {
@@ -187,6 +189,8 @@
            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);
    }