package com.inspect.task.domain;

import com.inspect.base.core.annotation.Excel;
import lombok.ToString;
import java.util.Objects;

@ToString
public class PatrolData implements Comparable<PatrolData> {
    @Excel(
            name = "设备"
    )
    private String deviceName;
    @Excel(
            name = "相机名"
    )
    private String channelName;
    @Excel(
            name = "系统"
    )
    private String deviceSource;
    @Excel(
            name = "点位名称"
    )
    private String pointName;
    @Excel(
            name = "点位ID"
    )
    private String pointId;
    @Excel(
            name = "状态"
    )
    private String warnStatus;
    @Excel(
            name = "算法名"
    )
    private String algName;
    @Excel(
            name = "读数"
    )
    private String resValue;
    @Excel(
            name = "初筛图片"
    )
    private String img;
    @Excel(
            name = "初筛结果"
    )
    private String filterDesc;

    @Excel(
            name = "光明大模型结果"
    )
    private String brightDesc;
    @Excel(
            name = "分析图片"
    )
    private String imgAnalyse;

    @Excel(
            name = "光明大模型分析图片"
    )
    private String brightImgAnalyse;
    @Excel(
            name = "分析结果"
    )
    private String desc;
    private String lineId;
    private String patrolTime;
    private String pointStatus;
    private String imgType;
    private String dataType;
    private String filter;
    private String requestId;
    private String resStatus;

    private String brightResStatus;
    private String areaName;
    private String areaId;
    private String algType;
    private String objectId;
    private String imageNormalUrlPath;

    private String filePath;
    private String suggestion;
    // 纠偏后的图片
    private String originalValue;

    private String taskPatrolId;


    public String warnStatus(String ws) {
        byte var3 = -1;
        switch(ws.hashCode()) {
            case 49:
                if(ws.equals("1")) {
                    var3 = 0;
                }
                break;
            case 50:
                if(ws.equals("2")) {
                    var3 = 1;
                }
        }

        switch(var3) {
            case 0:
                return "巡视正常";
            case 1:
                return "巡视异常";
            default:
                return "";
        }
    }

    public int compareTo(PatrolData o) {
        return this.resetStatus(this.resStatus) - this.resetStatus(o.getResStatus());
    }

    private int resetStatus(String resStatus) {
        switch (resStatus) {
            case "0":
                return 10;
            case "1":
                return 1;
            case "2":
                return 3;
            case "3":
                return 2;
            default:
                return 10;
        }
    }

    public boolean isSame(PatrolData pd) {
        return this.requestId != null && this.algType != null && this.requestId.equals(pd.getRequestId()) && this.algType.equals(pd.algType);
    }

    public String getDeviceName() {
        return this.deviceName;
    }

    public String getChannelName() {
        return this.channelName;
    }

    public String getDeviceSource() {
        return this.deviceSource;
    }

    public String getPointName() {
        return this.pointName;
    }
    public String getPointId() {
        return pointId;
    }
    public String getWarnStatus() {
        return this.warnStatus;
    }

    public String getAlgName() {
        return this.algName;
    }

    public String getResValue() {
        return this.resValue;
    }

    public String getImg() {
        return this.img;
    }

    public String getFilterDesc() {
        return this.filterDesc;
    }

    public String getBrightDesc() {
        return this.brightDesc;
    }

    public String getImgAnalyse() {
        return this.imgAnalyse;
    }

    public String getBrightImgAnalyse() {
        return this.brightImgAnalyse;
    }

    public String getDesc() {
        return this.desc;
    }

    public String getLineId() {
        return this.lineId;
    }

    public String getPatrolTime() {
        return this.patrolTime;
    }

    public String getPointStatus() {
        return this.pointStatus;
    }

    public String getImgType() {
        return this.imgType;
    }

    public String getDataType() {
        return this.dataType;
    }

    public String getFilter() {
        return this.filter;
    }

    public String getRequestId() {
        return this.requestId;
    }

    public String getResStatus() {
        return this.resStatus;
    }
    public String getBrightResStatus() {
        return this.brightResStatus;
    }

    public String getAreaName() {
        return this.areaName;
    }

    public String getAlgType() {
        return this.algType;
    }

    public String getObjectId() {
        return this.objectId;
    }

    public String getImageNormalUrlPath() {
        return this.imageNormalUrlPath;
    }

    public String getFilePath() {
        return this.filePath;
    }

    public String getSuggestion() {
        return this.suggestion;
    }

