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_pending_confiscate
 */
public class HkPendingConfiscate 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 A区火种", sort = 3)
    private Integer t1AFireSource;

    @Excel(name = "T1 A区液态物品", sort = 4)
    private Integer t1ALiquid;

    @Excel(name = "T1 A区其他物品", sort = 5)
    private Integer t1AOther;

    @Excel(name = "T1 B区火种", sort = 6)
    private Integer t1BFireSource;

    @Excel(name = "T1 B区液态物品", sort = 7)
    private Integer t1BLiquid;

    @Excel(name = "T1 B区其他物品", sort = 8)
    private Integer t1BOther;

    @Excel(name = "T2国内火种", sort = 9)
    private Integer t2DomesticFireSource;

    @Excel(name = "T2国内液态物品", sort = 10)
    private Integer t2DomesticLiquid;

    @Excel(name = "T2国内其他物品", sort = 11)
    private Integer t2DomesticOther;

    @Excel(name = "T2国际火种", sort = 12)
    private Integer t2IntlFireSource;

    @Excel(name = "T2国际液态物品", sort = 13)
    private Integer t2IntlLiquid;

    @Excel(name = "T2国际其他物品", sort = 14)
    private Integer t2IntlOther;

    @Excel(name = "T2中转火种", sort = 15)
    private Integer t2TransitFireSource;

    @Excel(name = "T2中转液态物品", sort = 16)
    private Integer t2TransitLiquid;

    @Excel(name = "T2中转其他物品", sort = 17)
    private Integer t2TransitOther;

    /** 火种总数（计算值） */
    public Integer getFireSourceTotal() {
        return safe(t1AFireSource) + safe(t1BFireSource) + safe(t2DomesticFireSource)
                + safe(t2IntlFireSource) + safe(t2TransitFireSource);
    }

    /** 液态物品总数（计算值） */
    public Integer getLiquidTotal() {
        return safe(t1ALiquid) + safe(t1BLiquid) + safe(t2DomesticLiquid)
                + safe(t2IntlLiquid) + safe(t2TransitLiquid);
    }

    /** 其他物品总数（计算值） */
    public Integer getOtherTotal() {
        return safe(t1AOther) + safe(t1BOther) + safe(t2DomesticOther)
                + safe(t2IntlOther) + safe(t2TransitOther);
    }

    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 getT1AFireSource() { return t1AFireSource; }
    public void setT1AFireSource(Integer t1AFireSource) { this.t1AFireSource = t1AFireSource; }

    public Integer getT1ALiquid() { return t1ALiquid; }
    public void setT1ALiquid(Integer t1ALiquid) { this.t1ALiquid = t1ALiquid; }

    public Integer getT1AOther() { return t1AOther; }
    public void setT1AOther(Integer t1AOther) { this.t1AOther = t1AOther; }

    public Integer getT1BFireSource() { return t1BFireSource; }
    public void setT1BFireSource(Integer t1BFireSource) { this.t1BFireSource = t1BFireSource; }

    public Integer getT1BLiquid() { return t1BLiquid; }
    public void setT1BLiquid(Integer t1BLiquid) { this.t1BLiquid = t1BLiquid; }

    public Integer getT1BOther() { return t1BOther; }
    public void setT1BOther(Integer t1BOther) { this.t1BOther = t1BOther; }

    public Integer getT2DomesticFireSource() { return t2DomesticFireSource; }
    public void setT2DomesticFireSource(Integer t2DomesticFireSource) { this.t2DomesticFireSource = t2DomesticFireSource; }

    public Integer getT2DomesticLiquid() { return t2DomesticLiquid; }
    public void setT2DomesticLiquid(Integer t2DomesticLiquid) { this.t2DomesticLiquid = t2DomesticLiquid; }

    public Integer getT2DomesticOther() { return t2DomesticOther; }
    public void setT2DomesticOther(Integer t2DomesticOther) { this.t2DomesticOther = t2DomesticOther; }

    public Integer getT2IntlFireSource() { return t2IntlFireSource; }
    public void setT2IntlFireSource(Integer t2IntlFireSource) { this.t2IntlFireSource = t2IntlFireSource; }

    public Integer getT2IntlLiquid() { return t2IntlLiquid; }
    public void setT2IntlLiquid(Integer t2IntlLiquid) { this.t2IntlLiquid = t2IntlLiquid; }

    public Integer getT2IntlOther() { return t2IntlOther; }
    public void setT2IntlOther(Integer t2IntlOther) { this.t2IntlOther = t2IntlOther; }

    public Integer getT2TransitFireSource() { return t2TransitFireSource; }
    public void setT2TransitFireSource(Integer t2TransitFireSource) { this.t2TransitFireSource = t2TransitFireSource; }

    public Integer getT2TransitLiquid() { return t2TransitLiquid; }
    public void setT2TransitLiquid(Integer t2TransitLiquid) { this.t2TransitLiquid = t2TransitLiquid; }

    public Integer getT2TransitOther() { return t2TransitOther; }
    public void setT2TransitOther(Integer t2TransitOther) { this.t2TransitOther = t2TransitOther; }
}
