package com.ruoyi.oa.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.entity.SysDept;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * cmc设备信息对象 cmc_device
 *
 * @author cmc
 * @date 2024-03-14
 */
public class CmcDevice extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 设备id */
    private Integer deviceId;

    /** 状态 */
    @Excel(name = "状态", readConverterExp = "0=被领用,1=可领用,2=维修中,3=已停用,4=已报废")
    private String status;

    /** 设备编码 */
    @Excel(name = "设备编码")
    private String deviceNumber;

    /** 使用人 */
    @Excel(name = "使用人")
    private String deviceUser;

    /** 设备类别 */
    @Excel(name = "设备类别")
    private String type;

    /** 设备名称 */
    @Excel(name = "设备名称")
    private String name;

    /** 设备品牌 */
    @Excel(name = "设备品牌")
    private String brand;

    /** 规格型号 */
    @Excel(name = "规格型号")
    private String series;

    /** 出厂编号 */
    @Excel(name = "出厂编号")
    private String code;

    /** 购置时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "购置时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date acquisitionTime;

    /** 购买价格 */
    @Excel(name = "购买价格")
    private BigDecimal cost;

    /** 预计使用年限 */
    @Excel(name = "预计使用年限")
    private Integer expectLife;

    /** 单日成本 */
    @Excel(name = "单日成本")
    private BigDecimal dayCost;

    /** 存放地点 */
    @Excel(name = "存放地点")
    private String place;

    /** 检定证书 */
    private String document;

    /** 管理部门id */
    @Excel(name = "管理部门")
    private String deptName;
    private Long manageDept;

    private SysDept dept;

    public void setDeviceId(Integer deviceId)
    {
        this.deviceId = deviceId;
    }

    public Integer getDeviceId()
    {
        return deviceId;
    }
    public void setDeviceNumber(String deviceNumber)
    {
        this.deviceNumber = deviceNumber;
    }

    public String getDeviceNumber()
    {
        return deviceNumber;
    }
    public void setDeviceUser(String deviceUser)
    {
        this.deviceUser = deviceUser;
    }

    public String getDeviceUser()
    {
        return deviceUser;
    }
    public void setCode(String code)
    {
        this.code = code;
    }

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

    public String getName()
    {
        return name;
    }
    public void setType(String type)
    {
        this.type = type;
    }

    public String getType()
    {
        return type;
    }
    public void setAcquisitionTime(Date acquisitionTime)
    {
        this.acquisitionTime = acquisitionTime;
    }

    public Date getAcquisitionTime()
    {
        return acquisitionTime;
    }
    public void setCost(BigDecimal cost)
    {
        this.cost = cost;
    }

    public BigDecimal getCost()
    {
        return cost;
    }
    public void setExpectLife(Integer expectLife)
    {
        this.expectLife = expectLife;
    }

    public Integer getExpectLife()
    {
        return expectLife;
    }
    public void setSeries(String series)
    {
        this.series = series;
    }

    public String getSeries()
    {
        return series;
    }
    public void setBrand(String brand)
    {
        this.brand = brand;
    }

    public String getBrand()
    {
        return brand;
    }
    public void setDayCost(BigDecimal dayCost)
    {
        this.dayCost = dayCost;
    }

    public BigDecimal getDayCost()
    {
        return dayCost;
    }
    public void setPlace(String place)
    {
        this.place = place;
    }

    public String getPlace()
    {
        return place;
    }
    public void setManageDept(Long manageDept)
    {
        this.manageDept = manageDept;
    }

    public Long getManageDept()
    {
        return manageDept;
    }
    public void setDept(SysDept dept)
    {
        this.dept = dept;
        this.deptName = dept == null ? "" : dept.getDeptName();
    }

    public SysDept getDept()
    {
        return dept;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setDocument(String document)
    {
        this.document = document;
    }

    public String getDocument()
    {
        return document;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("deviceId", getDeviceId())
                .append("deviceNumber", getDeviceNumber())
                .append("deviceUser", getDeviceUser())
                .append("code", getCode())
                .append("name", getName())
                .append("type", getType())
                .append("acquisitionTime", getAcquisitionTime())
                .append("cost", getCost())
                .append("expectLife", getExpectLife())
                .append("series", getSeries())
                .append("brand", getBrand())
                .append("dayCost", getDayCost())
                .append("place", getPlace())
                .append("remark", getRemark())
                .append("manageDept", getManageDept())
                .append("status", getStatus())
                .toString();
    }
}
