package com.ruoyi.ems.base.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
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.TreeEntity;

/**
 * 统计单元信息对象 ems_base_work_unit
 * 
 * @author Yinq
 * @date 2024-05-09
 */
public class EmsBaseWorkUnit extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键标识 */
    private Long objId;

    /** 统计单元编号 */
    @Excel(name = "统计单元编号")
    private String workUnitCode;

    /** 统计单元名称 */
    @Excel(name = "统计单元名称")
    private String workUnitName;

    /** 统计区域 */
    @Excel(name = "统计区域")
    private String workUnitAddress;

    /** 排序 */
    @Excel(name = "排序")
    private Long workUnitSort;

    /** 产线/工位 */
    @Excel(name = "产线/工位")
    private String productLineCode;

    /** 统计单元类型（1建筑） */
    @Excel(name = "统计单元类型", readConverterExp = "1=建筑")
    private Long workUnitType;

    /** 启用标识(0启用 1停用) */
    @Excel(name = "启用标识(0启用 1停用)")
    private String isFlag;

    /** 创建人 */
    @Excel(name = "创建人")
    private String createdBy;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    /** 更新人 */
    @Excel(name = "更新人")
    private String updatedBy;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updatedTime;

    private List<EmsBaseWorkUnit> children = new ArrayList<EmsBaseWorkUnit>();

    private String parentName;

    private Long parentId;

    private Integer orderNum;

    private String ancestors;

    public List<EmsBaseWorkUnit> getChildren() {
        return children;
    }

    public void setChildren(List<EmsBaseWorkUnit> children) {
        this.children = children;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public String getAncestors() {
        return ancestors;
    }

    public void setAncestors(String ancestors) {
        this.ancestors = ancestors;
    }

    public void setObjId(Long objId)
    {
        this.objId = objId;
    }

    public Long getObjId() 
    {
        return objId;
    }
    public void setWorkUnitCode(String workUnitCode) 
    {
        this.workUnitCode = workUnitCode;
    }

    public String getWorkUnitCode() 
    {
        return workUnitCode;
    }
    public void setWorkUnitName(String workUnitName) 
    {
        this.workUnitName = workUnitName;
    }

    public String getWorkUnitName() 
    {
        return workUnitName;
    }
    public void setWorkUnitAddress(String workUnitAddress) 
    {
        this.workUnitAddress = workUnitAddress;
    }

    public String getWorkUnitAddress() 
    {
        return workUnitAddress;
    }
    public void setWorkUnitSort(Long workUnitSort) 
    {
        this.workUnitSort = workUnitSort;
    }

    public Long getWorkUnitSort() 
    {
        return workUnitSort;
    }
    public void setProductLineCode(String productLineCode) 
    {
        this.productLineCode = productLineCode;
    }

    public String getProductLineCode() 
    {
        return productLineCode;
    }
    public void setWorkUnitType(Long workUnitType) 
    {
        this.workUnitType = workUnitType;
    }

    public Long getWorkUnitType() 
    {
        return workUnitType;
    }
    public void setIsFlag(String isFlag) 
    {
        this.isFlag = isFlag;
    }

    public String getIsFlag() 
    {
        return isFlag;
    }
    public void setCreatedBy(String createdBy) 
    {
        this.createdBy = createdBy;
    }

    public String getCreatedBy() 
    {
        return createdBy;
    }
    public void setCreatedTime(Date createdTime) 
    {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime() 
    {
        return createdTime;
    }
    public void setUpdatedBy(String updatedBy) 
    {
        this.updatedBy = updatedBy;
    }

    public String getUpdatedBy() 
    {
        return updatedBy;
    }
    public void setUpdatedTime(Date updatedTime) 
    {
        this.updatedTime = updatedTime;
    }

    public Date getUpdatedTime() 
    {
        return updatedTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("objId", getObjId())
            .append("workUnitCode", getWorkUnitCode())
            .append("parentId", getParentId())
            .append("workUnitName", getWorkUnitName())
            .append("workUnitAddress", getWorkUnitAddress())
            .append("ancestors", getAncestors())
            .append("workUnitSort", getWorkUnitSort())
            .append("productLineCode", getProductLineCode())
            .append("workUnitType", getWorkUnitType())
            .append("isFlag", getIsFlag())
            .append("createdBy", getCreatedBy())
            .append("createdTime", getCreatedTime())
            .append("updatedBy", getUpdatedBy())
            .append("updatedTime", getUpdatedTime())
            .toString();
    }
}
