package com.bonus.material.part.domain;

import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 新购验收任务对象 purchase_check_info
 * @author syruan
 */
@EqualsAndHashCode(callSuper = false)
@Data
@ToString
public class PartTypeCheckInfo extends BaseEntity {

    private static final long serialVersionUID = 1335730477657434485L;

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

    /** 任务ID */
    //@Excel(name = "任务ID")
    @ApiModelProperty(value = "任务ID")
    private Long taskId;

    @ApiModelProperty(value = "任务状态")
    private Integer taskStatus;

    @Excel(name = "状态", sort = 8)
    @ApiModelProperty(value = "任务状态名称,未完成/已完成")
    private String taskStatusName;

    @Excel(name = "采购单号", sort = 1)
    @ApiModelProperty(value = "采购单号")
    private String code;

    /** 采购日期 */
    @ApiModelProperty(value = "采购日期")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date purchaseTime;

    /** 到货日期 */
    @ApiModelProperty(value = "到货日期")
    @NotNull(message = "到货日期不能为空")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "到货时间", width = 30, dateFormat = "yyyy-MM-dd", sort = 1)
    private Date arrivalTime;

    /** 采购员 */
    //@Excel(name = "采购员")
    @ApiModelProperty(value = "采购员")
    private Long purchaser;

    /** 物资厂家id */
    //@Excel(name = "物资厂家id")
    @ApiModelProperty(value = "物资厂家id")
    private Long supplierId;

    /** 物资厂家名称 */
    @Excel(name = "物资厂家", sort = 7)
    @ApiModelProperty(value = "物资厂家名称")
    private String supplier;

    /** 数据所属组织 */
    //@Excel(name = "数据所属组织")
    private Long companyId;

    /**
     * 采购物资
     */
    @Excel(name = "采购物资", sort = 2)
    @ApiModelProperty(value = "采购物资--外层Table字段")
    private String purchaseMaTypeName;

    /**
     * 采购数量
     */
    @Excel(name = "采购数量", sort = 3)
    @ApiModelProperty(value = "采购数量--外层Table字段")
    private BigDecimal purchaseMaNumber;

    /**
     * 验收数量
     */
    @ApiModelProperty(value = "验收数量--外层Table字段")
    private BigDecimal checkMaNumber;

    /**
     * 绑定数量
     */
    @ApiModelProperty(value = "绑定数量--外层Table字段")
    private BigDecimal bindMaNumber;

    @ApiModelProperty(value = "入库数量--外层Table字段")
    private BigDecimal inputMaNumber;

    @ApiModelProperty(value = "待入库数量--外层Table字段")
    private BigDecimal waitInputNumber;

    /**
     * 采购单价(不含税)
     */
    @Excel(name = "采购单价(不含税)", sort = 5)
    @ApiModelProperty(value = "采购单价(不含税)--外层Table字段")
    private BigDecimal purchasePrice;

    /**
     * 采购单价(含税)
     */
    @Excel(name = "采购单价(含税)", sort = 4)
    @ApiModelProperty(value = "采购单价(含税)--外层Table字段")
    private BigDecimal purchaseTaxPrice;

    /**
     * 税率
     */
    @Excel(name = "税率", sort = 6)
    @ApiModelProperty(value = "税率 0~100")
    @Size(max = 100, message = "税率长度必须介于 0 和 100 之间")
    private BigDecimal taxRate;

    //@Excel(name = "购买人", sort = 9)
    @ApiModelProperty(value = "购买人名称")
    private String purchaseName;

    @ApiModelProperty(value = "新购模块阶段名称")
    private String modelName;

    @ApiModelProperty(value = "新购配件任务状态")
    private Integer purchaseStatus;

    @ApiModelProperty(value = "会签层级 1 代表供应科层级，2 代表技术科层级，3 代表库管班层级")
    private String signLevel;

}
