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 org.springframework.format.annotation.DateTimeFormat;

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

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




    /**
     * 计划名称
     */
    @ApiModelProperty(value = "计划名称",required = true)
    @NotBlank(message = "计划名称不可为空")
    private String workPlanName;

    /**
     * 监督单位
     */
    @ApiModelProperty(value = "监督单位",required = true)
    @NotBlank(message = "监督单位不可为空")
    private String supvOrgId;


    /**
     * 计划编制人id
     */
    @NotBlank(message = "计划编制人不可为空")
    private String planUserId;

    /**
     * 监督类型
     */
    @ApiModelProperty(value = "监督类型",required = true)
    @NotBlank(message = "监督类型不可为空")
    private String supvType;

    /**
     * 监督阶段
     */
    @ApiModelProperty(value = "监督阶段",required = true)
    @NotBlank(message = "监督阶段不可为空")
    private String supvStage;

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

    /**
     * 监督对象id
     */
    @ApiModelProperty(value = "监督对象id")
    private String supvObjId;

    /**
     * 监督对象名称
     */
    @ApiModelProperty(value = "监督对象名称")
    private String supvObjName;

    /**
     * 监督对象类型
     */
    @ApiModelProperty(value = "对象类型")
    private String supvObjType;

    /**
     * 监督对象电压等级
     */
    @ApiModelProperty(value = "对象电压等级")
    private String objVoltageLevel;

    /**
     * 关联电站
     */
    @ApiModelProperty(value = "关联电站")
    private String substationName;

    @ApiModelProperty(value = "关联电站电压等级")
    private String substationVoltageLevel;


    @ApiModelProperty(value = "监督对象属性")
    private String objType;

    @ApiModelProperty(value = "监督对象属性名称")
    private String objTypeName;

    @ApiModelProperty(value = "监督对象协议容量(MVA)")
    private Double objCapacity;

    /**
     * 计划执行开始时间
     */
    @ApiModelProperty(value = "计划执行开始时间",required = true)
    @DateTimeStrValid(format = "yyyy-MM-dd HH:mm:ss",message = "计划执行开始时间格式有误")
    private String effectStartTime;

    /**
     * 计划执行结束时间
     */
    @ApiModelProperty(value = "计划执行结束时间",required = true)
    @DateTimeStrValid(format = "yyyy-MM-dd HH:mm:ss",message = "计划执行结束时间格式有误")
    private String effectEndTime;

    /**
     * 报告出具时间
     */
    @ApiModelProperty(value = "报告出具时间",required = true)
    @DateTimeStrValid(message = "报告出具时间格式有误",format = "yyyy-MM-dd HH:mm:ss")
    private String reportIssueTime;

    /**
     * 电能质量问题发生时间
     */
    @ApiModelProperty(value = "电能质量问题发生时间",required = true)
    @DateTimeStrValid(message = "电能质量问题发生时间格式有误",format = "yyyy-MM-dd HH:mm:ss")
    private String problemOcTime;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注(其他要求)")
    private String otherRemark;


    /**
     * 计划编制单位id
     */
    @ApiModelProperty(value = "计划编制单位id")
    @NotBlank(message = "计划编制单位id不可为空")
    private String planOrgId;

    @ApiModelProperty(value = "实施状态")
    private String  effectStatus;

    @ApiModelProperty(value = "实施人")
    private String effectUserId;

    @ApiModelProperty(value = "计划状态")
    private String planStatus;

    @EqualsAndHashCode(callSuper = true)
    @Data
    public static class UpdateSupvPlanParam extends SupvPlanParam{

        @ApiModelProperty(value = "索引",required = true)
        @NotBlank(message = "计划索引不可为空")
        private String planId;

        @ApiModelProperty("其他要求")
        private String otherRemarkHis;

        @ApiModelProperty("调整原因")
        private String applyCommentHis;
    }

}
