package cn.cecep.talroad.domain.analysis;


import cn.cecep.talroad.common.core.annotation.Excel;
import cn.cecep.talroad.common.core.web.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;


/**
 * 管控期车辆异常分析对象 s_ra_ab_nalysis_low_car
 *
 * @author szhpt
 * @date 2023-03-24
 */
@ApiModel(value = "管控期车辆异常分析")
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("s_ra_ab_nalysis_low_car")
public class SRaAbNalysisLowCar extends BaseEntity {
    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "数据主键")
    /** 数据主键 */
    @TableId(value = "data_id", type = IdType.AUTO)
    private String dataId;


    @ApiModelProperty(value = "企业主键")
    /** 企业主键 */
//    @Excel(name = "企业主键")
    private String factoryId;


    @ApiModelProperty(value = "企业名称")
    /** 企业名称 */
    @Excel(name = "企业名称")
    private String factoryName;


    @ApiModelProperty(value = "行业类别名称(多个使用'、'拼接)")
    /** 行业类别名称(多个使用'、'拼接) */
    @Excel(name = "行业类别")
    private String industryCategoryName;


    @ApiModelProperty(value = "行业类别编码(多个使用'、'拼接)")
    /** 行业类别编码(多个使用'、'拼接) */
//    @Excel(name = "行业类别编码(多个使用'、'拼接)")
    private String industryCategoryCode;


    @ApiModelProperty(value = "所在区县名称")
    /** 所在区县名称 */
    @Excel(name = "所在区县")
    private String districtName;


    @ApiModelProperty(value = "所在区县编码")
    /** 所在区县编码 */
//    @Excel(name = "所在区县编码")
    private String districtCode;


    @ApiModelProperty(value = "绩效级别")
    /** 绩效级别 */
    @Excel(name = "绩效级别")
    private String performanceLevel;


    @ApiModelProperty(value = "$column.columnComment")
    /** $column.columnComment */
//    @Excel(name = "国四及以下车辆进出厂次数", readConverterExp = "$column.readConverterExp()")
    @TableField(exist = false)
    private String workingProcedure;


    @ApiModelProperty(value = "国四及以下车辆进出厂次数")
    /** 国四及以下车辆进出厂次数 */
    @Excel(name = "国四及以下车辆进出厂次数")
    private Long inOutNumber;


    @ApiModelProperty(value = "分析时间(原型中日期)")
    /** 分析时间(原型中日期) */
//    @Excel(name = "分析时间(原型中日期)")
    private Date analyseTime;

    @ApiModelProperty(value = "排放阶段")
    private String dischargeStage;
    @ApiModelProperty(value = "国五车辆进出厂次数")
    /** 国四及以下车辆进出厂次数 */
    @Excel(name = "国五车辆进出厂次数")
    private Long fiveNumber;
    @ApiModelProperty(value = "国六车辆进出厂次数")
    /** 国四及以下车辆进出厂次数 */
    @Excel(name = "国六车辆进出厂次数")
    private Long sixNumber;
    @ApiModelProperty(value = "新能源车辆进出厂次数")
    /** 国四及以下车辆进出厂次数 */
    @Excel(name = "新能源车辆进出厂次数")
    private Long neNumber;

    @TableField(exist = false)
    private String analyseTimeStr;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("dataId", getDataId())
                .append("factoryId", getFactoryId())
                .append("factoryName", getFactoryName())
                .append("industryCategoryName", getIndustryCategoryName())
                .append("industryCategoryCode", getIndustryCategoryCode())
                .append("districtName", getDistrictName())
                .append("districtCode", getDistrictCode())
                .append("performanceLevel", getPerformanceLevel())
                .append("workingProcedure", getWorkingProcedure())
                .append("inOutNumber", getInOutNumber())
                .append("updateTime", getUpdateTime())
                .append("createTime", getCreateTime())
                .append("analyseTime", getAnalyseTime())
                .append("fiveNumber", getFiveNumber())
                .append("sixNumber", getSixNumber())
                .append("neNumber", getNeNumber())
                .toString();
    }
    @Data
    public static
    class SRaAbNalysisLowCarEChartData{
        @ApiModelProperty(value = "分析时间(原型中日期)")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH")
        private Date analyseTime;
        @ApiModelProperty(value = "分析时间(原型中日期)")
        private String analyseTimeStr;
        @ApiModelProperty(value = "排放阶段")
        private String dischargeStage;
        @ApiModelProperty(value = "国五车辆进出厂次数")
        /** 国四及以下车辆进出厂次数 */
        private Long fiveNumber;
        @ApiModelProperty(value = "国六车辆进出厂次数")
        /** 国四及以下车辆进出厂次数 */
        private Long sixNumber;
        @ApiModelProperty(value = "新能源车辆进出厂次数")
        /** 国四及以下车辆进出厂次数 */
        private Long neNumber;
        @ApiModelProperty(value = "国四及以下车辆进出厂次数")
        /** 国四及以下车辆进出厂次数 */
        private Long inOutNumber;
        @TableField(exist = false)
        private int dataId;
    }

    @Data
    public static
    class SRaAbNalysisLowParkEChartData{
        @ApiModelProperty(value = "进厂")
        private Long inPark=0L;
        @ApiModelProperty(value = "出厂")
        private Long outPark=0L;
    }
}
