package com.ruoyi.oa.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
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_handover
 * 
 * @author cmc
 * @date 2024-05-21
 */
public class CmcDeviceHandover extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 设备移交id */
    private Integer deviceHandoverId;

    /** 设备id */
    @Excel(name = "设备编码")
    private String deviceNumber;
    @Excel(name = "设备名称")
    private String name;
    @Excel(name = "出厂编号")
    private String code;
    @Excel(name = "品牌")
    private String brand;
    @Excel(name = "系列")
    private String series;
    private Integer deviceId;

    /** 移交部门id */
    @Excel(name = "移交部门")
    private String handoverDeptName;
    private Long handoverDeptId;

    /** 移交人id */
    @Excel(name = "移交人")
    private String handoverNickName;
    private Long handoverUserId;

    /** 移交日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "移交日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date handoverDate;

    /** 接收部门id */
    @Excel(name = "接收部门")
    private String receiveDeptName;
    private Long receiveDeptId;

    /** 接收人id */
    @Excel(name = "接收人")
    private String receiveNickName;
    private Long receiveUserId;

    /** 设备软件说明 */
    @Excel(name = "设备软件说明")
    private String description;

    /** 交接原因 */
    @Excel(name = "交接原因")
    private String reason;

    private SysUser handoverUser;

    private SysUser receiveUser;

    private SysDept handoverDept;

    private SysDept receiveDept;

    private CmcDevice device;

    public void setDeviceHandoverId(Integer deviceHandoverId)
    {
        this.deviceHandoverId = deviceHandoverId;
    }

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

    public Integer getDeviceId()
    {
        return deviceId;
    }
    public void setDevice(CmcDevice device)
    {
        this.device = device;
        if (device != null) {
            this.deviceNumber = device.getDeviceNumber();
            this.brand = device.getBrand();
            this.series = device.getSeries();
            this.name = device.getName();
            this.code = device.getCode();
        }
    }

    public CmcDevice getDevice()
    {
        return device;
    }
    public void setHandoverDeptId(Long handoverDeptId)
    {
        this.handoverDeptId = handoverDeptId;
    }

    public Long getHandoverDeptId()
    {
        return handoverDeptId;
    }
    public void setHandoverUserId(Long handoverUserId)
    {
        this.handoverUserId = handoverUserId;
    }

    public Long getHandoverUserId()
    {
        return handoverUserId;
    }
    public void setHandoverDate(Date handoverDate) 
    {
        this.handoverDate = handoverDate;
    }

    public Date getHandoverDate() 
    {
        return handoverDate;
    }
    public void setReceiveDeptId(Long receiveDeptId)
    {
        this.receiveDeptId = receiveDeptId;
    }

    public Long getReceiveDeptId()
    {
        return receiveDeptId;
    }
    public void setReceiveUserId(Long receiveUserId)
    {
        this.receiveUserId = receiveUserId;
    }

    public Long getReceiveUserId()
    {
        return receiveUserId;
    }
    public void setHandoverUser(SysUser handoverUser)
    {
        this.handoverUser = handoverUser;
        this.handoverNickName = handoverUser != null ? handoverUser.getNickName() : "";
    }

    public SysUser getHandoverUser()
    {
        return handoverUser;
    }
    public void setReceiveUser(SysUser receiveUser)
    {
        this.receiveUser = receiveUser;
        this.receiveNickName = receiveUser != null ? receiveUser.getNickName() : "";
    }

    public SysUser getReceiveUser()
    {
        return receiveUser;
    }
    public void setReceiveDept(SysDept receiveDept)
    {
        this.receiveDept = receiveDept;
        this.receiveDeptName = receiveDept != null ? receiveDept.getDeptName() : "";
    }

    public SysDept getReceiveDept()
    {
        return receiveDept;
    }
    public void setHandoverDept(SysDept handoverDept)
    {
        this.handoverDept = handoverDept;
        this.handoverDeptName = handoverDept != null ? handoverDept.getDeptName() : "";
    }

    public SysDept getHandoverDept()
    {
        return handoverDept;
    }
    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }
    public void setReason(String reason) 
    {
        this.reason = reason;
    }

    public String getReason() 
    {
        return reason;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("deviceHandoverId", getDeviceHandoverId())
            .append("deviceId", getDeviceId())
            .append("handoverDeptId", getHandoverDeptId())
            .append("handoverUserId", getHandoverUserId())
            .append("handoverDate", getHandoverDate())
            .append("receiveDeptId", getReceiveDeptId())
            .append("receiveUserId", getReceiveUserId())
            .append("description", getDescription())
            .append("reason", getReason())
            .append("remark", getRemark())
            .toString();
    }
}
