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

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.dayou.annotation.*;
import com.dayou.common.BaseEntity;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.dayou.enums.MainBusinessEnum;
import com.dayou.enums.ProductionEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.poi.ss.formula.functions.T;

/**
 * <p>
 * 大中型产品
 * </p>
 *
 * @author wucl
 * @since 2023-11-06
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ExcelSheet(sheetName = "大中型产品")
@LuceneResource(value = MainBusinessEnum.MAJOR_BUSINESS,serviceImplClassName = "majorProductionServiceImpl",
        menuName="正在进行",url="/major/list",checkField="ifSaveFile")
public class MajorProduction extends BaseEntity {

    private static final long serialVersionUID=1L;

    /**
     * 业务主id
     */
    private Long majorId;
    /**
     * 报告号
     */
    @LuceneSearchable("report_no")
    private String reportNo;

    /**
     * 产品类型
     */
    @ImportCell
    @ExportCell(columnName = "产品类型")
    private String production;

    /**
     * 签字人（产品类型为报告，签字人必填）
     */
    private String signatory;
    /**
     * 项目名称
     */
    @ImportCell
    @ExportCell(columnName = "项目名称")
    @LuceneSearchable
    private String name;

    /**
     * 委托方名称
     */
    @ImportCell
    @ExportCell(columnName = "委托方名称")
    @LuceneSearchable("client_name")
    private String clientName;

    /**
     * 委托方电话
     */
    @ImportCell
    @ExportCell(columnName = "委托方电话")
    private String clientTel;

    /**
     * 委托方地址
     */
    @ImportCell
    @ExportCell(columnName = "委托方地址")
    @LuceneSearchable("client_address")
    private String clientAddress;

    /**
     * 产权人
     */
    @ImportCell
    @ExportCell(columnName = "产权人")
    @LuceneSearchable
    private String owner;

    /**
     * 价值时点
     */
    @ImportCell
    @ExportCell(columnName = "价值时点")
    private LocalDate valueTiming;

    /**
     * 评估面积
     */
    @ImportCell
    @ExportCell(columnName = "评估面积")
    private BigDecimal evaluateAcreage;

    /**
     * 评估总价
     */
    @ImportCell
    @ExportCell(columnName = "评估总价")
    private BigDecimal evaluateAmount;

    /**
     * 评估单价
     */
    @ImportCell
    @ExportCell(columnName = "评估单价")
    private BigDecimal evaluatePrice;

    /**
     * 特殊情况说明
     */
    @ImportCell
    @ExportCell(columnName = "特殊情况说明")
    private String comment;

    /**
     *二维码路经
     */
    private String qrCode;

    /**
     * 验证二维码路经
     */
    private String validateCode;

    /**
     *库存状态（0：已入库  1：已出库）
     */
    private Boolean repertoryState;

    /**
     *入库时间
     */
    private Date repertoryInTime;

    /**
     *出库时间
     */
    private Date repertoryOutTime;

    /**
     *初审
     */
    private String firstCheck;

    /**
     *复审
     */
    private String secondCheck;

    /**
     *三审
     */
    private String thirdCheck;

    /**
     *归档审核
     */
    private Boolean saveFileCheck;

    /**
     *复审部归档审核
     */
    private Boolean saveFileSecondCheck;

    /**
     *是否归档
     */
    @LuceneSearchable(value="if_save_file",menuName = "已归档产品",url="/major/saveFileDone")
    private Boolean ifSaveFile;

    /**
     * 电子文档路经
     */
    private String filePath;

    /**
     * 已审核的电子文档路经
     */
    private String checkedFilePath;

    /**
     * 归档日期
     */
    private LocalDate saveFileDate;

    /**
     * 送达状态
     */
    private Boolean delivery;

    /**
     * 送达时间
     */
    private LocalDate deliveryDate;

    /**
     * 标准收费
     */
    private BigDecimal standardAmount;

    /**
     * 估价作业开始日期
     */
    private LocalDate workStartDate;

    /**
     * 估价作业结束日期
     */
    private LocalDate workEndDate;

    /**
     * 估价目的
     */
    private String workPurpose;

    /**
     * 是否上报协会（房地产）
     */
    private Boolean isSubmit = true;

    /**
     * 是否备案（土地）
     */
    private Boolean isRecord = false;

    /**
     * 第一报告人
     */
    private String mainWorker;

    /**
     * 第一报告人注册号
     */
    private String mainWorkerNo;

    /**
     * 第二报告人
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String minorWorker;

    /**
     * 第二报告人注册号
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String minorWorkerNo;

    /**
     * 第三报告人
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String smallWorker;

    /**
     * 第三报告人注册号
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String smallWorkerNo;

    /**
     * 不上报协会原因
     */
    private String notSubmitReason;

    /**
     * 不备案原因
     */
    private String notRecordReason;


    @TableField(exist = false)
    private List<Long> signatoryId;

    @TableField(exist = false)
    private List<T> filePathList = new ArrayList<>();

    @TableField(exist = false)
    private List<T> filePathList1 = new ArrayList<>();

    @TableField(exist = false)
    private String majorName;

    @TableField(exist = false)
    private Long nextInstanceNodeId;
    @TableField(exist = false)
    private Integer sequence;
    @TableField(exist = false)
    private Long productionFundId;
    @TableField(exist = false)
    private BigDecimal realAmount;
    @TableField(exist = false)
    private String afterProduction;
    @TableField(exist = false)
    private Boolean ifReverse;
    @TableField(exist = false)
    private String statementNo;

    /**
     * 订单应收款
     */
    @TableField(exist = false)
    private BigDecimal orderShouldAmount;
    /**
     * 产品应收款
     */
    @TableField(exist = false)
    private BigDecimal shouldAmount;
    @TableField(exist = false)
    private Integer printTimes;
    @TableField(exist = false)
    private String orderName;
    @TableField(exist = false)
    private String orderId;
    @TableField(exist = false)
    private Long businessId;
    @TableField(exist = false)
    private Long orderFundId;
    @TableField(exist = false)
    private String evaluateAim;
    @TableField(exist = false)
    private String businessObjectType;

    private LocalDateTime productionTime;

}