    public String getOriginalValue() {
        return originalValue;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    public void setDeviceSource(String deviceSource) {
        this.deviceSource = deviceSource;
    }

    public void setPointName(String pointName) {
        this.pointName = pointName;
    }
    public void setPointId(String pointId) {
        this.pointId = pointId;
    }
    public void setWarnStatus(String warnStatus) {
        this.warnStatus = warnStatus;
    }

    public void setAlgName(String algName) {
        this.algName = algName;
    }

    public void setResValue(String resValue) {
        this.resValue = resValue;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public void setFilterDesc(String filterDesc) {
        this.filterDesc = filterDesc;
    }

    public void setBrightDesc(String brightDesc) {
        this.brightDesc = brightDesc;
    }

    public void setImgAnalyse(String imgAnalyse) {
        this.imgAnalyse = imgAnalyse;
    }
    public void setBrightImgAnalyse(String brightImgAnalyse) {
        this.brightImgAnalyse = brightImgAnalyse;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public void setLineId(String lineId) {
        this.lineId = lineId;
    }

    public void setPatrolTime(String patrolTime) {
        this.patrolTime = patrolTime;
    }

    public void setPointStatus(String pointStatus) {
        this.pointStatus = pointStatus;
    }

    public void setImgType(String imgType) {
        this.imgType = imgType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    public void setFilter(String filter) {
        this.filter = filter;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public void setResStatus(String resStatus) {
        this.resStatus = resStatus;
    }
    public void setBrightResStatus(String brightResStatus) {
        this.brightResStatus = brightResStatus;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public void setAlgType(String algType) {
        this.algType = algType;
    }

    public void setObjectId(String objectId) {
        this.objectId = objectId;
    }

    public void setImageNormalUrlPath(String imageNormalUrlPath) {
        this.imageNormalUrlPath = imageNormalUrlPath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public void setSuggestion(String suggestion) {
        this.suggestion = suggestion;
    }

    public void setOriginalValue(String originalValue) {
        this.originalValue = originalValue;
    }

    public String getTaskPatrolId() {
        return taskPatrolId;
    }

    public void setTaskPatrolId(String taskPatrolId) {
        this.taskPatrolId = taskPatrolId;
    }

    public String getAreaId() {
        return areaId;
    }

    public void setAreaId(String areaId) {
        this.areaId = areaId;
    }

    protected boolean canEqual(Object other) {
        return other instanceof PatrolData;
    }


    @Override
    public boolean equals(Object object) {
        if (this == object) return true;
        if (object == null || getClass() != object.getClass()) return false;
        PatrolData that = (PatrolData) object;
        return Objects.equals(deviceName, that.deviceName) && Objects.equals(channelName, that.channelName) && Objects.equals(deviceSource, that.deviceSource) && Objects.equals(pointName, that.pointName) && Objects.equals(pointId, that.pointId) && Objects.equals(warnStatus, that.warnStatus) && Objects.equals(algName, that.algName) && Objects.equals(resValue, that.resValue) && Objects.equals(img, that.img) && Objects.equals(filterDesc, that.filterDesc) && Objects.equals(brightDesc, that.brightDesc) && Objects.equals(imgAnalyse, that.imgAnalyse) && Objects.equals(brightImgAnalyse, that.brightImgAnalyse) && Objects.equals(desc, that.desc) && Objects.equals(lineId, that.lineId) && Objects.equals(patrolTime, that.patrolTime) && Objects.equals(pointStatus, that.pointStatus) && Objects.equals(imgType, that.imgType) && Objects.equals(dataType, that.dataType) && Objects.equals(filter, that.filter) && Objects.equals(requestId, that.requestId) && Objects.equals(resStatus, that.resStatus) && Objects.equals(brightResStatus, that.brightResStatus) && Objects.equals(areaName, that.areaName) && Objects.equals(algType, that.algType) && Objects.equals(objectId, that.objectId) && Objects.equals(imageNormalUrlPath, that.imageNormalUrlPath) && Objects.equals(suggestion, that.suggestion) && Objects.equals(filePath, that.filePath);
    }

    @Override
    public int hashCode() {
        return Objects.hash(deviceName, channelName, deviceSource, pointName, pointId, warnStatus, algName, resValue, img, filterDesc, brightDesc, imgAnalyse, brightImgAnalyse, desc, lineId, patrolTime, pointStatus, imgType, dataType, filter, requestId, resStatus, brightResStatus, areaName, algType, objectId, imageNormalUrlPath, suggestion, filePath);
    }
}
