package com.zd.laboratory.domain;

import cn.hutool.core.util.StrUtil;
import com.zd.laboratory.domain.vo.LabSubjectVO;
import com.zd.system.api.laboratory.domain.SensorFunctionStatus;
import com.zd.system.api.laboratory.domain.SubAddrr;
import com.zd.system.api.laboratory.domain.vo.HardwareCVO;
import com.zd.system.api.laboratory.domain.vo.LabSubClassVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Collections;
import java.util.List;

/**
 * @Author: zhoupan
 * @Date: 2021/11/11/16:56
 * @Description:
 */
public class SubDiyVO {

    /**
     * 实验室id
     */
    private Long id;

    /**
     * 实验室名称
     */
    private String name;

    /**
     * 实验室所属院系
     */
    private Long deptId;

    /**
     * 实验室所属院系
     */
    private String deptName;

    /**
     * 学科类型 翻译名
     */
    private String subTypeLable;


    private String subTypeValue;

    /**
     * 实验室负责人 翻译
     */
    private String adminName;


    /**
     * 实验室负责人 翻译
     */
    private String adminPhone;

    /**
     * 布局ID
     */
    private Long layoutId;


    /**
     * 危险等级
     */
    @ApiModelProperty("危险等级")
    private LabSubClassVO subClassVO;

    /**
     * 安全信息
     */
    @ApiModelProperty("安全信息")
    private  SafeInfo safeInfo;


    @ApiModelProperty("实验室地址对象")
    private SubAddrr subAddrr;

    @ApiModelProperty("实验室地址格式化")
    private String subAddrrStr;


    @ApiModelProperty("所属测点功能列表")
    volatile private List<SensorFunctionStatus> sensorFunctionList= Collections.emptyList();


    @ApiModelProperty("所属设备列表")
    private List<HardwareCVO> labHardwareVOList= Collections.emptyList();

    @ApiModelProperty("危险源数量")
    private int sourceRiskCount;

    @ApiModelProperty("智能硬件数量")
    private int aiHardwareCount;

    @ApiModelProperty("传感器数量")
    private int sensorCount;

    @ApiModelProperty("安全分级名称")
    private String levelName;

    @ApiModelProperty("安全分级颜色编码")
    private String fiedColor;

    @ApiModelProperty("安全分类名称")
    private String typeName;

    public int getSourceRiskCount() {
        return sourceRiskCount;
    }

    public void setSourceRiskCount(int sourceRiskCount) {
        this.sourceRiskCount = sourceRiskCount;
    }

    public int getAiHardwareCount() {
        return labHardwareVOList.size();
    }

    public void setAiHardwareCount(int aiHardwareCount) {
        this.aiHardwareCount = aiHardwareCount;
    }

    public int getSensorCount() {
        return sensorFunctionList.size();
    }

    public void setSensorCount(int sensorCount) {
        this.sensorCount = sensorCount;
    }

    public List<HardwareCVO> getLabHardwareVOList() {
        return labHardwareVOList;
    }

    public void setLabHardwareVOList(List<HardwareCVO> labHardwareVOList) {
        this.labHardwareVOList = labHardwareVOList;
    }

    public List<SensorFunctionStatus> getSensorFunctionList() {
        return sensorFunctionList;
    }

    public void setSensorFunctionList(List<SensorFunctionStatus> sensorFunctionList) {
        this.sensorFunctionList = sensorFunctionList;
    }

    public SubDiyVO() {
    }

    public SubDiyVO(LabSubjectVO labSubjectVO) {
        this.id = labSubjectVO.getId();
        this.name = labSubjectVO.getName();
        this.deptName = labSubjectVO.getDeptName();
        this.adminName = labSubjectVO.getAdminName();
        this.subTypeValue = labSubjectVO.getSubDept();
        this.layoutId = labSubjectVO.getLayoutId();
        this.adminPhone = labSubjectVO.getAdminPhone();
        this.levelName = labSubjectVO.getLevelName();
        this.fiedColor = labSubjectVO.getFiedColor();
        this.typeName = labSubjectVO.getTypeName();

    }

    public String getAdminPhone() {
        return adminPhone;
    }

    public void setAdminPhone(String adminPhone) {
        this.adminPhone = adminPhone;
    }

    public Long getLayoutId() {
        return layoutId;
    }

    public void setLayoutId(Long layoutId) {
        this.layoutId = layoutId;
    }

    public String getSubTypeLable() {
        return subTypeLable==null? StrUtil.EMPTY:subTypeLable;
    }

