package com.njcn.process.pojo.param;

import com.baomidou.mybatisplus.annotation.TableName;
import com.njcn.db.bo.BaseEntity;
import com.njcn.web.pojo.annotation.DateTimeStrValid;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author hongawen
 * @since 2023-06-21
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("supv_problem")
public class SupvProblemParam extends BaseParam {



    /**
     * 关联计划表
     */
    @ApiModelProperty(value = "关联计划表id",required = true)
    @NotBlank(message = "关联计划表不可为空")
    private String planId;

    /**
     * 责任单位id，取ISC平台上的组织id
     */
    @ApiModelProperty(value = "责任单位id，取ISC平台上的组织id",required = true)
    @NotBlank(message = "责任单位id不可为空")
    private String dutyOrgId;

    /**
     * 监测点类型 ，仅供电电压监督计划必填
     */
    @ApiModelProperty(value = "监测点类型 ，仅供电电压监督计划必填")
    private String monitorType;

    /**
     * 整改时间
     */
    @ApiModelProperty(value = "整改时间",required = true)
    @DateTimeStrValid(message = "整改时间格式有误")
    private String rectificationTime;

    /**
     * 计划整改时间
     */
    @ApiModelProperty(value = "计划整改时间",required = true)
    @NotNull(message = "计划整改时间不可为空")
    @DateTimeStrValid(message = "计划整改时间格式有误")
    private String planRectificationTime;

    /**
     * 是否发布预告警
     */
    @ApiModelProperty(value = "是否发布预告警",required = true)
    @NotNull(message = "是否发布预告警不可为空")
    private Integer ifReleaseWarning;

    /**
     * 问题描述
     */
    @ApiModelProperty(value = "问题简要描述")
    @NotBlank(message = "问题简要描述不可为空")
    private String simpleProblemDesc;



    /**
     * 监督标准序号
     */
    @ApiModelProperty(value = "监督标准序号")
    @NotBlank(message = "监督标准序号不可为空")
    private String supvStandardSort;

    /**
     * 问题描述
     */
    @ApiModelProperty(value = "问题描述")
    @NotBlank(message = "问题描述不可为空")
    private String problemDesc;

    /**
     * 监督标准
     */
    @ApiModelProperty(value = "监督标准",required = true)
    @NotBlank(message = "监督标准不可为空")
    private String supvStandard;

    /**
     * 标准出处
     */
    @ApiModelProperty(value = "标准出处",required = true)
    @NotBlank(message = "标准出处不可为空")
    private String supvResouce;

    /**
     * 问题等级	01 一般，02 较大
     */
    @ApiModelProperty(value = "问题等级",required = true)
    @NotBlank(message = "问题等级不可为空")
    private String problemLevel;

    /**
     * 定级依据
     */
    @ApiModelProperty(value = "定级依据",required = true)
    @NotBlank(message = "定级依据不可为空")
    private String problemLevelReason;

    /**
     * 问题类型
     */
    @ApiModelProperty(value = "问题类型",required = true)
    @NotBlank(message = "问题类型不可为空")
    private String problemType;

    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 整改方案
     */
    @ApiModelProperty(value = "整改方案",required = true)
    @NotBlank(message = "整改方案不可为空")
    private String rectificationProgramme;

    @ApiModelProperty(value = "整改措施")
    private String rectificationMeasure;

    /**
     * 整改情况01已整改，02未整改
     */
    @ApiModelProperty(value = "整改情况",required = true)
    @NotBlank(message = "整改情况不可为空")
    private String rectificationStatus;

    @NotBlank(message = "问题发现时间")
    @DateTimeStrValid(format="yyyy-MM-dd HH:mm:ss",message = "问题发现时间格式有误")
    private String discoveryTime;

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

    @EqualsAndHashCode(callSuper = true)
    @Data
    public static class UpdateSupvProblemParam extends SupvProblemParam{

        @ApiModelProperty(value = "索引",required = true)
        @NotBlank(message = "问题索引不可为空")
        private String problemId;
    }

}
