package com.sundot.airport.item.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sundot.airport.common.annotation.Excel;
import com.sundot.airport.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 劝阻充电宝数据 hk_persuade_power_bank
 */
public class HkPersuadePowerBank extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private Long id;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "日期", dateFormat = "yyyy-MM-dd", sort = 1)
    private Date recordDate;

    @Excel(name = "时间段", sort = 2)
    private String timeSlot;

    @Excel(name = "T1召回充电宝", sort = 3)
    private Integer t1Recall;

    @Excel(name = "T1无3C标识", sort = 4)
    private Integer t1No3c;

    @Excel(name = "T1标识不清", sort = 5)
    private Integer t1UnclearMark;

    @Excel(name = "T1超规数量", sort = 6)
    private Integer t1ExcessQty;

    @Excel(name = "T1邮寄", sort = 7)
    private Integer t1Mail;

    @Excel(name = "T1自弃", sort = 8)
    private Integer t1Abandon;

    @Excel(name = "T1暂存", sort = 9)
    private Integer t1TempStore;

    @Excel(name = "T2召回充电宝", sort = 10)
    private Integer t2Recall;

    @Excel(name = "T2无3C标识", sort = 11)
    private Integer t2No3c;

    @Excel(name = "T2标识不清", sort = 12)
    private Integer t2UnclearMark;

    @Excel(name = "T2超规数量", sort = 13)
    private Integer t2ExcessQty;

    @Excel(name = "T2邮寄", sort = 14)
    private Integer t2Mail;

    @Excel(name = "T2自弃", sort = 15)
    private Integer t2Abandon;

    @Excel(name = "T2暂存", sort = 16)
    private Integer t2TempStore;

    /** T1总数（计算值） */
    public Integer getT1Total() {
        return safe(t1Recall) + safe(t1No3c) + safe(t1UnclearMark) + safe(t1ExcessQty)
                + safe(t1Mail) + safe(t1Abandon) + safe(t1TempStore);
    }

    /** T2总数（计算值） */
    public Integer getT2Total() {
        return safe(t2Recall) + safe(t2No3c) + safe(t2UnclearMark) + safe(t2ExcessQty)
                + safe(t2Mail) + safe(t2Abandon) + safe(t2TempStore);
    }

    /** 两楼总数（计算值） */
    public Integer getBothTotal() { return getT1Total() + getT2Total(); }

    /** 邮寄总数（计算值） */
    public Integer getMailTotal() { return safe(t1Mail) + safe(t2Mail); }

    /** 暂存总数（计算值） */
    public Integer getTempStoreTotal() { return safe(t1TempStore) + safe(t2TempStore); }

    private int safe(Integer v) { return v == null ? 0 : v; }

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

    public Date getRecordDate() { return recordDate; }
    public void setRecordDate(Date recordDate) { this.recordDate = recordDate; }

    public String getTimeSlot() { return timeSlot; }
    public void setTimeSlot(String timeSlot) { this.timeSlot = timeSlot; }

    public Integer getT1Recall() { return t1Recall; }
    public void setT1Recall(Integer t1Recall) { this.t1Recall = t1Recall; }

    public Integer getT1No3c() { return t1No3c; }
    public void setT1No3c(Integer t1No3c) { this.t1No3c = t1No3c; }

    public Integer getT1UnclearMark() { return t1UnclearMark; }
    public void setT1UnclearMark(Integer t1UnclearMark) { this.t1UnclearMark = t1UnclearMark; }

    public Integer getT1ExcessQty() { return t1ExcessQty; }
    public void setT1ExcessQty(Integer t1ExcessQty) { this.t1ExcessQty = t1ExcessQty; }

    public Integer getT1Mail() { return t1Mail; }
    public void setT1Mail(Integer t1Mail) { this.t1Mail = t1Mail; }

    public Integer getT1Abandon() { return t1Abandon; }
    public void setT1Abandon(Integer t1Abandon) { this.t1Abandon = t1Abandon; }

    public Integer getT1TempStore() { return t1TempStore; }
    public void setT1TempStore(Integer t1TempStore) { this.t1TempStore = t1TempStore; }

    public Integer getT2Recall() { return t2Recall; }
    public void setT2Recall(Integer t2Recall) { this.t2Recall = t2Recall; }

    public Integer getT2No3c() { return t2No3c; }
    public void setT2No3c(Integer t2No3c) { this.t2No3c = t2No3c; }

    public Integer getT2UnclearMark() { return t2UnclearMark; }
    public void setT2UnclearMark(Integer t2UnclearMark) { this.t2UnclearMark = t2UnclearMark; }

    public Integer getT2ExcessQty() { return t2ExcessQty; }
    public void setT2ExcessQty(Integer t2ExcessQty) { this.t2ExcessQty = t2ExcessQty; }

    public Integer getT2Mail() { return t2Mail; }
    public void setT2Mail(Integer t2Mail) { this.t2Mail = t2Mail; }

    public Integer getT2Abandon() { return t2Abandon; }
    public void setT2Abandon(Integer t2Abandon) { this.t2Abandon = t2Abandon; }

    public Integer getT2TempStore() { return t2TempStore; }
    public void setT2TempStore(Integer t2TempStore) { this.t2TempStore = t2TempStore; }
}
