package com.bonus.material.ma.domain;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

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

/**
 * 物资类型对象 ma_type
 * @author syruan
 */
@EqualsAndHashCode(callSuper = false)
@Data
@ToString
public class Type extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 类型ID */
    @ApiModelProperty(value = "类型ID")
    private Long typeId;

    @ApiModelProperty(value = "任务ID")
    private Long taskId;

    @ApiModelProperty(value = "设备ID")
    private Long maId;

    @ApiModelProperty(value = "物资名称")
    private String materialName;

    /** 类型名称 */
    @Excel(name = "规格型号", sort = 5)
    @ApiModelProperty(value = "类型名称")
    private String typeName;

    /** 库管员昵称 */
    @ApiModelProperty(value = "库管员昵称")
    @Excel(name = "库管员昵称",sort = 7)
    private String keeperNickName;

    /** 库管员昵称 */
    @ApiModelProperty(value = "库管员昵称id")
    private String keeperId;

    /** 左侧树用户id */
    @ApiModelProperty(value = "左侧树用户id")
    private List<String> keeperArr;

    /** 维修员昵称 */
    @ApiModelProperty(value = "维修员昵称")
    @Excel(name = "维修员昵称",sort = 9)
    private String repairNickName;

    /** 维修员昵称 */
    @ApiModelProperty(value = "维修员昵称id")
    private String repairerId;
    private List<String> repairerArr;
    /** 仓库名称 */
    @ApiModelProperty(value = "物资仓库名称")
    private String houseName;

    /** 仓库Id */
    @ApiModelProperty(value = "物资仓库Id")
    private Long houseId;

    /** 上级ID */
    @ApiModelProperty(value = "上级ID")
    private Long parentId;

    /** 实时库存 */
    @Excel(name = "实时库存",sort = 11)
    @ApiModelProperty(value = "实时库存")
    private BigDecimal storageNum;
    /** 实时库存 */
    @ApiModelProperty(value = "修改前库存")
    private BigDecimal preStoreNum;

    /** 是否扣费 */
    @ApiModelProperty(value = "是否扣费,0:扣费, 1:不扣费")
    private Byte isCharging = 1;

    @ApiModelProperty(value = "是否试验,0:未试验, 1:已试验")
    private Byte isTest = 0;

    /** 检验周期 */
    @ApiModelProperty(value = "检验周期，单位：月")
    private Integer testCycle = 0;

    /** 类型编号 */
    @ApiModelProperty(value = "类型编号")
    private String typeCode;

    /** 规格编号 */
    @ApiModelProperty(value = "规格编号")
    private String modelCode;

    /** 计量单位ID */
    @ApiModelProperty(value = "计量单位ID")
    private Long unitId;

    /** 计量单位名称 */
    @ApiModelProperty(value = "计量单位名称")
    @Excel(name = "计量单位",sort = 12)
    private String unitName;

    /** 计量单位名称值0整型1小数 */
    @ApiModelProperty(value = "计量单位名称0整型1小数")
    @Excel(name = "计量单位0整型1小数",sort = 13)
    private String unitValue;

    /** 排序 */
    @ApiModelProperty(value = "排序")
    private int sortNum;

    @ApiModelProperty(value = "最大排序，用于Tree排序")
    private transient int maxSortPriority;

    /** 管理方式(0编号 1计数) */
    @Excel(name = "管理方式(0编码 1数量)",readConverterExp = "0=编码,1=数量")
    @ApiModelProperty(value = "管理方式(0编号 1计数)")
    private String manageType;

    /** 内部租赁单价 */
    @Excel(name = "内部租赁单价",sort = 16)
    @ApiModelProperty(value = "内部租赁单价")
    private BigDecimal leasePrice;

    @ApiModelProperty(value = "是否更新租赁价格")
    private Boolean isUpdateLeasePrice;

    /** 租赁费用生效时间 */
    @ApiModelProperty(value = "租赁费用生效时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "租赁费用生效时间", width = 30, dateFormat = "yyyy-MM-dd",sort = 17)
    private Date effTime;

    /** 外部租赁单价 */
    @Excel(name = "外部租赁单价",sort = 18)
    @ApiModelProperty(value = "外部租赁单价")
    private BigDecimal rentPrice;

    /** 采购价原值 */
    @Excel(name = "采购价原值",sort = 19)
    @ApiModelProperty(value = "采购价原值")
    private BigDecimal buyPrice;

    /** 丢失赔偿比率 */
    @Excel(name = "丢失赔偿比率",sort = 20)
    @ApiModelProperty(value = "丢失赔偿比率")
    private BigDecimal payRatio;

    /** 丢失赔偿价 */
    @ApiModelProperty(value = "丢失赔偿价")
    private BigDecimal payPrice;

    @ApiModelProperty(value = "???价")
    private BigDecimal finalPrice;

    /** 税率 */
    @ApiModelProperty(value = "税率")
    private BigDecimal taxRatio;

    /** 层级 */
    @ApiModelProperty(value = "层级")
    private String level;

    /** 额定载荷 */
    @Excel(name = "额定载荷",sort = 21)
    @ApiModelProperty(value = "额定载荷")
    private String ratedLoad;

    /** 试验载荷 */
    @Excel(name = "试验载荷",sort = 22)
    @ApiModelProperty(value = "试验载荷")
    private String testLoad;

    /** 持荷时间 */
    @ApiModelProperty(value = "持荷时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "持荷时间", width = 30, dateFormat = "yyyy-MM-dd",sort = 23)
    private String holdingTime;

    /** 库存预警数量 */
    @ApiModelProperty(value = "库存预警数量")
    private Long warnNum;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 是否计划管理（0代表否 1代表是） */
    private String isPlan;

    /** 是否安措费机具（0代表否1代表是） */
    private String isAncuo;

    /** 厂家规格型号 */
    @Excel(name = "厂家规格型号",sort = 27)
    @ApiModelProperty(value = "厂家规格型号")
    private String facModel;

    /** 左侧树用户id */
    @ApiModelProperty(value = "左侧树用户id")
    private Long userId;

    @ApiModelProperty(value = "组织id")
    private Long companyId;

    /** 推送智慧工程定义的门类分类机具编码 */
    @ApiModelProperty(value = "推送智慧工程定义的门类分类机具编码")
    private String intelligentCode;

    private String keyword;

    private String maTypeName;

    /** 子节点 */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Type> children = new ArrayList<>();

    @ApiModelProperty(value = "抽检比例")
    private String samplingRatio;

    /** 子节点数量 */
    private Integer number;

    @ApiModelProperty(value = "在用数量")
    private BigDecimal useNum;

    @ApiModelProperty(value = "协议id")
    private Long agreementId;

    @ApiModelProperty(value = "不含税单价")
    private BigDecimal notTaxPrice;

    @ApiModelProperty(value = "是否录入编码（0：否，1：是）")
    private String isEnter;

    @ApiModelProperty(value = "库管员id")
    private Long keeperUserId;

    @ApiModelProperty(value = "是否检验（0不检验，1检验）")
    private String isCheck;

    @ApiModelProperty("机具类型（1机具，2安全工器具）")
    private int jiJuType;

    @ApiModelProperty(value = "待出库数量")
    private BigDecimal pendingOutNum;

    @ApiModelProperty(value = "1：领料出库 2：修试入库 3：盘点入库 4：新购入库 5：直接修改库存")
    private String style;

    @ApiModelProperty(value = "模块")
    private String modelTitle;

    @ApiModelProperty(value = "任务单号")
    private String code;

    @ApiModelProperty(value = "入库数量")
    private BigDecimal inputNum;

    @ApiModelProperty(value = "出库数量")
    private BigDecimal outNum;

    @ApiModelProperty(value = "设备第一级名称")
    private String constructionType;

    @ApiModelProperty(value = "设备第二级名称")
    private String materialType;

    @ApiModelProperty(value = "设备第四级名称")
    private String typeModelName;

    @ApiModelProperty(value="开始时间")
    private String startTime;

    @ApiModelProperty(value="结束时间")
    private String endTime;

    @ApiModelProperty(value="修改后库存")
    private BigDecimal afterStoreNum;

    @ApiModelProperty(value="昵称")
    private String nickName;

    @ApiModelProperty(value="机具编码")
    private String maCode;

}
