package com.yanzhu.jh.project.domain;

import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson2.JSONObject;
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;

import java.util.Date;

/**
 * 广联达班组信息对象 sur_project_attendance_group
 * 
 * @author ruoyi
 * @date 2023-09-26
 */
public class SurProjectAttendanceGroup extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long cfgid;

    /** 服务器主键id */
    @Excel(name = "服务器主键id")
    private Long serverid;

    /** 营业执照号 */
    @Excel(name = "营业执照号")
    private String bizLicense;

    /** 分包商统一社会信用代码 */
    @Excel(name = "分包商统一社会信用代码")
    private String companyCode;

    /** 分包商ID */
    @Excel(name = "分包商ID")
    private Long companyId;

    /** 分包商名称 */
    @Excel(name = "分包商名称")
    private String companyName;

    /** 分包商类型 */
    @Excel(name = "分包商类型")
    private String companyTypeId;

    /** 平台对应分包商ID */
    @Excel(name = "平台对应分包商ID")
    private Long vendorId;

    /** 班组名称 */
    @Excel(name = "班组名称")
    private String name;

    /** 班组长名称 */
    @Excel(name = "班组长名称")
    private String leaderName;

    /** 班组长电话 */
    @Excel(name = "班组长电话")
    private String leaderPhone;

    /** 队伍Id */
    @Excel(name = "队伍Id")
    private Long teamId;

    /** 队伍名称 */
    @Excel(name = "队伍名称")
    private String teamName;

    /** 班组类型0:建筑工人班组;1:管理人员班组 */
    @Excel(name = "班组类型0:建筑工人班组;1:管理人员班组")
    private Long type;

    /** 班组长对应的工人ID */
    @Excel(name = "班组长对应的工人ID")
    private Long leaderId;

    /** 是否删除 */
    @Excel(name = "是否删除")
    private Integer deleted;

    /** 基础平台对应班组ID */
    @Excel(name = "基础平台对应班组ID")
    private Long platformGroupId;

    /** 基础平台对应队伍ID */
    @Excel(name = "基础平台对应队伍ID")
    private Long platformTeamId;

    /** 企业进场日期 */
    @Excel(name = "企业进场日期")
    private Long enterDate;

    /** 企业退场日期 */
    @Excel(name = "企业退场日期")
    private Long exitDate;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long isDel;

    public static SurProjectAttendanceGroup create(JSONObject json) {
        SurProjectAttendanceGroup g=new SurProjectAttendanceGroup();
        g.serverid=json.getLong("id");
        g.bizLicense=json.getString("bizLicense");
        g.companyCode=json.getString("companyCode");
        g.companyId=json.getLong("companyId");
        g.companyName=json.getString("companyName");
        g.companyTypeId=json.getString("companyTypeId");
        g.vendorId=json.getLong("vendorId");
        g.name=json.getString("name");
        g.leaderName=json.getString("leaderName");
        g.leaderPhone=json.getString("leaderPhone");
        g.teamId=json.getLong("teamId");
        g.teamName=json.getString("teamName");
        g.type=json.getLong("type");
        g.leaderId=json.getLong("leaderId");
        g.deleted=json.get("deleted")==null?0:(json.getBoolean("deleted")?1:0);
        g.platformGroupId=json.getLong("platformGroupId");
        g.platformTeamId=json.getLong("platformTeamId");
        g.enterDate=json.getLong("enterDate");
        g.exitDate=json.getLong("exitDate");
        g.isDel=0l;
        return g;

    }

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

    public Long getId() 
    {
        return id;
    }
    public void setCfgid(Long cfgid) 
    {
        this.cfgid = cfgid;
    }

    public Long getCfgid() 
    {
        return cfgid;
    }
    public void setServerid(Long serverid) 
    {
        this.serverid = serverid;
    }

    public Long getServerid() 
    {
        return serverid;
    }
    public void setBizLicense(String bizLicense) 
    {
        this.bizLicense = bizLicense;
    }

    public String getBizLicense() 
    {
        return bizLicense;
    }
    public void setCompanyCode(String companyCode) 
    {
        this.companyCode = companyCode;
    }

    public String getCompanyCode() 
    {
        return companyCode;
    }
    public void setCompanyId(Long companyId) 
    {
        this.companyId = companyId;
    }

    public Long getCompanyId() 
    {
        return companyId;
    }
    public void setCompanyName(String companyName) 
    {
        this.companyName = companyName;
    }

    public String getCompanyName() 
    {
        return companyName;
    }
    public void setCompanyTypeId(String companyTypeId) 
    {
        this.companyTypeId = companyTypeId;
    }

    public String getCompanyTypeId() 
    {
        return companyTypeId;
    }
    public void setVendorId(Long vendorId) 
    {
        this.vendorId = vendorId;
    }

    public Long getVendorId() 
    {
        return vendorId;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setLeaderName(String leaderName) 
    {
        this.leaderName = leaderName;
    }

    public String getLeaderName() 
    {
        return leaderName;
    }
    public void setLeaderPhone(String leaderPhone) 
    {
        this.leaderPhone = leaderPhone;
    }

    public String getLeaderPhone() 
    {
        return leaderPhone;
    }
    public void setTeamId(Long teamId) 
    {
        this.teamId = teamId;
    }

    public Long getTeamId() 
    {
        return teamId;
    }
    public void setTeamName(String teamName) 
    {
        this.teamName = teamName;
    }

    public String getTeamName() 
    {
        return teamName;
    }
    public void setType(Long type) 
    {
        this.type = type;
    }

    public Long getType() 
    {
        return type;
    }
    public void setLeaderId(Long leaderId) 
    {
        this.leaderId = leaderId;
    }

    public Long getLeaderId() 
    {
        return leaderId;
    }
    public void setDeleted(Integer deleted) 
    {
        this.deleted = deleted;
    }

    public Integer getDeleted() 
    {
        return deleted;
    }
    public void setPlatformGroupId(Long platformGroupId) 
    {
        this.platformGroupId = platformGroupId;
    }

    public Long getPlatformGroupId() 
    {
        return platformGroupId;
    }
    public void setPlatformTeamId(Long platformTeamId) 
    {
        this.platformTeamId = platformTeamId;
    }

    public Long getPlatformTeamId() 
    {
        return platformTeamId;
    }
    public void setEnterDate(Long enterDate) 
    {
        this.enterDate = enterDate;
    }

    public Long getEnterDate() 
    {
        return enterDate;
    }
    public void setExitDate(Long exitDate) 
    {
        this.exitDate = exitDate;
    }

    public Long getExitDate() 
    {
        return exitDate;
    }
    public void setIsDel(Long isDel) 
    {
        this.isDel = isDel;
    }

    public Long getIsDel() 
    {
        return isDel;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("cfgid", getCfgid())
            .append("serverid", getServerid())
            .append("bizLicense", getBizLicense())
            .append("companyCode", getCompanyCode())
            .append("companyId", getCompanyId())
            .append("companyName", getCompanyName())
            .append("companyTypeId", getCompanyTypeId())
            .append("vendorId", getVendorId())
            .append("name", getName())
            .append("leaderName", getLeaderName())
            .append("leaderPhone", getLeaderPhone())
            .append("teamId", getTeamId())
            .append("teamName", getTeamName())
            .append("type", getType())
            .append("leaderId", getLeaderId())
            .append("deleted", getDeleted())
            .append("createTime", getCreateTime())
            .append("platformGroupId", getPlatformGroupId())
            .append("platformTeamId", getPlatformTeamId())
            .append("enterDate", getEnterDate())
            .append("exitDate", getExitDate())
            .append("remark", getRemark())
            .append("isDel", getIsDel())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
