package com.njcn.process.pojo.vo.gw;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.njcn.db.bo.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;

import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author hongawen
 * @since 2023-06-21
 */
@Getter
public class ProblemVO extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId
    private String problemId;

    /**
     * 所属网省id
     */
    @TableField(exist = false)
    private String provinceId;


    /**
     * 关联计划表
     */
    private String planId;

    /**
     * 责任单位id，取ISC平台上的组织id
     */
    private String dutyOrgId;

    @TableField(exist = false)
    private String dutyOrgName;

    /**
     * 监测点类型 ，仅供电电压监督计划必填
     */
    private String monitorType;

    /**
     * 整改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private LocalDateTime rectificationTime;

    /**
     * 计划整改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime planRectificationTime;

    /**
     * 是否发布预告警
     */
    private Integer ifReleaseWarning;

    /**
     * 问题简要描述
     */
    private String simpleProblemDesc;

    /**
     * 监督标准序号
     */
    private String supvStandardSort;

    /**
     * 问题描述
     */
    private String problemDesc;

    /**
     * 监督标准
     */
    private String supvStandard;

    /**
     * 标准出处
     */
    private String supvResouce;

    /**
     * 问题等级	01 一般，02 较大
     */
    private String problemLevel;

    /**
     * 定级依据
     */
    private String problemLevelReason;

    /**
     * 问题类型
     */
    private String problemType;

    /**
     * 整改方案
     */
    private String rectificationProgramme;

    /**
     * 整改情况01已整改，02未整改
     */
    private String rectificationStatus;


    /**
     * 整改措施
     */
    private String rectificationMeasure;


    /**
     * 0.以上送 1.未上送 2.取消上送
     */
    private Integer isUploadHead;

    /**
     * 备注
     */
    private String remark;

    @TableField(exist = false)
    @ApiModelProperty(name = "attachmentName", value = "盖章报告")
    private String attachmentName;


    @TableField(exist = false)
    @ApiModelProperty(name = "attachmentNameTwo", value = "佐证材料")
    private String attachmentNameTwo;

    /**
     * 问题发现时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime discoveryTime;


    @ApiModelProperty("告预警单id,当ifReleaseWarning为是时，必填")
    private String workAlarmId;


    public String getWorkAlarmId() {
        return workAlarmId;
    }

    public void setWorkAlarmId(String workAlarmId) {
        this.workAlarmId = workAlarmId;
    }

    public void setProblemId(String problemId) {
        if (StrUtil.isNotBlank(problemId)) {
            this.problemId = problemId;
        } else {
            this.problemId = null;
        }
    }

    public void setProvinceId(String provinceId) {
        if (StrUtil.isNotBlank(provinceId)) {
            this.provinceId = provinceId;
        } else {
            this.provinceId = null;
        }
    }

    public void setPlanId(String planId) {
        if (StrUtil.isNotBlank(planId)) {
            this.planId = planId;
        } else {
            this.planId = null;
        }
    }

    public void setDutyOrgId(String dutyOrgId) {
        if (StrUtil.isNotBlank(dutyOrgId)) {
            this.dutyOrgId = dutyOrgId;
        } else {
            this.dutyOrgId = null;
        }
    }

    public void setDutyOrgName(String dutyOrgName) {
        if (StrUtil.isNotBlank(dutyOrgName)) {
            this.dutyOrgName = dutyOrgName;
        } else {
            this.dutyOrgName = null;
        }
    }

    public void setMonitorType(String monitorType) {
        if (StrUtil.isNotBlank(monitorType)) {
            this.monitorType = monitorType;
        } else {
            this.monitorType = null;
        }
    }

    public void setRectificationTime(LocalDateTime rectificationTime) {
        this.rectificationTime = rectificationTime;
    }

    public void setPlanRectificationTime(LocalDateTime planRectificationTime) {
        this.planRectificationTime = planRectificationTime;
    }

    public void setIfReleaseWarning(Integer ifReleaseWarning) {
        this.ifReleaseWarning = ifReleaseWarning;
    }

    public void setSimpleProblemDesc(String simpleProblemDesc) {
        if (StrUtil.isNotBlank(simpleProblemDesc)) {
            this.simpleProblemDesc = simpleProblemDesc;
        } else {
            this.simpleProblemDesc = null;
        }
    }

    public void setSupvStandardSort(String supvStandardSort) {
        if (StrUtil.isNotBlank(supvStandardSort)) {
            this.supvStandardSort = supvStandardSort;
        } else {
            this.supvStandardSort = null;
        }
    }

    public void setProblemDesc(String problemDesc) {
        if (StrUtil.isNotBlank(problemDesc)) {
            this.problemDesc = problemDesc;
        } else {
            this.problemDesc = null;
        }
    }

    public void setSupvStandard(String supvStandard) {
        if (StrUtil.isNotBlank(supvStandard)) {
            this.supvStandard = supvStandard;
        } else {
            this.supvStandard = null;
        }
    }

    public void setSupvResouce(String supvResouce) {
        if (StrUtil.isNotBlank(supvResouce)) {
            this.supvResouce = supvResouce;
        } else {
            this.supvResouce = null;
        }
    }

    public void setProblemLevel(String problemLevel) {
        if (StrUtil.isNotBlank(problemLevel)) {
            this.problemLevel = problemLevel;
        } else {
            this.problemLevel = null;
        }
    }

    public void setProblemLevelReason(String problemLevelReason) {
        if (StrUtil.isNotBlank(problemLevelReason)) {
            this.problemLevelReason = problemLevelReason;
        } else {
            this.problemLevelReason = null;
        }
    }

    public void setProblemType(String problemType) {
        if (StrUtil.isNotBlank(problemType)) {
            this.problemType = problemType;
        } else {
            this.problemType = null;
        }
    }

    public void setRectificationProgramme(String rectificationProgramme) {
        if (StrUtil.isNotBlank(rectificationProgramme)) {
            this.rectificationProgramme = rectificationProgramme;
        } else {
            this.rectificationProgramme = null;
        }
    }

    public void setRectificationStatus(String rectificationStatus) {
        if (StrUtil.isNotBlank(rectificationStatus)) {
            this.rectificationStatus = rectificationStatus;
        } else {
            this.rectificationStatus = null;
        }
    }

    public void setRectificationMeasure(String rectificationMeasure) {
        if (StrUtil.isNotBlank(rectificationMeasure)) {
            this.rectificationMeasure = rectificationMeasure;
        } else {
            this.rectificationMeasure = null;
        }
    }

    public void setIsUploadHead(Integer isUploadHead) {
        this.isUploadHead = isUploadHead;
    }

    public void setRemark(String remark) {
        if (StrUtil.isNotBlank(remark)) {
            this.remark = remark;
        } else {
            this.remark = null;
        }
    }

    public void setAttachmentName(String attachmentName) {
        if (StrUtil.isNotBlank(attachmentName)) {
            this.attachmentName = attachmentName;
        } else {
            this.attachmentName = null;
        }
    }

    public void setAttachmentNameTwo(String attachmentNameTwo) {
        if (StrUtil.isNotBlank(attachmentNameTwo)) {
            this.attachmentNameTwo = attachmentNameTwo;
        } else {
            this.attachmentNameTwo = null;
        }
        this.attachmentNameTwo = attachmentNameTwo;
    }

    public void setDiscoveryTime(LocalDateTime discoveryTime) {
        this.discoveryTime = discoveryTime;
    }
}
