package com.njcn.process.pojo.po;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.njcn.db.bo.BaseEntity;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

import lombok.Data;

/**
 * <p>
 *
 * </p>
 *
 * @author hongawen
 * @since 2023-06-21
 */
@Data
@TableName("supv_plan")
public class SupvPlan extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId
    private String planId;

    @TableField(exist = false)
    private String provinceId;

    @TableField(exist = false)
    private String provinceName;

    @TableField(exist = false)
    private String cityId;

    @TableField(exist = false)
    private String cityName;

    @TableField(exist = false)
    private String countyId;

    @TableField(exist = false)
    private String countyName;

    /**
     * 计划名称
     */
    private String workPlanName;

    /**
     * 监督类型
     */
    private String supvType;

    /**
     * 监督阶段
     */
    private String supvStage;

    /**
     * 监督单位
     */
    private String supvOrgId;

    /**
     * 监督单位
     */
    @TableField(exist = false)
    private String supvOrgName;

    /**
     * 计划监督时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate planSupvDate;

    /**
     * 计划编制人id
     */
    private String planUserId;

    @TableField(exist = false)
    private String planUserName;

    /**
     * 计划编制单位id
     */
    private String planOrgId;

    @TableField(exist = false)
    private String planOrgName;

    /**
     * 备注
     */
    private String otherRemark;

    /**
     * 计划执行开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private LocalDateTime effectStartTime;

    /**
     * 计划执行结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private LocalDateTime effectEndTime;


    /**
     * 实施状态
     */
    private String effectStatus;

    /**
     * 监督对象名称
     */

    private String supvObjName;

    /**
     * 监督对象id
     */
    private String supvObjId;

    /**
     * 对象类型
     */
    private String supvObjType;

    /**
     * 对象电压等级
     */
    private String objVoltageLevel;

    @TableField(exist = false)
    private String objVoltageLevelName;

    /**
     * 关联电站
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String substationName;


    /**
     * 关联电站电压等级
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String substationVoltageLevel;

    /**
     * 关联电站电压等级名称
     */
    @TableField(exist = false)
    private String substationVoltageLevelName;


    /**
     * 监督对象属性
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String objType;

    /**
     * 监督对象属性名称
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String objTypeName;

    /**
     * 监督对象协议容量(MVA)
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Double objCapacity;


    /**
     * 报告出具时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private LocalDateTime reportIssueTime;

    /**
     * 电能质量问题发生时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private LocalDateTime problemOcTime;


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

    /**
     * 删除标识	0否1是
     */
    private String deleteFlag = "0";
    /**
     * 计划状态	1新建2变更 3取消
     */
    private String planStatus;
    /**
     * 删除时间
     */
    private LocalDateTime deleteTime;
    /**
     * 实施人id
     */
    private String effectUserId;
    /**
     * 实施人姓名
     */
    private String effectUserName;

    /**
     * 计划来源
     */
    private String dataSource = "01";


    @TableField(exist = false)
    private List<SupvPlanRel> planRel;

}