    public void setSubTypeLable(String subTypeLable) {
        this.subTypeLable = subTypeLable;
    }

    public String getSubTypeValue() {
        return subTypeValue;
    }

    public Long getId() {
        return id;
    }

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

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public String getAdminName() {
        return adminName;
    }

    public void setAdminName(String adminName) {
        this.adminName = adminName;
    }

    public LabSubClassVO getSubClassVO() {
        return subClassVO;
    }

    public void setSubClassVO(LabSubClassVO subClassVO) {
        this.subClassVO = subClassVO;
    }

    public SafeInfo getSafeInfo() {
        return safeInfo;
    }

    public void setSafeInfo(SafeInfo safeInfo) {
        this.safeInfo = safeInfo;
    }

    public SubAddrr getSubAddrr() {
        return subAddrr;
    }

    public void setSubAddrr(SubAddrr subAddrr) {
        this.subAddrr = subAddrr;
    }

    public String getSubAddrrStr() {
        return subAddrrStr;
    }

    public void setSubAddrrStr(String subAddrrStr) {
        this.subAddrrStr = subAddrrStr;
    }

    public String getLevelName() {
        return levelName;
    }

    public void setLevelName(String levelName) {
        this.levelName = levelName;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getFiedColor() {
        return fiedColor;
    }

    public void setFiedColor(String fiedColor) {
        this.fiedColor = fiedColor;
    }

    @ApiModel("安全信息")
    public static class SafeInfo{
        @ApiModelProperty("安全警示标示--字典")
        private List<String> safeSigns;

        @ApiModelProperty("主要危险类别--字典")
        private List<String> hazardCategory;

        @ApiModelProperty("安全防控措施--字典")
        private List<String> riskMeasure;

        @ApiModelProperty("灭火要点--字典")
        private List<String> outfire;

        @ApiModelProperty("二维码")
        private String qrCode;


        @ApiModelProperty("实验室负责人名称")
        private String subAdminName;

        @ApiModelProperty("实验室负责人手机")
        private String subAdminPhone;

        @ApiModelProperty("安全负责人名称")
        private String safeUserName;


        @ApiModelProperty("安全负责人电话")
        private String safePhone;

        private String safeUserNameAdminPhone;

        private String adminNameAndPhone;


        public String getSubAdminName() {
            if(subAdminName==null) return StrUtil.EMPTY;
            return subAdminName;
        }

        public void setSubAdminName(String subAdminName) {

            this.subAdminName = subAdminName;
        }

        public String getSubAdminPhone() {
            if(subAdminPhone==null) return StrUtil.EMPTY;
            return subAdminPhone;
        }

        public void setSubAdminPhone(String subAdminPhone) {
            this.subAdminPhone = subAdminPhone;
        }

        public String getSafeUserName() {
            if(safeUserName==null) return StrUtil.EMPTY;
            return safeUserName;
        }

        public void setSafeUserName(String safeUserName) {

            this.safeUserName = safeUserName;
        }

        public String getSafePhone() {
            if(safePhone==null) return StrUtil.EMPTY;
            return safePhone;
        }

        public void setSafePhone(String safePhone) {
            this.safePhone = safePhone;
        }

        public SafeInfo() {

        }
        public List<String> getSafeSigns() {
            return safeSigns;
        }

        public void setSafeSigns(List<String> safeSigns) {
            this.safeSigns = safeSigns;
        }

        public List<String> getHazardCategory() {
            return hazardCategory;
        }

        public void setHazardCategory(List<String> hazardCategory) {
            this.hazardCategory = hazardCategory;
        }

        public List<String> getRiskMeasure() {
            return riskMeasure;
        }

        public void setRiskMeasure(List<String> riskMeasure) {
            this.riskMeasure = riskMeasure;
        }

        public List<String> getOutfire() {
            return outfire;
        }

        public void setOutfire(List<String> outfire) {
            this.outfire = outfire;
        }

        public String getQrCode() {
            return qrCode;
        }

        public void setQrCode(String qrCode) {
            this.qrCode = qrCode;
        }

        public String getSafeUserNameAdminPhone() {
            return safeUserNameAdminPhone;
        }

        public void setSafeUserNameAdminPhone(String safeUserNameAdminPhone) {
            this.safeUserNameAdminPhone = safeUserNameAdminPhone;
        }

        public String getAdminNameAndPhone() {
            return adminNameAndPhone;
        }

        public void setAdminNameAndPhone(String adminNameAndPhone) {
            this.adminNameAndPhone = adminNameAndPhone;
        }
    }
}
