package com.njcn.supervision.pojo.vo.user;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.njcn.supervision.pojo.po.user.UserReportProjectPO;
import com.njcn.supervision.pojo.po.user.UserReportSensitivePO;
import com.njcn.supervision.pojo.po.user.UserReportSubstationPO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 *
 * Description:
 * Date: 2024/4/25  10:07【需求编号】
 *
 * @author clam
 * @version V1.0.0
 */
@Data
public class UserReportVO {
    private String Id;
    /**
     * 填报人
     */
    @ApiModelProperty(value = "填报人")
    private String reporter;

    @ApiModelProperty(value = "填报人名称")
    private String reporterName;

    @ApiModelProperty(value = "二次评估id")
    private String secondAssessmentId;

    /**
     * 填报日期
     */
    @ApiModelProperty(value = "填报日期")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private LocalDate reportDate;

    /**
     * 填报部门
     */
    @ApiModelProperty(value = "填报部门")
    private String orgId;

    /**
     * 填报部门
     */
    @ApiModelProperty(value = "填报部门名称")
    private String orgName;

    /**
     * 工程预期投产日期
     */
    @ApiModelProperty(value = "工程预期投产日期")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private LocalDate expectedProductionDate;

    /**
     * 用户性质
     */
    @ApiModelProperty(value = "用户性质")
    private Integer userType;

    /**
     * 所属地市
     */
    @ApiModelProperty(value = "所属地市")
    private String city;

    /**
     * 归口管理部门
     */
    @ApiModelProperty(value = "归口管理部门")
    private String responsibleDepartment;

    /**
     * 用户状态
     */
    @ApiModelProperty(value = "用户状态")
    private Integer userStatus;


    /**
     * 变电站
     */
    @ApiModelProperty(value = "场站")
    private String substation;


    @ApiModelProperty(value = "变电站id")
    private String stationId;


    /**
     * 额定容量
     */
    @ApiModelProperty(value = "额定容量")
    private Double ratePower;


    @ApiModelProperty(value = "经度")
    private BigDecimal longitude;

    @ApiModelProperty(value = "纬度")
    private BigDecimal latitude;

    @ApiModelProperty(value = "检测报告")
    private String checkUrl;

    @ApiModelProperty(value = "历史检测报告")
    private String checkHistoryUrl;

    @ApiModelProperty(value = "评估报告")
    private String assessUrl;

    @ApiModelProperty(value = "其他附件")
    private String otherUrl;

    /**
     * 电压等级
     */
    @ApiModelProperty(value = "电压等级")
    private String voltageLevel;

    /**
     * 工程名称
     */
    @ApiModelProperty(value = "工程名称")
    private String projectName;

    /**
     * 预测评估单位
     */
    @ApiModelProperty(value = "预测评估单位")
    private String evaluationDept;

    /**
     * 预测评估结论
     */
    @ApiModelProperty(value = "预测评估结论")
    private String evaluationConclusion;

    /**
     * 流程实例的编号
     */
    @ApiModelProperty(value = "流程实例的编号")
    private String processInstanceId;

    @ApiModelProperty(value = "历史流程实例的编号")
    private String historyInstanceId;


    /**
     * 审批状态：1:审批中；2：审批通过；3：审批不通过；4：已取消
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 数据来源类型 0.正常流程审核入库 1.批量导入
     */
    @ApiModelProperty(value = "数据来源类型 0.正常流程审核入库 1.批量导入")
    private Integer dataType;

    private String createBy;
    /**
     * 是否需要治理
     */
    private Integer needGovernance;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime createTime;

    private UserReportProjectPO userReportProjectPO;

    private UserReportSensitivePO userReportSensitivePO;

    private UserReportSubstationPO userReportSubstationPO;

    @ApiModelProperty(value = "true可以点击治理  false不可以点击治理 ")
    private Boolean type;

    /**
     * 终端id
     */
    @ApiModelProperty(value = "终端id")
    private String devId;

    /**
     * 监测点id
     */
    @ApiModelProperty(value = "监测点id")
    private String lineId;

    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class UserReportGoNetVO extends UserReportVO{
        /**
         * 入网评估报告和治理报告的文件路径名
         */
        @ApiModelProperty(value = "入网评估报告和治理报告的文件路径名")
        private String otherReport;

        @ApiModelProperty(value = "仿真治理评估告")
        private String simulationReport;

        private String userReportId;
    }

    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class UserReportListVO extends UserReportVO{

        @ApiModelProperty(value = "入网评估报告")
        private List<String> netInReport;

        @ApiModelProperty(value = "治理评估告")
        private List<String> governReport;

        @ApiModelProperty(value = "仿真治理评估告")
        private List<String> simulationReport;
    }
}
