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

import com.baomidou.mybatisplus.annotation.TableField;
import com.dayou.common.BaseEntity;
import java.time.LocalDateTime;
import java.util.Date;

import com.github.liangbaika.validate.annations.AbcValidate;
import com.github.liangbaika.validate.enums.Check;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.dayou.annotation.ExcelSheet;
import com.dayou.annotation.ExportCell;
import com.dayou.annotation.ImportCell;
/**
 * <p>
 * 产品提前出库申请
 * </p>
 *
 * @author wucl
 * @since 2023-12-12
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ExcelSheet(sheetName = "产品提前出库申请")
public class ProductionOutWarehouse extends BaseEntity {

    private static final long serialVersionUID=1L;

    /**
     * 业务类型
     */
    private String businessType;

    /**
     *订单id（个贷）
     */
    private Long orderId;

    /**
     * 产品id（大中型）
     */
    private Long productionId;

    /**
     * 报告号
     */
    private String reportNo;

    /**
     * 订单应收款id(个贷)
     */
    private Long orderFundId;

    /**
     * 产品应收款id(大中型)
     */
    @AbcValidate(required = true,message = "该产品还没分配实收款，无法申请。" , fun = Check.NotNull)
    private Long productionFundId;

    /**
     * 申请时实收款金额
     */
    @ImportCell
    @ExportCell(columnName = "申请时实收款金额")
    private BigDecimal realAmount;

    /**
     * 申请原因
     */
    @ImportCell
    @ExportCell(columnName = "申请原因")
    private String remark;

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

    /**
     * 部门审核状态（审核中/审核通过/审核拒绝）
     */
    private String departmentCheckState;
    /**
     * 部门审核人id
     */
    private Long departmentCheckerId;
    /**
     * 部门审核时间
     */
    private Date departmentCheckTime;
    /**
     * 部门审核回复（审核中/审核通过/审核拒绝/撤销）
     */
    private String departmentReply;
    /**
     * 财务审核状态（审核中/审核通过/审核拒绝）
     */
    private String financeCheckState;
    /**
     * 财务审核人id
     */
    private Long financeCheckerId;
    /**
     * 财务审核时间
     */
    private Date financeCheckTime;
    /**
     * 财务审核回复
     */
    private String financeReply;

    /**
     * 出库操作
     */
    private Boolean productionOut;

    @TableField(exist = false)
    private String applyName;
    @TableField(exist = false)
    private String checker;
    @TableField(exist = false)
    private BigDecimal standardAmount;
    @TableField(exist = false)
    private BigDecimal discount;
    @TableField(exist = false)
    private Boolean isPayAll;
    @TableField(exist = false)
    private BigDecimal xShouldAmount;
    @TableField(exist = false)
    private BigDecimal xRealAmount;
    @TableField(exist = false)
    private String departmentChecker;
    @TableField(exist = false)
    private String financeChecker;
    @TableField(exist = false)
    private BigDecimal shouldAmount;
    @TableField(exist = false)
    private Long businessId;
    /**
     * 0:部门 1：财务
     */
    @TableField(exist = false)
    private Boolean checkType;
    @TableField(exist = false)
    private String state;
    @TableField(exist = false)
    private String reply;
    @TableField(exist = false)
    private String nCode;

}
