package com.jianshui.invoice.domain;

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

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 com.jianshui.common.core.domain.entity.Companyservice;
import com.jianshui.invoice.domain.dto.DownloadRedInfoDTO;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 红字信息表对象 redinfo
 *
 * @author Gong Quanlin
 * @date 2022-03-29
 */

public class Redinfo extends BaseEntity {

    private static final long serialVersionUID = 1L;

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

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

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

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

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

    /**
     * bill_info表的bill_id
     */
    @Excel(name = "bill_info表的bill_id")
    private Long billInfoId;

    /**
     * 信息表编号
     */
    @Excel(name = "信息表编号")
    private String redInfoNo;

    /**
     * 信息表状态
     */
    @Excel(name = "信息表状态")
    private String redInfoStatus;

    /**
     * 信息表状态描述
     */
    @Excel(name = "信息表状态描述")
    private String redInfoMessage;

    /**
     * 信息表类型
     */
    @Excel(name = "信息表类型")
    private String redInfoType;

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

    /**
     * 信息表特殊标识
     */
    @Excel(name = "信息表特殊标识")
    private String redInfoSpecFlag;

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

    /**
     * 税种类别
     */
    @Excel(name = "税种类别")
    private String taxType;

    /**
     * 原发票开票日期
     */
    @Excel(name = "原发票开票日期")
    private String originKprq;

    /**
     * 多税率标志
     */
    @Excel(name = "多税率标志")
    private String multTaxRate;

    /**
     * 填开日期
     */
    @Excel(name = "填开日期")
    private String billInputTime;

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

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

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

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

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

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

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

    /**
     * 申请说明
     */
    @Excel(name = "申请说明")
    private String applyRemark;

    /**
     * 申请表pdf 地址
     */
    @Excel(name = "申请表pdf 地址")
    private String pdfUrl;

    /**
     * 商品编码版本号
     */
    @Excel(name = "商品编码版本号")
    private String bmbbh;

    /**
     * 营业税标志
     */
    @Excel(name = "营业税标志")
    private String businessTaxCode;

    /**
     * 申请时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date applyTime;

    /**
     * 发票种类 invoice_type（ p电子增值税普通发票 c增值税普通发票 s 增值税专用发票 e 收购发票 f 收购发票 r增值税普通发票）
     */
    @Excel(name = "发票种类 invoice_type", readConverterExp = "p=电子增值税普通发票,c=增值税普通发票,s=,增=值税专用发票,e=,收=购发票,f=,收=购发票,r=增值税普通发票")
    private String invoiceType;

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

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

    /**
     * 设备编号
     */
    @Excel(name = "设备编号")
    private String jspbh;

    /**
     * 所属月份
     */
    @Excel(name = "所属月份")
    private String ssyf;

    /**
     * 税率
     */
    @Excel(name = "税率")
    private BigDecimal taxrate;

    /**
     * 申请选择
     */
    @Excel(name = "申请选择")
    private String sqxz;

    /**
     * 经办人
     */
    @Excel(name = "经办人")
    private String jbr;

    /**
     * 申请方税号
     */
    @Excel(name = "申请方税号")
    private String reqnsrsbh;

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

    /**
     * 服务公司
     */
    @Excel(name = "服务公司")
    private String serviceSupplierKey;

    /**
     * 申请类别
     */
    @Excel(name = "申请类别")
    private Integer sqlb; // 申请类别,0为销方申请,1为购方申请

    @Excel(name = "回调地址")
    private String callbackUrl;

    public String getCallbackUrl() {
        return callbackUrl;
    }

    public void setCallbackUrl(String callbackUrl) {
        this.callbackUrl = callbackUrl;
    }

    /**
     * 红字信息表详情信息
     */
    @TableField(exist = false)
    private List<Redinfodetail> redinfodetailList;

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

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

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

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

    public Long getId() {
        return id;
    }

    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 setBillInfoId(Long billInfoId) {
        this.billInfoId = billInfoId;
    }

    public Long getBillInfoId() {
        return billInfoId;
    }

    public void setRedInfoNo(String redInfoNo) {
        this.redInfoNo = redInfoNo;
    }

    public String getRedInfoNo() {
        return redInfoNo;
    }

    public void setRedInfoStatus(String redInfoStatus) {
        this.redInfoStatus = redInfoStatus;
    }

    public String getRedInfoStatus() {
        return redInfoStatus;
    }

    public void setRedInfoMessage(String redInfoMessage) {
        this.redInfoMessage = redInfoMessage;
    }

    public String getRedInfoMessage() {
        return redInfoMessage;
    }

    public void setRedInfoType(String redInfoType) {
        this.redInfoType = redInfoType;
    }

    public String getRedInfoType() {
        return redInfoType;
    }

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

    public String getOriginFpdm() {
        return originFpdm;
    }

    public void setRedInfoSpecFlag(String redInfoSpecFlag) {
        this.redInfoSpecFlag = redInfoSpecFlag;
    }

    public String getRedInfoSpecFlag() {
        return redInfoSpecFlag;
    }

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

    public String getOriginFphm() {
        return originFphm;
    }

