package com.jianshui.invoice.domain;

import java.math.BigDecimal;
import java.util.List;
import java.util.Date;
import java.util.Map;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.jianshui.common.annotation.Excel;
import com.jianshui.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 已开发票列表对象 invoice
 *
 * @author Gong Quanlin
 * @date 2022-03-08
 */
public class Invoice extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    private Long id;

    /**
     * bill_info表的bill_id
     */
    private Long billInfoId;

    /**
     * 销方ID
     */
    @Excel(name = "销方ID")
    private Long companyId;

    /**
     * 系统订单号
     */
    @Excel(name = "系统订单号")
    private String systemOrderno;

    /**
     * 客户订单号
     */
    @Excel(name = "客户订单号")
    private String outTradeOrderno;

    /**
     * 流水号
     */
    @Excel(name = "流水号")
    private String fpqqlsh;

    /**
     * 发票种类
     */
    @Excel(name = "发票种类")
    private String invoiceType;

    /**
     * 开票状态
     */
    @Excel(name = "开票状态")
    private Integer state;

    /**
     * 发票c_invoiceid
     */
    private String cInvoiceid;

    /**
     * 发票代码
     */
    @Excel(name = "发票代码")
    private String fpdm;

    /**
     * 发票号码
     */
    @Excel(name = "发票号码")
    private String fphm;

    /**
     * 开票日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开票日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date kprq;

    /**
     * 购方名称
     */
    @Excel(name = "购方名称")
    private String buyerName;

    /**
     * 购方税号
     */
    @Excel(name = "购方税号")
    private String buyerTaxnum;

    /**
     * 购方地址
     */
    @Excel(name = "购方地址")
    private String buyerAddress;

    /**
     * 购方电话
     */
    @Excel(name = "购方电话")
    private String buyerTelephone;

    /**
     * 购方开户行及账户
     */
    @Excel(name = "购方开户行及账户")
    private String buyerAccount;

    /**
     * 购方邮箱
     */
    @Excel(name = "购方邮箱")
    private String buyerEmail;

    /**
     * 购方联系电话，可空
     */
    @Excel(name = "购方联系电话，可空")
    private String buyerPhone;

    /**
     * 销方名称
     */
    @Excel(name = "销方名称")
    private String sellerName;

    /**
     * 销方税号
     */
    @Excel(name = "销方税号")
    private String sellerTaxnum;

    /**
     * 销方地址
     */
    @Excel(name = "销方地址")
    private String sellerAddress;

    /**
     * 销方电话
     */
    @Excel(name = "销方电话")
    private String sellerTelephone;

    /**
     * 销方开户行及账户
     */
    @Excel(name = "销方开户行及账户")
    private String sellerAccount;

    /**
     * 备注
     */
    @Excel(name = "备注")
    private String message;

    /**
     * 开票人
     */
    @Excel(name = "开票人")
    private String clerk;

    /**
     * 收款人
     */
    @Excel(name = "收款人")
    private String payee;

    /**
     * 复核人
     */
    @Excel(name = "复核人")
    private String checker;

    /**
     * 不含税金额
     */
    @Excel(name = "不含税金额")
    private BigDecimal taxfreeamt;

    /**
     * 税额
     */
    @Excel(name = "税额")
    private BigDecimal tax;

    /**
     * 含税金额
     */
    @Excel(name = "含税金额")
    private BigDecimal taxamt;

    /**
     * 原发票代码
     */
    @Excel(name = "原发票代码")
    private String originFpdm;

    /**
     * 原发票号码
     */
    @Excel(name = "原发票号码")
    private String originFphm;

    /**
     * 校验码
     */
    @Excel(name = "校验码")
    private String jym;

    /**
     * 二维码
     */
    @Excel(name = "二维码")
    private String qrCode;

    /**
     * 税控设备号
     */
    @Excel(name = "税控设备号")
    private String machineCode;

    /**
     * 发票密文
     */
    @Excel(name = "发票密文")
    private String cipherText;

    /**
     * 发票 pdf 地址
     */
    @Excel(name = "发票 pdf 地址")
    private String invoicePdfUrl;

    /**
     * 发票详情地址
     */
    @Excel(name = "发票详情地址")
    private String invoiceJpgUrl;

    @Excel(name = "存储方式")
    private String invoiceFileStorage;

    /**
     * 开票信息，成功或者失败的信息
     */
    @Excel(name = "开票信息，成功或者失败的信息")
    private String invoiceMsg;

    /**
     * 结果信息
     */
    @Excel(name = "结果信息")
    private String invoiceResultMsg;

    /**
     * 成品油标志
     */
    @Excel(name = "成品油标志")
    private String productOilFlag;

    /**
     * 清单标志
     */
    @Excel(name = "清单标志")
    private String qdbz;

    /**
     * ofdUrl
     */
    @Excel(name = "ofdUrl")
    private String cOfdUrl;

    /**
     * 分机号
     */
    @Excel(name = "分机号")
    private String fjh;

    /**
     * 终端号
     */
    @Excel(name = "终端号")
    private String terminalNumber;

    /**
     * 作废类型
     */
    // 作废类型，0-空白废票 1-正数废票 2-负数废票
    @Excel(name = "作废类型")
    private String deprecateType;

    /**
     * 作废原因
     */
    @Excel(name = "作废原因")
    private String deprecateReason;

    /**
     * 已开发票明细信息
     */
    @TableField(exist = false)
    private List<InvoiceDetail> invoiceDetailList;

    @JsonIgnore
    @JSONField(serialize = false)
    @TableField(exist = false)
    private String searchValue;
    @JsonIgnore
    @JSONField(serialize = false)
    @TableField(exist = false)
    private String remark;

    @TableField(exist = false)
    @JsonIgnore
    private Map<String, Object> params;


    /** 经办人姓名 */
    private String jbrxm;
    /** 经办人证件号码 */
    private String jbrzjhm;
    /** 经办人证件种类代码 */
    private String jbrzjzldm;
    /** 经办人纳税人识别号 */
    private String jrznsrsbh;
    /** 发票文件base64*/
    private String filedata;
    /** 全电纸质发票代码*/
    private String zzfpdm;
    /** 全电纸质发票号码*/
    private String zzfphm;


    public String getZzfpdm() {
        return zzfpdm;
    }

    public void setZzfpdm(String zzfpdm) {
        this.zzfpdm = zzfpdm;
    }

    public String getZzfphm() {
        return zzfphm;
    }

    public void setZzfphm(String zzfphm) {
        this.zzfphm = zzfphm;
    }


    public String getFiledata() {
        return filedata;
    }

    public void setFiledata(String filedata) {
        this.filedata = filedata;
    }

    @Override
    public String getSearchValue() {
        return searchValue;
    }

    @Override
    public void setSearchValue(String searchValue) {
        this.searchValue = searchValue;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public Map<String, Object> getParams() {
        return params;
    }

    @Override
    public void setParams(Map<String, Object> params) {
        this.params = params;
    }

    public String getJbrxm() {
        return jbrxm;
    }

    public void setJbrxm(String jbrxm) {
        this.jbrxm = jbrxm;
    }

    public String getJbrzjhm() {
        return jbrzjhm;
    }

    public void setJbrzjhm(String jbrzjhm) {
        this.jbrzjhm = jbrzjhm;
    }

    public String getJbrzjzldm() {
        return jbrzjzldm;
    }

    public void setJbrzjzldm(String jbrzjzldm) {
        this.jbrzjzldm = jbrzjzldm;
    }

    public String getJrznsrsbh() {
        return jrznsrsbh;
    }

    public void setJrznsrsbh(String jrznsrsbh) {
        this.jrznsrsbh = jrznsrsbh;
    }

    public String getJshj() {
        return jshj;
    }

    public void setJshj(String jshj) {
        this.jshj = jshj;
    }

    public String getTdyslxdm() {
        return tdyslxdm;
    }

    public void setTdyslxdm(String tdyslxdm) {
        this.tdyslxdm = tdyslxdm;
    }

    public String getTdywxx() {
        return tdywxx;
    }

    public void setTdywxx(String tdywxx) {
        this.tdywxx = tdywxx;
    }

    public String getExt() {
        return ext;
    }

    public void setExt(String ext) {
        this.ext = ext;
    }

    /** 价税合计 */
    private String jshj;
    /** 特定要素类型代码 */
    private String tdyslxdm;
    /** tdywxx金财数科字段 */
    private String tdywxx;
    /** ext金财数科字段 */
    private String ext;



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

    public Long getId() {
        return id;
    }

    public void setBillInfoId(Long billInfoId) {
        this.billInfoId = billInfoId;
    }

    public Long getBillInfoId() {
        return billInfoId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setSystemOrderno(String systemOrderno) {
        this.systemOrderno = systemOrderno;
    }

    public String getSystemOrderno() {
        return systemOrderno;
    }

    public void setOutTradeOrderno(String outTradeOrderno) {
        this.outTradeOrderno = outTradeOrderno;
    }

    public String getOutTradeOrderno() {
        return outTradeOrderno;
    }

    public void setFpqqlsh(String fpqqlsh) {
        this.fpqqlsh = fpqqlsh;
    }

    public String getFpqqlsh() {
        return fpqqlsh;
    }

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

    public String getInvoiceType() {
        return invoiceType;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getState() {
        return state;
    }

    public void setcInvoiceid(String cInvoiceid) {
        this.cInvoiceid = cInvoiceid;
    }

    public String getcInvoiceid() {
        return cInvoiceid;
    }

    public void setFpdm(String fpdm) {
        this.fpdm = fpdm;
    }

    public String getFpdm() {
        return fpdm;
    }

    public void setFphm(String fphm) {
        this.fphm = fphm;
    }

    public String getFphm() {
        return fphm;
    }

    public void setKprq(Date kprq) {
        this.kprq = kprq;
    }

    public Date getKprq() {
        return kprq;
    }

    public void setBuyerName(String buyerName) {
        this.buyerName = buyerName;
    }

    public String getBuyerName() {
        return buyerName;
    }

    public void setBuyerTaxnum(String buyerTaxnum) {
        this.buyerTaxnum = buyerTaxnum;
    }

    public String getBuyerTaxnum() {
        return buyerTaxnum;
    }

    public void setBuyerAddress(String buyerAddress) {
        this.buyerAddress = buyerAddress;
    }

    public String getBuyerAddress() {
        return buyerAddress;
    }

    public void setBuyerTelephone(String buyerTelephone) {
        this.buyerTelephone = buyerTelephone;
    }

    public String getBuyerTelephone() {
        return buyerTelephone;
    }

    public void setBuyerAccount(String buyerAccount) {
        this.buyerAccount = buyerAccount;
    }

    public String getBuyerAccount() {
        return buyerAccount;
    }

    public void setBuyerEmail(String buyerEmail) {
        this.buyerEmail = buyerEmail;
    }

    public String getBuyerEmail() {
        return buyerEmail;
    }

    public void setBuyerPhone(String buyerPhone) {
        this.buyerPhone = buyerPhone;
    }

    public String getBuyerPhone() {
        return buyerPhone;
    }

    public void setSellerName(String sellerName) {
        this.sellerName = sellerName;
    }

    public String getSellerName() {
        return sellerName;
    }

    public void setSellerTaxnum(String sellerTaxnum) {
        this.sellerTaxnum = sellerTaxnum;
    }

    public String getSellerTaxnum() {
        return sellerTaxnum;
    }

    public void setSellerAddress(String sellerAddress) {
        this.sellerAddress = sellerAddress;
    }

    public String getSellerAddress() {
        return sellerAddress;
    }

    public void setSellerTelephone(String sellerTelephone) {
        this.sellerTelephone = sellerTelephone;
    }

    public String getSellerTelephone() {
        return sellerTelephone;
    }

    public void setSellerAccount(String sellerAccount) {
        this.sellerAccount = sellerAccount;
    }

    public String getSellerAccount() {
        return sellerAccount;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getMessage() {
        return message;
    }

    public void setClerk(String clerk) {
        this.clerk = clerk;
    }

    public String getClerk() {
        return clerk;
    }

    public void setPayee(String payee) {
        this.payee = payee;
    }

    public String getPayee() {
        return payee;
    }

    public void setChecker(String checker) {
        this.checker = checker;
    }

    public String getChecker() {
        return checker;
    }

    public void setTaxfreeamt(BigDecimal taxfreeamt) {
        this.taxfreeamt = taxfreeamt;
    }

    public BigDecimal getTaxfreeamt() {
        return taxfreeamt;
    }

    public void setTax(BigDecimal tax) {
        this.tax = tax;
    }

    public BigDecimal getTax() {
        return tax;
    }

    public void setTaxamt(BigDecimal taxamt) {
        this.taxamt = taxamt;
    }

    public BigDecimal getTaxamt() {
        return taxamt;
    }

    public void setOriginFpdm(String originFpdm) {
        this.originFpdm = originFpdm;
    }

    public String getOriginFpdm() {
        return originFpdm;
    }

    public void setOriginFphm(String originFphm) {
        this.originFphm = originFphm;
    }

    public String getOriginFphm() {
        return originFphm;
    }

    public void setJym(String jym) {
        this.jym = jym;
    }

    public String getJym() {
        return jym;
    }

    public void setQrCode(String qrCode) {
        this.qrCode = qrCode;
    }

    public String getQrCode() {
        return qrCode;
    }

    public void setMachineCode(String machineCode) {
        this.machineCode = machineCode;
    }

    public String getMachineCode() {
        return machineCode;
    }

    public void setCipherText(String cipherText) {
        this.cipherText = cipherText;
    }

    public String getCipherText() {
        return cipherText;
    }

    public void setInvoicePdfUrl(String invoicePdfUrl) {
        this.invoicePdfUrl = invoicePdfUrl;
    }

    public String getInvoicePdfUrl() {
        return invoicePdfUrl;
    }

    public void setInvoiceJpgUrl(String invoiceJpgUrl) {
        this.invoiceJpgUrl = invoiceJpgUrl;
    }

    public String getInvoiceJpgUrl() {
        return invoiceJpgUrl;
    }

    public void setInvoiceMsg(String invoiceMsg) {
        this.invoiceMsg = invoiceMsg;
    }

    public String getInvoiceMsg() {
        return invoiceMsg;
    }

    public void setInvoiceResultMsg(String invoiceResultMsg) {
        this.invoiceResultMsg = invoiceResultMsg;
    }

    public String getInvoiceResultMsg() {
        return invoiceResultMsg;
    }

    public void setProductOilFlag(String productOilFlag) {
        this.productOilFlag = productOilFlag;
    }

    public String getProductOilFlag() {
        return productOilFlag;
    }

    public void setQdbz(String qdbz) {
        this.qdbz = qdbz;
    }

    public String getQdbz() {
        return qdbz;
    }

    public void setcOfdUrl(String cOfdUrl) {
        this.cOfdUrl = cOfdUrl;
    }

    public String getcOfdUrl() {
        return cOfdUrl;
    }

    public void setFjh(String fjh) {
        this.fjh = fjh;
    }

    public String getFjh() {
        return fjh;
    }

    public void setTerminalNumber(String terminalNumber) {
        this.terminalNumber = terminalNumber;
    }

    public String getTerminalNumber() {
        return terminalNumber;
    }

    public List<InvoiceDetail> getInvoiceDetailList() {
        return invoiceDetailList;
    }

    public void setInvoiceDetailList(List<InvoiceDetail> invoiceDetailList) {
        this.invoiceDetailList = invoiceDetailList;
    }

    public String getDeprecateType() {
        return deprecateType;
    }

    public void setDeprecateType(String deprecateType) {
        this.deprecateType = deprecateType;
    }

    public String getDeprecateReason() {
        return deprecateReason;
    }

    public void setDeprecateReason(String deprecateReason) {
        this.deprecateReason = deprecateReason;
    }

    public String getInvoiceFileStorage() {
        return invoiceFileStorage;
    }

    public void setInvoiceFileStorage(String invoiceFileStorage) {
        this.invoiceFileStorage = invoiceFileStorage;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("billInfoId", getBillInfoId())
                .append("companyId", getCompanyId())
                .append("systemOrderno", getSystemOrderno())
                .append("outTradeOrderno", getOutTradeOrderno())
                .append("fpqqlsh", getFpqqlsh())
                .append("invoiceType", getInvoiceType())
                .append("state", getState())
                .append("cInvoiceid", getcInvoiceid())
                .append("fpdm", getFpdm())
                .append("fphm", getFphm())
                .append("kprq", getKprq())
                .append("buyerName", getBuyerName())
                .append("buyerTaxnum", getBuyerTaxnum())
                .append("buyerAddress", getBuyerAddress())
                .append("buyerTelephone", getBuyerTelephone())
                .append("buyerAccount", getBuyerAccount())
                .append("buyerEmail", getBuyerEmail())
                .append("buyerPhone", getBuyerPhone())
                .append("sellerName", getSellerName())
                .append("sellerTaxnum", getSellerTaxnum())
                .append("sellerAddress", getSellerAddress())
                .append("sellerTelephone", getSellerTelephone())
                .append("sellerAccount", getSellerAccount())
                .append("message", getMessage())
                .append("clerk", getClerk())
                .append("payee", getPayee())
                .append("checker", getChecker())
                .append("taxfreeamt", getTaxfreeamt())
                .append("tax", getTax())
                .append("taxamt", getTaxamt())
                .append("originFpdm", getOriginFpdm())
                .append("originFphm", getOriginFphm())
                .append("jym", getJym())
                .append("qrCode", getQrCode())
                .append("machineCode", getMachineCode())
                .append("cipherText", getCipherText())
                .append("invoicePdfUrl", getInvoicePdfUrl())
                .append("invoiceJpgUrl", getInvoiceJpgUrl())
                .append("invoiceMsg", getInvoiceMsg())
                .append("invoiceResultMsg", getInvoiceResultMsg())
                .append("productOilFlag", getProductOilFlag())
                .append("qdbz", getQdbz())
                .append("cOfdUrl", getcOfdUrl())
                .append("fjh", getFjh())
                .append("terminalNumber", getTerminalNumber())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("invoiceDetailList", getInvoiceDetailList())
                .toString();
    }
}
