package com.zd.chemical.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zd.common.core.annotation.Excel;
import com.zd.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

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

/**
 * 库存管理对象 hxp_stock
 *
 * @author liubo
 * @date 2022-06-17
 */
@ApiModel("库存管理")
public class HxpStock extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @ApiModelProperty(value = "${comment}")
    private Long id;
    /**
     * 化学品机柜关联表id
     */
    @NotNull(message = "化学品机柜关联表id不能为空")
    @ApiModelProperty(required = true, value = "化学品机柜关联表id")
    private Long joinId;

    @ApiModelProperty(required = true, value = "机柜id")
    private Long cabinetId;

    /**
     * 1-领用化学品 2-化学品入库 3-化学品出库 4-归还化学品 5-RFID标签更换 6-查询化学品
     */
    private Integer qType = 0;

    /**
     * 化学品编号
     */
    @NotNull(message = "化学品编号不能为空")
    @ApiModelProperty(required = true, value = "化学品编号")
    private String chemicalNum;
    /**
     * 化学品名字
     */
    @NotNull(message = "化学品名字不能为空")
    @ApiModelProperty(required = true, value = "化学品名字")
    private String chemicalName;
    /**
     * 机柜编号
     */
    @NotNull(message = "机柜编号不能为空")
    @ApiModelProperty(required = true, value = "机柜编号")
    private String cabinetNum;
    /**
     * 机柜名称
     */
    @NotNull(message = "机柜名称不能为空")
    @ApiModelProperty(required = true, value = "机柜名称")
    private String cabinetName;
    /**
     * 化学品分类
     */
    @NotNull(message = "化学品分类不能为空")
    @ApiModelProperty(required = true, value = "化学品分类ID")
    private Long chemicalClassify;

    @ApiModelProperty(required = true, value = "化学品分类名称")
    private String classifyName;

    @ApiModelProperty(required = true, value = "化学品属性名称")
    private String classifyAttribute;

    /**
     * 库存状态（1 入库，2 用结出库，3 作废出库）
     */
    @NotNull(message = "库存状态不能为空")
    @ApiModelProperty(required = true, value = "库存状态")
    private Integer status;
    /**
     * 化学品形态（固体，体液）
     */
    @NotNull(message = "化学品形态不能为空")
    @ApiModelProperty(value = "化学品形态")
    private Integer chemicalShape;

    @ApiModelProperty(value = "化学品形态名称")
    private String chemicalShapeName;

    /**
     * 标签类型
     */
    @NotNull(message = "标签类型不能为空")
    @ApiModelProperty(required = true, value = "标签类型")
    private Integer labelType;
    @ApiModelProperty(value = "是否打印二维码标签（1是，0否）")
    private Integer printCode;
    /**
     * 入库方式（1 称重，2 录入）
     */
    @NotNull(message = "入库方式不能为空")
    @ApiModelProperty(required = true, value = "入库方式（1 称重，2 录入）")
    private Integer joinType;
    /**
     * 入库人ID
     */
    @Excel(name = "入库人ID")
    @ApiModelProperty(value = "入库人ID")
    private Long joinUserId;
    /**
     * 入库时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "入库时间")
    private Date joinTime;
    /**
     * 过期时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "过期时间不能为空")
    @ApiModelProperty(required = true, value = "过期时间")
    private Date expirationTime;
    /**
     * 计量方式（1是重量，2是体积，3是个数）
     */
    @NotNull(message = "计量方式不能为空")
    @ApiModelProperty(required = true, value = "计量方式")
    private Integer measuringMethod;
    /**
     * 单位（mg,g,kg,t）
     */
    @NotBlank(message = "单位不能为空")
    @Length(message = "单位长度不能超过5")
    @ApiModelProperty(value = "单位")
    private String chemicalUnit;
    /**
     * 验证方式（1是单人验证，2是双人双卡）
     */
    @NotNull(message = "验证方式不能为空")
    @ApiModelProperty(required = true, value = "验证方式（1是单人验证，2是双人双卡）")
    private Integer verification;
    /**
     * 别名
     */
    @ApiModelProperty(value = "别名")
    private String anotherName;
    /**
     * cas号
     */
    @ApiModelProperty(value = "cas号")
    private String casNum;
    /**
     * 生产厂家
     */
    @ApiModelProperty(value = "生产厂家")
    private String factory;
    /**
     * 纯度
     */
    @ApiModelProperty(value = "纯度")
    private String purity;

    @ApiModelProperty(value = "化学品规格")
    private BigDecimal chemicalAmount;
    /**
     * 化学品规格单位
     */
    @ApiModelProperty(value = "化学品规格单位")
    private String chemicalAmountUnit;
    /**
     * 入库第一验证人
     */
    @ApiModelProperty(value = "入库第一验证人")
    private Long joinOneUser;
    /**
     * 入库第二验证人
     */
    @ApiModelProperty(value = "入库第二验证人")
    private Long joinTwoUser;

    @ApiModelProperty(value = "入库视频")
    private String joinVideo;

    /**
     * 标签编号（二维码编号）
     */
    @ApiModelProperty(value = "标签编号")
    private String tagCode;
    /**
     * RFID编号（标签类型是1 时，必须有）
     */
    @ApiModelProperty(value = "RFID编号（标签类型是1 时，不能为空！）")
    private String rfidCode;
    /**
     * 入库重量
     */
    @ApiModelProperty(value = "入库重量")
    @NotNull(message = "称重数量不能为空！")
    private BigDecimal usages;
    /**
     * 出库人ID
     */
    @ApiModelProperty(value = "出库人ID")
    private Long outUserId;
    /**
     * 出库时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "出库时间")
    private Date outTime;
    /**
     * 剩余库存量（出库时计算存储）
     * 领用归还对库存进行实时操作
     */
    @ApiModelProperty(value = "剩余库存量")
    private BigDecimal outUsages;

    @ApiModelProperty(value = "库存净重量")
    private BigDecimal suttle;
    /**
     * 实验室id
     */
    @Excel(name = "实验室id")
    @NotNull(message = "实验室id不能为空")
    @ApiModelProperty(required = true, value = "实验室id")
    private Long subId;

    /**
     * 出库第一验证人
     */
    @ApiModelProperty(value = "出库第一验证人")
    private Long outOneUser;
    /**
     * 出库第二验证人
     */
    @ApiModelProperty(value = "出库第二验证人")
    private Long outTwoUser;

    @ApiModelProperty(value = "MSDS-ID")
    private Long hazardId;

    @ApiModelProperty(value = "当前领用信息")
    private HxpUserecord hxpUserecord;

    @ApiModelProperty(value = "化学品操作是否需要双人验证")
    private HxpClassifyConfig classifyConfig;

    private String safeUserId;

    @ApiModelProperty(value = "负责人")
    private String safeUserName;

    @ApiModelProperty(value = "容器重量")
    private BigDecimal tare;

    @ApiModelProperty(value = "识别号码")
    private String scanCode;

    /**
     * 一体机编号
     */
    private String machineCode;

    @ApiModelProperty(value = "柜锁记录Id")
    private Long lockLogId;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setJoinId(Long joinId) {
        this.joinId = joinId;
    }

    public Long getJoinId() {
        return joinId;
    }

    public void setChemicalNum(String chemicalNum) {
        this.chemicalNum = chemicalNum;
    }

    public String getChemicalNum() {
        return chemicalNum;
    }

    public void setChemicalName(String chemicalName) {
        this.chemicalName = chemicalName;
    }

    public String getChemicalName() {
        return chemicalName;
    }

    public void setCabinetNum(String cabinetNum) {
        this.cabinetNum = cabinetNum;
    }

    public String getCabinetNum() {
        return cabinetNum;
    }

    public void setCabinetName(String cabinetName) {
        this.cabinetName = cabinetName;
    }

    public String getCabinetName() {
        return cabinetName;
    }

    public void setChemicalClassify(Long chemicalClassify) {
        this.chemicalClassify = chemicalClassify;
    }

    public Long getChemicalClassify() {
        return chemicalClassify;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

    public Integer getLabelType() {
        return labelType;
    }

    public void setLabelType(Integer labelType) {
        this.labelType = labelType;
    }

    public void setJoinType(Integer joinType) {
        this.joinType = joinType;
    }

    public Integer getJoinType() {
        return joinType;
    }

    public void setJoinUserId(Long joinUserId) {
        this.joinUserId = joinUserId;
    }

    public Long getJoinUserId() {
        return joinUserId;
    }

    public void setJoinTime(Date joinTime) {
        this.joinTime = joinTime;
    }

    public Date getJoinTime() {
        return joinTime;
    }

    public void setExpirationTime(Date expirationTime) {
        this.expirationTime = expirationTime;
    }

    public Date getExpirationTime() {
        return expirationTime;
    }

    public void setMeasuringMethod(Integer measuringMethod) {
        this.measuringMethod = measuringMethod;
    }

    public Integer getMeasuringMethod() {
        return measuringMethod;
    }

    public void setChemicalUnit(String chemicalUnit) {
        this.chemicalUnit = chemicalUnit;
    }

    public String getChemicalUnit() {
        return chemicalUnit;
    }

    public void setVerification(Integer verification) {
        this.verification = verification;
    }

    public Integer getVerification() {
        return verification;
    }

    public void setAnotherName(String anotherName) {
        this.anotherName = anotherName;
    }

    public String getAnotherName() {
        return anotherName;
    }

    public void setCasNum(String casNum) {
        this.casNum = casNum;
    }

    public String getCasNum() {
        return casNum;
    }

    public void setFactory(String factory) {
        this.factory = factory;
    }

    public String getFactory() {
        return factory;
    }

    public void setPurity(String purity) {
        this.purity = purity;
    }

    public String getPurity() {
        return purity;
    }

    public void setTagCode(String tagCode) {
        this.tagCode = tagCode;
    }

    public String getTagCode() {
        return tagCode;
    }

    public void setUsages(BigDecimal usages) {
        this.usages = usages;
    }

    public BigDecimal getUsages() {
        return usages;
    }

    public void setOutUserId(Long outUserId) {
        this.outUserId = outUserId;
    }

    public Long getOutUserId() {
        return outUserId;
    }

    public void setOutTime(Date outTime) {
        this.outTime = outTime;
    }

    public Date getOutTime() {
        return outTime;
    }

    public void setOutUsages(BigDecimal outUsages) {
        this.outUsages = outUsages;
    }

    public BigDecimal getOutUsages() {
        return outUsages;
    }

    public void setSubId(Long subId) {
        this.subId = subId;
    }

    public Long getSubId() {
        return subId;
    }

    public String getRfidCode() {
        return rfidCode;
    }

    public void setRfidCode(String rfidCode) {
        this.rfidCode = rfidCode;
    }

    public Long getJoinOneUser() {
        return joinOneUser;
    }

    public void setJoinOneUser(Long joinOneUser) {
        this.joinOneUser = joinOneUser;
    }

    public Long getJoinTwoUser() {
        return joinTwoUser;
    }

    public void setJoinTwoUser(Long joinTwoUser) {
        this.joinTwoUser = joinTwoUser;
    }

    public Long getOutOneUser() {
        return outOneUser;
    }

    public void setOutOneUser(Long outOneUser) {
        this.outOneUser = outOneUser;
    }

    public Long getOutTwoUser() {
        return outTwoUser;
    }

    public void setOutTwoUser(Long outTwoUser) {
        this.outTwoUser = outTwoUser;
    }

    public HxpUserecord getHxpUserecord() {
        return hxpUserecord;
    }

    public void setHxpUserecord(HxpUserecord hxpUserecord) {
        this.hxpUserecord = hxpUserecord;
    }

    public Long getHazardId() {
        return hazardId;
    }

    public void setHazardId(Long hazardId) {
        this.hazardId = hazardId;
    }

    public String getClassifyName() {
        return classifyName;
    }

    public void setClassifyName(String classifyName) {
        this.classifyName = classifyName;
    }

    public String getClassifyAttribute() {
        return classifyAttribute;
    }

    public void setClassifyAttribute(String classifyAttribute) {
        this.classifyAttribute = classifyAttribute;
    }

    public HxpClassifyConfig getClassifyConfig() {
        return classifyConfig;
    }

    public void setClassifyConfig(HxpClassifyConfig classifyConfig) {
        this.classifyConfig = classifyConfig;
    }

    public BigDecimal getChemicalAmount() {
        return chemicalAmount;
    }

    public void setChemicalAmount(BigDecimal chemicalAmount) {
        this.chemicalAmount = chemicalAmount;
    }

    public String getChemicalAmountUnit() {
        return chemicalAmountUnit;
    }

    public void setChemicalAmountUnit(String chemicalAmountUnit) {
        this.chemicalAmountUnit = chemicalAmountUnit;
    }

    public String getSafeUserName() {
        return safeUserName;
    }

    public void setSafeUserName(String safeUserName) {
        this.safeUserName = safeUserName;
    }

    public String getSafeUserId() {
        return safeUserId;
    }

    public void setSafeUserId(String safeUserId) {
        this.safeUserId = safeUserId;
    }

    public BigDecimal getTare() {
        return tare;
    }

    public void setTare(BigDecimal tare) {
        this.tare = tare;
    }

    public Integer getPrintCode() {
        return printCode;
    }

    public void setPrintCode(Integer printCode) {
        this.printCode = printCode;
    }

    public String getScanCode() {
        return scanCode;
    }

    public void setScanCode(String scanCode) {
        this.scanCode = scanCode;
    }

    public BigDecimal getSuttle() {
        return suttle;
    }

    public void setSuttle(BigDecimal suttle) {
        this.suttle = suttle;
    }

    public String getMachineCode() {
        return machineCode;
    }

    public void setMachineCode(String machineCode) {
        this.machineCode = machineCode;
    }

    public Long getCabinetId() {
        return cabinetId;
    }

    public void setCabinetId(Long cabinetId) {
        this.cabinetId = cabinetId;
    }

    public Integer getChemicalShape() {
        return chemicalShape;
    }

    public void setChemicalShape(Integer chemicalShape) {
        this.chemicalShape = chemicalShape;
    }

    public String getChemicalShapeName() {
        return chemicalShapeName;
    }

    public void setChemicalShapeName(String chemicalShapeName) {
        this.chemicalShapeName = chemicalShapeName;
    }

    public Integer getqType() {
        return qType;
    }

    public void setqType(Integer qType) {
        this.qType = qType;
    }

    public String getJoinVideo() {
        return joinVideo;
    }

    public void setJoinVideo(String joinVideo) {
        this.joinVideo = joinVideo;
    }

    public Long getLockLogId() {
        return lockLogId;
    }

    public void setLockLogId(Long lockLogId) {
        this.lockLogId = lockLogId;
    }
}
