package com.dxhy.portrait.business.entity;

import java.util.Date;
import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import com.baomidou.mybatisplus.annotation.TableField;
import com.dxhy.portrait.business.entity.ocr.OcrFlag;
import com.dxhy.portrait.business.entity.webservice.XStreamYMDDateConverter;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import com.thoughtworks.xstream.annotations.XStreamOmitField;

import lombok.Data;

/**
 * @author wyh
 */
@SuppressWarnings("AlibabaClassNamingShouldBeCamel")
@Data
@XStreamAlias("INVOICE")
@XmlJavaTypeAdapter(value = DataAdapter.class)
public class TDxScanInvoice {

    @XStreamOmitField
    private Long id;

    @XStreamOmitField
    private String fileType;

    @XStreamOmitField
    private String scanId;

    @XStreamOmitField
    private String scanRecordId;

    @XStreamOmitField
    private String selectId;

    @XStreamOmitField
    private String sourceSystem;

    @XStreamOmitField
    private String uuid;

    @XStreamOmitField
    private String dqskssq;

    @XStreamOmitField
    private String ewm;

    @XStreamOmitField
    private String isDomestic;

    @XStreamOmitField
    private String invoiceStatus;

    @XStreamOmitField
    private String taxRate;

    @XStreamOmitField
    private String ticketNumber;

    @XStreamOmitField
    private String ticketDepartureTime;

    @XStreamOmitField
    private String ticketArrivalTime;

    @XStreamOmitField
    private String reimbursementTime;

    @XStreamOmitField
    private String reimbursementStatus;

    @XStreamOmitField
    private String tag;

    @XStreamOmitField
    private String rzhYesorno;

    @XStreamOmitField
    private String qzStatus;

    @XStreamOmitField
    private String orientation;

    @XStreamOmitField
    private String region;

    @XStreamOmitField
    private Date createDate;

    @XStreamOmitField
    private Date updateDate;

    @XStreamAlias("GUID")
    @TableField(exist = false)
    private String guid;

    @XStreamAlias("SVR_GUID")
    private String svrGuid;

    @XStreamAlias("INV_TYPE")
    private String invoiceType;

    @XStreamAlias("INV_NO")
    private String invoiceNo;

    @XStreamAlias("INV_CODE")
    private String invoiceCode;

    @XStreamAlias("INV_DATE")
    @XStreamConverter(value = XStreamYMDDateConverter.class)
    private Date invoiceDate;

    @XStreamAlias("INV_MACHINE_NO")
    private String invoiceMachineNo;

    @XmlJavaTypeAdapter(value = DataAdapter.class)
    @XmlElement(required = true, nillable = true)
    @XStreamAlias("BUYER_TAX_CODE")
    private String gfTaxNo;

    @XStreamAlias("BUYER_NAME")
    private String gfName;

    @XStreamAlias("BUYER_ADDRESS_TEL")
    private String gfAddressAndPhone;

    @XStreamAlias("BUYER_BANK_ACCOUNT")
    private String gfBankAndNo;

    @XStreamAlias("SALER_TAX_CODE")
    private String xfTaxNo;

    @XStreamAlias("SALLER_NAME")
    private String xfName;

    @XStreamAlias("SALER_ADDRESS_TEL")
    private String xfAddressAndPhone;

    @XStreamAlias("SALER_BANK_ACCOUNT")
    private String xfBankAndNo;

    @XStreamAlias("INV_AMOUNT")
    private String invoiceAmount;

    /**
     * 公司定义的价税合计
     */
    @XStreamAlias("TOTAL_AMOUNT")
    @XmlJavaTypeAdapter(value = DataAdapter.class)
    @XmlElement(required = true, nillable = true)
    private String totalAmount;

    @XStreamAlias("INV_TAX")
    @XmlJavaTypeAdapter(value = DataAdapter.class)
    @XmlElement(required = true, nillable = true)
    private String taxAmount;

    /**
     * 汽车之家定义的价税合计
     */
    @XStreamAlias("INV_TOTAL")
    @TableField(exist = false)
    private String invTotal;

    /**
     * 是否作废
     */
    @XStreamAlias("IS_CANCELED")
    @TableField(exist = false)
    private String isCanceled;

    @XStreamAlias("CHECK_STATE")
    private String checkState;

    @XStreamAlias("INV_CURRENCY")
    private String invoiceCurrency;

    @XStreamAlias("INV_PO")
    private String invoicePo;

    @XStreamAlias("INV_CHECKCODE")
    private String checkCode;

    @XStreamAlias("INV_TAXBOX")
    private String invoiceTaxbox;

    @XStreamAlias("INV_REMARK")
    private String remark;

    @XStreamAlias("INV_IS_RED")
    @TableField(exist = false)
    private String isRed;

    @XStreamAlias("OCR_FLAG")
    @TableField(exist = false)
    private OcrFlag ocrFlag;

    @XStreamAlias("IS_DEDUCTIBLE")
    private String isDeduction;

    @XStreamAlias("IS_EXCEPTION")
    @TableField(exist = false)
    private String isException;

    @XStreamAlias("DEPART_CITY")
    private String departureCity;

    @XStreamAlias("ARRIVE_CITY")
    private String reachingCity;

    @XStreamAlias("TRAIN_NUMBER")
    private String trainNumber;

    @XStreamAlias("BILL_NAME")
    private String billName;

    @XStreamAlias("EXPENSE_TYPE")
    private String expenseType;

    @XStreamAlias("PASSENGER")
    private String passenger;

    @XStreamAlias("SEAT_LEVEL")
    private String seatLevel;

    @XStreamAlias("IDENTITY_NUMBER")
    private String passengerSfzh;

    @XStreamAlias("ELECTRONIC_TICKET_NUMBER")
    @TableField(exist = false)
    private String electronicTicketNumber;

    @XStreamAlias("ISSUE_BY")
    private String issueBy;

    @XStreamAlias("DATE_OF_ISSUE")
    @TableField(exist = false)
    private String dateOfIssue;

    @XStreamAlias("FLIGHT_NUMBER")
    @TableField(exist = false)
    private String flightNumber;

    @XStreamAlias("INVOICE_COUNT")
    private String invoiceCount;

    @XStreamAlias("FARE")
    private String fare;

    @XStreamAlias("CAAC_DEVELOPMENT_FUND")
    private String caacDevelopmentFund;

    @XStreamAlias("FUEL_SURCHARGE")
    private String fuelSurcharge;

    @XStreamAlias("IMAGE_PATH")
    @TableField(exist = false)
    private String imagePath;

    @XStreamAlias("DETAILS")
    @TableField(exist = false)
    private List<TDxScanInvoiceDetail> detailList;

    /////// 后添加项 ///////

    @TableField(exist = false)
    @XStreamOmitField
    private String userId;

    @TableField(exist = false)
    private String invoiceTypeString;

}
