package com.dayou.entity;
import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.dayou.annotation.*;
import com.dayou.common.BaseEntity;
import java.time.LocalDate;
import lombok.Data;
import lombok.EqualsAndHashCode;

import static com.dayou.enums.MainBusinessEnum.FINANCE_MANAGEMENT;

/**
 * <p>
 * 财务开票
 * </p>
 *
 * @author wucl
 * @since 2023-12-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ExcelSheet(sheetName = "财务开票")
@LuceneResource(value = FINANCE_MANAGEMENT,serviceImplClassName = "financeInvoiceServiceImpl",menuName = "开票审批",url = "/finance/invoice/check")
public class FinanceInvoice extends BaseEntity {

    private static final long serialVersionUID=1L;

    /**
     * 实收款id
     */
    private Long realFundId;

    /**
     * 订单收款id
     */
    private Long orderFundId;

    /**
     * 产品收款id
     */
    private Long productionFundId;

    /**
     * 发票抬头
     */
    @ImportCell
    @ExportCell(columnName = "发票抬头")
    @LuceneSearchable
    @Excel(name = "发票抬头")
    private String title;

    /**
     * 发票类型
     */
    @ImportCell
    @ExportCell(columnName = "发票类型")
    private String type;

    /**
     * 税号
     */
    @ImportCell
    @ExportCell(columnName = "税号")
    @LuceneSearchable("tax_no")
    @Excel(name = "税号")
    private String taxNo;

    /**
     * 计划开票金额
     */
    @ImportCell
    @ExportCell(columnName = "计划开票金额")
    @Excel(name = "计划开票金额")
    private BigDecimal planAmount;

    /**
     * 实际开票金额
     */
    @ImportCell
    @ExportCell(columnName = "实际开票金额")
    private BigDecimal realAmount;

    /**
     * 计划开票日期
     */
    @ImportCell
    @ExportCell(columnName = "计划开票日期")
    @Excel(name = "计划开票日期")
    private LocalDate planMakeDate;

    /**
     * 实际开票时间
     */
    @ImportCell
    @ExportCell(columnName = "实际开票时间")
    private LocalDate realMakeDate;

    /**
     * 开票状态（审核中，驳回，作废，待开票，已开票）
     */
    @ImportCell
    @ExportCell(columnName = "开票状态（审核中，驳回，作废，待开票，已开票）")
    @Excel(name = "开票状态")
    private String state;

    /**
     * 驳回/作废原因
     */
    @ImportCell
    @ExportCell(columnName = "驳回/作废原因")
    private String reason;

    /**
     * 申请人id
     */
    private Long applyId;

    /**
     * 审核人id
     */
    private Long checkerId;

    /**
     * 开票人id
     */
    private Long makerId;

    /**
     * 开户银行
     */
    @ImportCell
    @ExportCell(columnName = "开户银行")
    private String bankName;

    /**
     * 银行账号
     */
    @ImportCell
    @ExportCell(columnName = "银行账号")
    private String bankAccount;

    /**
     * 银行地址
     */
    @ImportCell
    @ExportCell(columnName = "银行地址")
    private String bankAddress;

    /**
     * 银行电话
     */
    @ImportCell
    @ExportCell(columnName = "银行电话")
    private String bankTel;

    /**
     * 开票项目
     */
    @ImportCell
    @ExportCell(columnName = "开票项目")
    private String makeItem;

    /**
     * 项目数量
     */
    @ImportCell
    @ExportCell(columnName = "项目数量")
    private Integer itemQuantity;

    /**
     * 计量单位
     */
    @ImportCell
    @ExportCell(columnName = "计量单位")
    private String itemUnit;

    /**
     * 税点（%）
     */
    @ImportCell
    @ExportCell(columnName = "税点（%）")
    private BigDecimal taxRate;

    /**
     * 税额
     */
    @ImportCell
    @ExportCell(columnName = "税额")
    private BigDecimal taxAmount;

    /**
     * 发票号码
     */
    @ImportCell
    @ExportCell(columnName = "发票号码")
    private String ticketNo;

    @Excel(name = "订单号")
    @TableField(exist = false)
    private String orderId;

    @Excel(name = "订单名称")
    @TableField(exist = false)
    private String orderName;

    @Excel(name = "申请人")
    @TableField(exist = false)
    private String applyName;

    @TableField(exist = false)
    private Boolean isPayAll;

    @TableField(exist = false)
    private String pStartDate;

    @TableField(exist = false)
    private String pEndDate;

    /**
     * 实际开票时间起始
     */
    @TableField(exist = false)
    private String rStartDate;

    /**
     * 实际开票时间结束
     */
    @TableField(exist = false)
    private String rEndDate;

    /**
     * 作废时间起始
     */
    @TableField(exist = false)
    private String dStartDate;

    /**
     * 作废时间结束
     */
    @TableField(exist = false)
    private String dEndDate;

    @TableField(exist = false)
    private String aStartDate;

    @TableField(exist = false)
    private String aEndDate;

    /**
     * 备注
     */
    @ImportCell
    @ExportCell(columnName = "备注")
    @Excel(name = "备注")
    private String remark;

}
