package com.zd.laboratory.domain.vo;

import cn.hutool.core.util.StrUtil;
import com.zd.common.core.enums.HazardTypeEnum;
import com.zd.common.security.utils.DictUtils;
import com.zd.laboratory.domain.LabHazard;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 违规记录VO
 *
 * @Author: zhoupan
 * @Date: 2021/09/07/15:17
 * @Description:
 */
@ApiModel("违规记录表")
public class LabHazardVO extends LabHazard {

    private Integer value;

    /**
     * 危险源名称（包涵危险源和压力容器名称）
     */
    @ApiModelProperty("危险源名称（包涵危险源和压力容器名称）")
    private String label;

    /**
     * 危险源类型
     */
    @ApiModelProperty("危险源类型")
    private HazardTypeEnum hazardType;

    /**
     * 实验室id
     */
    @ApiModelProperty("实验室id")
    private Long subjectId;

    /**
     * 院系id
     */
    @ApiModelProperty("院系id")
    private Long groupDeptId;

    /**
     * 危险源id
     */
    @ApiModelProperty("危险源id")
    private Long hazardId;

    public String getFlammabilityLable()
    {
        if(StrUtil.isBlank(getFlammability())) return StrUtil.EMPTY;
        return DictUtils.getDictCacheLable("combustibility",getFlammability());
    }

    /**
     * 危险源别名
     */
    private String anotherName;

    /**
     * 编号别名
     */
    private String anotherCode;



    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public HazardTypeEnum getHazardType() {
        return azardType();
    }

    public Long getSubjectId() {
        return subjectId;
    }

    public void setSubjectId(Long subjectId) {
        this.subjectId = subjectId;
    }

    public Long getGroupDeptId() {
        return groupDeptId;
    }

    public void setGroupDeptId(Long groupDeptId) {
        this.groupDeptId = groupDeptId;
    }

    public Long getHazardId() {
        return hazardId;
    }

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

    public String getAnotherName() {
        return anotherName;
    }

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

    public String getAnotherCode() {
        return anotherCode;
    }

    public void setAnotherCode(String anotherCode) {
        this.anotherCode = anotherCode;
    }
}