    public void setTaxType(String taxType) {
        this.taxType = taxType;
    }

    public String getTaxType() {
        return taxType;
    }

    public void setOriginKprq(String originKprq) {
        this.originKprq = originKprq;
    }

    public String getOriginKprq() {
        return originKprq;
    }

    public void setMultTaxRate(String multTaxRate) {
        this.multTaxRate = multTaxRate;
    }

    public String getMultTaxRate() {
        return multTaxRate;
    }

    public void setBillInputTime(String billInputTime) {
        this.billInputTime = billInputTime;
    }

    public String getBillInputTime() {
        return billInputTime;
    }

    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 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 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 setApplyRemark(String applyRemark) {
        this.applyRemark = applyRemark;
    }

    public String getApplyRemark() {
        return applyRemark;
    }

    public void setPdfUrl(String pdfUrl) {
        this.pdfUrl = pdfUrl;
    }

    public String getPdfUrl() {
        return pdfUrl;
    }

    public void setBmbbh(String bmbbh) {
        this.bmbbh = bmbbh;
    }

    public String getBmbbh() {
        return bmbbh;
    }

    public void setBusinessTaxCode(String businessTaxCode) {
        this.businessTaxCode = businessTaxCode;
    }

    public String getBusinessTaxCode() {
        return businessTaxCode;
    }

    public void setApplyTime(Date applyTime) {
        this.applyTime = applyTime;
    }

    public Date getApplyTime() {
        return applyTime;
    }

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

    public String getInvoiceType() {
        return invoiceType;
    }

    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 void setJspbh(String jspbh) {
        this.jspbh = jspbh;
    }

    public String getJspbh() {
        return jspbh;
    }

    public void setSsyf(String ssyf) {
        this.ssyf = ssyf;
    }

    public String getSsyf() {
        return ssyf;
    }

    public void setTaxrate(BigDecimal taxrate) {
        this.taxrate = taxrate;
    }

    public BigDecimal getTaxrate() {
        return taxrate;
    }

    public void setSqxz(String sqxz) {
        this.sqxz = sqxz;
    }

    public String getSqxz() {
        return sqxz;
    }

    public void setJbr(String jbr) {
        this.jbr = jbr;
    }

    public String getJbr() {
        return jbr;
    }

    public void setReqnsrsbh(String reqnsrsbh) {
        this.reqnsrsbh = reqnsrsbh;
    }

    public String getReqnsrsbh() {
        return reqnsrsbh;
    }

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

    public String getProductOilFlag() {
        return productOilFlag;
    }

    public List<Redinfodetail> getRedinfodetailList() {
        return redinfodetailList;
    }

    public void setRedinfodetailList(List<Redinfodetail> redinfodetailList) {
        this.redinfodetailList = redinfodetailList;
    }

    public String getServiceSupplierKey() {
        return serviceSupplierKey;
    }

    public void setServiceSupplierKey(String serviceSupplierKey) {
        this.serviceSupplierKey = serviceSupplierKey;
    }

    public Integer getSqlb() {
        if (sqlb == null) {
            sqlb = 0;
        }
        return sqlb;
    }

    public void setSqlb(Integer sqlb) {
        this.sqlb = sqlb;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("companyId", getCompanyId())
                .append("systemOrderno", getSystemOrderno())
                .append("outTradeOrderno", getOutTradeOrderno())
                .append("fpqqlsh", getFpqqlsh())
                .append("billInfoId", getBillInfoId())
                .append("redInfoNo", getRedInfoNo())
                .append("redInfoStatus", getRedInfoStatus())
                .append("redInfoMessage", getRedInfoMessage())
                .append("redInfoType", getRedInfoType())
                .append("originFpdm", getOriginFpdm())
                .append("redInfoSpecFlag", getRedInfoSpecFlag())
                .append("originFphm", getOriginFphm())
                .append("taxType", getTaxType())
                .append("originKprq", getOriginKprq())
                .append("multTaxRate", getMultTaxRate())
                .append("billInputTime", getBillInputTime())
                .append("buyerName", getBuyerName())
                .append("buyerTaxnum", getBuyerTaxnum())
                .append("sellerName", getSellerName())
                .append("sellerTaxnum", getSellerTaxnum())
                .append("taxfreeamt", getTaxfreeamt())
                .append("tax", getTax())
                .append("taxamt", getTaxamt())
                .append("applyRemark", getApplyRemark())
                .append("pdfUrl", getPdfUrl())
                .append("bmbbh", getBmbbh())
                .append("businessTaxCode", getBusinessTaxCode())
                .append("applyTime", getApplyTime())
                .append("invoiceType", getInvoiceType())
                .append("fjh", getFjh())
                .append("terminalNumber", getTerminalNumber())
                .append("jspbh", getJspbh())
                .append("ssyf", getSsyf())
                .append("taxrate", getTaxrate())
                .append("sqxz", getSqxz())
                .append("jbr", getJbr())
                .append("reqnsrsbh", getReqnsrsbh())
                .append("createBy", getCreateBy())
                .append("productOilFlag", getProductOilFlag())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("redinfodetailList", getRedinfodetailList())
                .toString();
    }
}
