package com.goafanti.common.model;

import com.goafanti.common.constant.AFTConstants;
import org.apache.commons.lang3.time.DateFormatUtils;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * t_order_invoice
 * @author
 */
public class TOrderInvoice implements Serializable {
    private Integer id;

    private String orderNo;

    /**
     * 类型 0省内 1外省
     */
    private Integer type;

    /**
     * 状态 0未提交 1处理中 2通过 3拒绝 4 撤销
     */
    private Integer status;

    /**
     * 拒绝原因
     */
    private String rejectReason;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 发票类型 0增值税专用发票 1增值税普通发票 2其他
     */
    private Integer invoiceType;

    /**
     * 单位名称
     */
    private String unitName;

    /**
     * 税号
     */
    private String taxNumber;

    /**
     * 金额
     */
    private BigDecimal amount;

    /**
     * 开户行
     */
    private String banks;

    /**
     * 开票内容及说明
     */
    private String content;

    /**
     * 单位地址
     */
    private String unitAddress;

    /**
     * 发票备注
     */
    private String invoiceRemarks;

    /**
     * 单位电话
     */
    private String unitMobile;

    /**
     * 凭证URL
     */
    private String voucherUrl;

    /**
     * 邮寄 0是 1否
     */
    private Integer post;

    /**
     * 收件人
     */
    private String addressee;

    /**
     * 收件人电话
     */
    private String addresseeMobile;

    /**
     * 收件人省
     */
    private Integer addresseeProvince;

    /**
     * 收件人市
     */
    private Integer addresseeCity;

    /**
     * 收件人区
     */
    private Integer addresseeArea;

    /**
     * 单位地址
     */
    private String recipientAddress;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 特批 0非特批 1待审核 2审核通过
     */
    private Integer approval;

    /**
     * 已开票金额(处理旧单)
     */
    private BigDecimal alreadyAmount;

    /**
     * 审核人员名称
     */
    private String examineName;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

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

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRejectReason() {
        return rejectReason;
    }

    public void setRejectReason(String rejectReason) {
        this.rejectReason = rejectReason;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Integer getInvoiceType() {
        return invoiceType;
    }

    public void setInvoiceType(Integer invoiceType) {
        this.invoiceType = invoiceType;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getTaxNumber() {
        return taxNumber;
    }

    public void setTaxNumber(String taxNumber) {
        this.taxNumber = taxNumber;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public String getBanks() {
        return banks;
    }

    public void setBanks(String banks) {
        this.banks = banks;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getUnitAddress() {
        return unitAddress;
    }

    public void setUnitAddress(String unitAddress) {
        this.unitAddress = unitAddress;
    }

    public String getInvoiceRemarks() {
        return invoiceRemarks;
    }

    public void setInvoiceRemarks(String invoiceRemarks) {
        this.invoiceRemarks = invoiceRemarks;
    }

    public String getUnitMobile() {
        return unitMobile;
    }

    public void setUnitMobile(String unitMobile) {
        this.unitMobile = unitMobile;
    }

    public String getVoucherUrl() {
        return voucherUrl;
    }

    public void setVoucherUrl(String voucherUrl) {
        this.voucherUrl = voucherUrl;
    }

    public Integer getPost() {
        return post;
    }

    public void setPost(Integer post) {
        this.post = post;
    }

    public String getAddressee() {
        return addressee;
    }

    public void setAddressee(String addressee) {
        this.addressee = addressee;
    }

    public String getAddresseeMobile() {
        return addresseeMobile;
    }

    public void setAddresseeMobile(String addresseeMobile) {
        this.addresseeMobile = addresseeMobile;
    }

    public Integer getAddresseeProvince() {
        return addresseeProvince;
    }

    public void setAddresseeProvince(Integer addresseeProvince) {
        this.addresseeProvince = addresseeProvince;
    }

    public Integer getAddresseeCity() {
        return addresseeCity;
    }

    public void setAddresseeCity(Integer addresseeCity) {
        this.addresseeCity = addresseeCity;
    }

    public Integer getAddresseeArea() {
        return addresseeArea;
    }

    public void setAddresseeArea(Integer addresseeArea) {
        this.addresseeArea = addresseeArea;
    }

    public String getRecipientAddress() {
        return recipientAddress;
    }

    public void setRecipientAddress(String recipientAddress) {
        this.recipientAddress = recipientAddress;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getApproval() {
        return approval;
    }

    public void setApproval(Integer approval) {
        this.approval = approval;
    }

    public BigDecimal getAlreadyAmount() {
        return alreadyAmount;
    }

    public void setAlreadyAmount(BigDecimal alreadyAmount) {
        this.alreadyAmount = alreadyAmount;
    }

    public String getExamineName() {
        return examineName;
    }

    public void setExamineName(String examineName) {
        this.examineName = examineName;
    }

    public String getCreateTimes() {
        if(this.createTime==null) {
            return null;
        }else {
            return DateFormatUtils.format(this.createTime, AFTConstants.YYYYMMDDHHMMSS);
        }

    }
}
