package com.njcn.product.terminal.mysqlTerminal.pojo.param;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.product.terminal.mysqlTerminal.pojo.constant.ValidMessage;
import com.njcn.product.terminal.mysqlTerminal.pojo.po.UserReportProjectPO;
import com.njcn.product.terminal.mysqlTerminal.pojo.po.UserReportSensitivePO;
import com.njcn.product.terminal.mysqlTerminal.pojo.po.UserReportSubstationPO;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Pattern;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;

/**
 * Description:
 * Date: 2024/4/25  10:07【需求编号】
 *
 * @author clam
 * @version V1.0.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserReportParam {

    private String id;

    /**
     * 填报人
     */
    @ApiModelProperty(value = "填报人")
    private String reporter;

    /**
     * 填报日期
     */
    @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 = "归口管理部门")
    @Pattern(regexp = PatternRegex.DES32_REGEX, message = ValidMessage.DATA_TOO_LONG)
    private String responsibleDepartment;

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

    /**
     * 变电站
     */
    @ApiModelProperty(value = "变电站")
    @Pattern(regexp = PatternRegex.DES32_REGEX, message = ValidMessage.DATA_TOO_LONG)
    private String substation;

    /**
     * 变电站
     */
    @ApiModelProperty(value = "变电站id")
    @Pattern(regexp = PatternRegex.DES32_REGEX, message = ValidMessage.DATA_TOO_LONG)
    private String stationId;

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

    /**
     * 工程名称
     */
    @ApiModelProperty(value = "工程名称")
    @Pattern(regexp = PatternRegex.DES32_REGEX, message = ValidMessage.DATA_TOO_LONG)
    private String projectName;

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

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

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

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

    /**
     * 预测评估结论
     */
    @ApiModelProperty(value = "预测评估结论")
    @Pattern(regexp = PatternRegex.DES400_REGEX, message = ValidMessage.DATA_TOO_LONG)
    private String evaluationConclusion;

    @ApiModelProperty("发起人自选审批人 Map")
    private Map<String, List<String>> startUserSelectAssignees;


    @ApiModelProperty(value = "保存1,提交审批2")
    private String saveOrCheckflag;

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

    private UserReportProjectPO userReportProjectPO;

    private UserReportSensitivePO userReportSensitivePO;

    private UserReportSubstationPO userReportSubstationPO;


    /**
     * 流程实例的编号
     */

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

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

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

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

    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class UserReportUpdate extends UserReportParam {

        @ApiModelProperty("id")
        private String id;

    }

    /**
     * 分页查询实体
     */
    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class UserReportQueryParam extends BaseParam {

        @ApiModelProperty(value = "所属区域")
        private String city;

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

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

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

        @ApiModelProperty(value = "审核状态")
        private Integer status;

    }


}
