package com.ruoyi.back.domain;

import com.ruoyi.common.utils.StringUtils;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

/**
 * 数据处理对象 pd_process_data
 *
 * @author voluntary
 * @date 2022-12-09
 */
public class PdProcessData extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Boolean isForcRequest;
    private String idStr;
    private Long id;
    private Long maxId;

    /** 唯一标识值 */
    @Excel(name = "唯一标识值")
    private String udid;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String youzySignature;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String sign;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String eagleToken;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String uDfv;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String xToken;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String uToken;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String uDfs;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String wToken;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String contentType;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String host;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String userAgent;

    /** 请求参数 */
    @Excel(name = "请求参数")
    private String dataBinary;

    /** 请求url */
    @Excel(name = "请求url")
    private String compressed;

    /** 原始数据 */
    @Excel(name = "原始数据")
    private String originalData;

    /** 数据类型（院校线college，专业线profession，招生计划plan，提前批pre） */
    @Excel(name = "数据类型", readConverterExp = "院=校线college，专业线profession，招生计划plan，提前批pre")
    private String dataType;

    /** 学校编码 */
    @Excel(name = "学校编码")
    private String collegeCode;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String provinceCode;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String batch;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String course;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Integer year;

    /** 地区 */
    @Excel(name = "地区")
    private String location;
    private List<String> locations;
    private List<String> dataTypes;

    /** 学校名称 */
    @Excel(name = "学校名称")
    private String collegeName;

    /** 请求结果 */
    @Excel(name = "请求结果")
    private String result;
    private Integer isSuccess;

    public List<String> getDataTypes() {
        return dataTypes;
    }

    public PdProcessData setDataTypes(List<String> dataTypes) {
        this.dataTypes = dataTypes;
        return this;
    }

    public List<String> getLocations() {
        return locations;
    }

    public void setLocations(List<String> locations) {
        this.locations = locations;
    }

    public String getIdStr() {
        return idStr;
    }

    public void setIdStr(String idStr) {
        this.idStr = idStr;
    }

    public Boolean getForcRequest() {
        return isForcRequest;
    }

    public void setForcRequest(Boolean forcRequest) {
        isForcRequest = forcRequest;
    }

    public Long getMaxId() {
        return maxId;
    }

    public void setMaxId(Long maxId) {
        this.maxId = maxId;
    }

    public Integer getIsSuccess() {
        return isSuccess;
    }

    public PdProcessData setIsSuccess(Integer isSuccess) {
        this.isSuccess = isSuccess;
        return this;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setUdid(String udid)
    {
        this.udid = udid;
    }

    public String getUdid()
    {
        return udid;
    }
    public void setYouzySignature(String youzySignature)
    {
        this.youzySignature = youzySignature;
    }

    public String getYouzySignature()
    {
        return youzySignature;
    }
    public void setSign(String sign)
    {
        this.sign = sign;
    }

    public String getSign()
    {
        return sign;
    }
    public void setEagleToken(String eagleToken)
    {
        this.eagleToken = eagleToken;
    }

    public String getEagleToken()
    {
        return eagleToken;
    }
    public void setuDfv(String uDfv)
    {
        this.uDfv = uDfv;
    }

    public String getuDfv()
    {
        return uDfv;
    }
    public void setxToken(String xToken)
    {
        this.xToken = xToken;
    }

    public String getxToken()
    {
        return xToken;
    }
    public void setuToken(String uToken)
    {
        this.uToken = uToken;
    }

    public String getuToken()
    {
        return uToken;
    }
    public void setuDfs(String uDfs)
    {
        this.uDfs = uDfs;
    }

    public String getuDfs()
    {
        return uDfs;
    }
    public void setwToken(String wToken)
    {
        this.wToken = wToken;
    }

    public String getwToken()
    {
        return wToken;
    }
    public void setContentType(String contentType)
    {
        this.contentType = contentType;
    }

    public String getContentType()
    {
        return contentType;
    }
    public void setHost(String host)
    {
        this.host = host;
    }

    public String getHost()
    {
        return host;
    }
    public void setUserAgent(String userAgent)
    {
        this.userAgent = userAgent;
    }

    public String getUserAgent()
    {
        return userAgent;
    }
    public void setDataBinary(String dataBinary)
    {
        this.dataBinary = dataBinary;
    }

    public String getDataBinary()
    {
        return dataBinary;
    }
    public void setCompressed(String compressed)
    {
        this.compressed = compressed;
    }

    public String getCompressed()
    {
        return compressed;
    }
    public void setOriginalData(String originalData)
    {
        this.originalData = originalData;
    }

    public String getOriginalData()
    {
        return originalData;
    }
    public PdProcessData setDataType(String dataType)
    {
        this.dataType = dataType;
        return this;
    }

    public String getDataType()
    {
        return dataType;
    }
    public void setCollegeCode(String collegeCode)
    {
        this.collegeCode = collegeCode;
    }

    public String getCollegeCode()
    {
        return collegeCode;
    }
    public void setProvinceCode(String provinceCode)
    {
        this.provinceCode = provinceCode;
    }

    public String getProvinceCode()
    {
        return provinceCode;
    }
    public void setBatch(String batch)
    {
        this.batch = batch;
    }

    public String getBatch()
    {
        return batch;
    }
    public void setCourse(String course)
    {
        this.course = course;
    }

    public String getCourse()
    {
        return course;
    }
    public PdProcessData setYear(Integer year)
    {
        this.year = year;
        return this;
    }

    public Integer getYear()
    {
        return year;
    }
    public PdProcessData setLocation(String location)
    {
        this.location = location;
        return this;
    }

    public String getLocation()
    {
        return location;
    }
    public void setCollegeName(String collegeName)
    {
        this.collegeName = collegeName;
    }

    public String getCollegeName()
    {
        return collegeName;
    }
    public void setResult(String result)
    {
        this.result = result;
    }

    public String getResult()
    {
        return result;
    }

    public PdProcessData toLocations() {
        if (StringUtils.isNotBlank(location)) {
            this.setLocations(Arrays.asList(location.split(",")));
        }
        if (StringUtils.isNotBlank(dataType)) {
            this.setDataTypes(Arrays.asList(dataType.split(",")));
        }
        return this;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("udid", getUdid())
            .append("youzySignature", getYouzySignature())
            .append("sign", getSign())
            .append("eagleToken", getEagleToken())
            .append("uDfv", getuDfv())
            .append("xToken", getxToken())
            .append("uToken", getuToken())
            .append("uDfs", getuDfs())
            .append("wToken", getwToken())
            .append("contentType", getContentType())
            .append("host", getHost())
            .append("userAgent", getUserAgent())
            .append("dataBinary", getDataBinary())
            .append("compressed", getCompressed())
            .append("originalData", getOriginalData())
            .append("dataType", getDataType())
            .append("collegeCode", getCollegeCode())
            .append("provinceCode", getProvinceCode())
            .append("batch", getBatch())
            .append("course", getCourse())
            .append("year", getYear())
            .append("location", getLocation())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("collegeName", getCollegeName())
            .append("result", getResult())
            .toString();
    }

    @Data
    public static class RequestParam{
        private String collegeCode;
        private String provinceCode;
        private String batch;
        private String course;
        private Integer year;
    }
}
