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_seizure_stat
 */
public class HkSeizureStat 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 shift;

    @Excel(name = "当班大队", sort = 3)
    private String brigade;

    @Excel(name = "T1火种", sort = 4)
    private Integer t1FireSource;

    @Excel(name = "T1刀具", sort = 5)
    private Integer t1Knife;

    @Excel(name = "T1警械器具", sort = 6)
    private Integer t1PoliceWeapon;

    @Excel(name = "T1烟花爆竹", sort = 7)
    private Integer t1Firework;

    @Excel(name = "T1活体动物", sort = 8)
    private Integer t1LiveAnimal;

    @Excel(name = "T1腐蚀性物品", sort = 9)
    private Integer t1Corrosive;

    @Excel(name = "T1用假冒他", sort = 10)
    private Integer t1FakeId;

    @Excel(name = "T1爆炸装置", sort = 11)
    private Integer t1Explosive;

    @Excel(name = "T1工具", sort = 12)
    private Integer t1Tool;

    @Excel(name = "T1枪支弹药", sort = 13)
    private Integer t1GunAmmo;

    @Excel(name = "T1扫黄打非", sort = 14)
    private Integer t1Illegal;

    @Excel(name = "T1其他", sort = 15)
    private Integer t1Other;

    @Excel(name = "T2火种", sort = 16)
    private Integer t2FireSource;

    @Excel(name = "T2刀具", sort = 17)
    private Integer t2Knife;

    @Excel(name = "T2警械器具", sort = 18)
    private Integer t2PoliceWeapon;

    @Excel(name = "T2烟花爆竹", sort = 19)
    private Integer t2Firework;

    @Excel(name = "T2活体动物", sort = 20)
    private Integer t2LiveAnimal;

    @Excel(name = "T2腐蚀性物品", sort = 21)
    private Integer t2Corrosive;

    @Excel(name = "T2用假冒他", sort = 22)
    private Integer t2FakeId;

    @Excel(name = "T2爆炸装置", sort = 23)
    private Integer t2Explosive;

    @Excel(name = "T2工具", sort = 24)
    private Integer t2Tool;

    @Excel(name = "T2枪支弹药", sort = 25)
    private Integer t2GunAmmo;

    @Excel(name = "T2扫黄打非", sort = 26)
    private Integer t2Illegal;

    @Excel(name = "T2其他", sort = 27)
    private Integer t2Other;

    /** T1总数（计算值） */
    public Integer getT1Total() {
        return safe(t1FireSource) + safe(t1Knife) + safe(t1PoliceWeapon) + safe(t1Firework)
                + safe(t1LiveAnimal) + safe(t1Corrosive) + safe(t1FakeId) + safe(t1Explosive)
                + safe(t1Tool) + safe(t1GunAmmo) + safe(t1Illegal) + safe(t1Other);
    }

    /** T2总数（计算值） */
    public Integer getT2Total() {
        return safe(t2FireSource) + safe(t2Knife) + safe(t2PoliceWeapon) + safe(t2Firework)
                + safe(t2LiveAnimal) + safe(t2Corrosive) + safe(t2FakeId) + safe(t2Explosive)
                + safe(t2Tool) + safe(t2GunAmmo) + safe(t2Illegal) + safe(t2Other);
    }

    /** T1+T2总数（计算值） */
    public Integer getGrandTotal() {
        return getT1Total() + getT2Total();
    }

    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 getShift() { return shift; }
    public void setShift(String shift) { this.shift = shift; }

    public String getBrigade() { return brigade; }
    public void setBrigade(String brigade) { this.brigade = brigade; }

    public Integer getT1FireSource() { return t1FireSource; }
    public void setT1FireSource(Integer t1FireSource) { this.t1FireSource = t1FireSource; }

    public Integer getT1Knife() { return t1Knife; }
    public void setT1Knife(Integer t1Knife) { this.t1Knife = t1Knife; }

    public Integer getT1PoliceWeapon() { return t1PoliceWeapon; }
    public void setT1PoliceWeapon(Integer t1PoliceWeapon) { this.t1PoliceWeapon = t1PoliceWeapon; }

    public Integer getT1Firework() { return t1Firework; }
    public void setT1Firework(Integer t1Firework) { this.t1Firework = t1Firework; }

    public Integer getT1LiveAnimal() { return t1LiveAnimal; }
    public void setT1LiveAnimal(Integer t1LiveAnimal) { this.t1LiveAnimal = t1LiveAnimal; }

    public Integer getT1Corrosive() { return t1Corrosive; }
    public void setT1Corrosive(Integer t1Corrosive) { this.t1Corrosive = t1Corrosive; }

    public Integer getT1FakeId() { return t1FakeId; }
    public void setT1FakeId(Integer t1FakeId) { this.t1FakeId = t1FakeId; }

    public Integer getT1Explosive() { return t1Explosive; }
    public void setT1Explosive(Integer t1Explosive) { this.t1Explosive = t1Explosive; }

    public Integer getT1Tool() { return t1Tool; }
    public void setT1Tool(Integer t1Tool) { this.t1Tool = t1Tool; }

    public Integer getT1GunAmmo() { return t1GunAmmo; }
    public void setT1GunAmmo(Integer t1GunAmmo) { this.t1GunAmmo = t1GunAmmo; }

    public Integer getT1Illegal() { return t1Illegal; }
    public void setT1Illegal(Integer t1Illegal) { this.t1Illegal = t1Illegal; }

    public Integer getT1Other() { return t1Other; }
    public void setT1Other(Integer t1Other) { this.t1Other = t1Other; }

    public Integer getT2FireSource() { return t2FireSource; }
    public void setT2FireSource(Integer t2FireSource) { this.t2FireSource = t2FireSource; }

    public Integer getT2Knife() { return t2Knife; }
    public void setT2Knife(Integer t2Knife) { this.t2Knife = t2Knife; }

    public Integer getT2PoliceWeapon() { return t2PoliceWeapon; }
    public void setT2PoliceWeapon(Integer t2PoliceWeapon) { this.t2PoliceWeapon = t2PoliceWeapon; }

    public Integer getT2Firework() { return t2Firework; }
    public void setT2Firework(Integer t2Firework) { this.t2Firework = t2Firework; }

    public Integer getT2LiveAnimal() { return t2LiveAnimal; }
    public void setT2LiveAnimal(Integer t2LiveAnimal) { this.t2LiveAnimal = t2LiveAnimal; }

    public Integer getT2Corrosive() { return t2Corrosive; }
    public void setT2Corrosive(Integer t2Corrosive) { this.t2Corrosive = t2Corrosive; }

    public Integer getT2FakeId() { return t2FakeId; }
    public void setT2FakeId(Integer t2FakeId) { this.t2FakeId = t2FakeId; }

    public Integer getT2Explosive() { return t2Explosive; }
    public void setT2Explosive(Integer t2Explosive) { this.t2Explosive = t2Explosive; }

    public Integer getT2Tool() { return t2Tool; }
    public void setT2Tool(Integer t2Tool) { this.t2Tool = t2Tool; }

    public Integer getT2GunAmmo() { return t2GunAmmo; }
    public void setT2GunAmmo(Integer t2GunAmmo) { this.t2GunAmmo = t2GunAmmo; }

    public Integer getT2Illegal() { return t2Illegal; }
    public void setT2Illegal(Integer t2Illegal) { this.t2Illegal = t2Illegal; }

    public Integer getT2Other() { return t2Other; }
    public void setT2Other(Integer t2Other) { this.t2Other = t2Other; }
}
