package cn.ibizlab.humanresource.core.humanresource.domain;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.humanresource.util.domain.EntityBase;
import cn.ibizlab.humanresource.util.annotation.DEField;
import cn.ibizlab.humanresource.util.enums.DEPredefinedFieldType;
import cn.ibizlab.humanresource.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.humanresource.util.annotation.Audit;


import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.humanresource.util.domain.EntityMP;

/**
 * 实体[档案信息]
 */
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "T_HRARCHIVES",resultMap = "HRArchivesResultMap")
public class HRArchives extends EntityMP implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 档案信息标识
     */
    @DEField(isKeyField=true)
    @TableId(value= "hrarchivesid",type=IdType.ASSIGN_UUID)
    @JSONField(name = "hrarchivesid")
    @JsonProperty("hrarchivesid")
    private String hrarchivesid;
    /**
     * 档案信息名称
     */
    @TableField(value = "hrarchivesname")
    @JSONField(name = "hrarchivesname")
    @JsonProperty("hrarchivesname")
    private String hrarchivesname;
    /**
     * 建立人
     */
    @DEField(preType = DEPredefinedFieldType.CREATEMAN)
    @TableField(value = "createman" , fill = FieldFill.INSERT)
    @JSONField(name = "createman")
    @JsonProperty("createman")
    private String createman;
    /**
     * 建立时间
     */
    @DEField(preType = DEPredefinedFieldType.CREATEDATE)
    @TableField(value = "createdate" , fill = FieldFill.INSERT)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
    @JsonProperty("createdate")
    private Timestamp createdate;
    /**
     * 更新人
     */
    @DEField(preType = DEPredefinedFieldType.UPDATEMAN)
    @TableField(value = "updateman")
    @JSONField(name = "updateman")
    @JsonProperty("updateman")
    private String updateman;
    /**
     * 更新时间
     */
    @DEField(preType = DEPredefinedFieldType.UPDATEDATE)
    @TableField(value = "updatedate")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
    @JsonProperty("updatedate")
    private Timestamp updatedate;
    /**
     * 员工标识
     */
    @TableField(value = "hremployeeid")
    @JSONField(name = "hremployeeid")
    @JsonProperty("hremployeeid")
    private String hremployeeid;
    /**
     * 员工姓名
     */
    @TableField(exist = false)
    @JSONField(name = "hremployeename")
    @JsonProperty("hremployeename")
    private String hremployeename;
    /**
     * 员工编号
     */
    @TableField(exist = false)
    @JSONField(name = "employeecode")
    @JsonProperty("employeecode")
    private String employeecode;
    /**
     * 单位
     */
    @TableField(exist = false)
    @JSONField(name = "organizationname")
    @JsonProperty("organizationname")
    private String organizationname;
    /**
     * 单位ID
     */
    @TableField(exist = false)
    @JSONField(name = "organizationid")
    @JsonProperty("organizationid")
    private String organizationid;
    /**
     * 员工状态
     */
    @TableField(exist = false)
    @JSONField(name = "empstate")
    @JsonProperty("empstate")
    private String empstate;
    /**
     * 档案编号
     */
    @TableField(value = "archivescode")
    @JSONField(name = "archivescode")
    @JsonProperty("archivescode")
    private String archivescode;
    /**
     * 档案室
     */
    @TableField(value = "archivesroom")
    @JSONField(name = "archivesroom")
    @JsonProperty("archivesroom")
    private String archivesroom;
    /**
     * 档案保管地
     */
    @TableField(value = "archivesplacetype")
    @JSONField(name = "archivesplacetype")
    @JsonProperty("archivesplacetype")
    private String archivesplacetype;
    /**
     * 档案保管地
     */
    @TableField(value = "archivesplace")
    @JSONField(name = "archivesplace")
    @JsonProperty("archivesplace")
    private String archivesplace;
    /**
     * 档案学历
     */
    @TableField(value = "degree")
    @JSONField(name = "degree")
    @JsonProperty("degree")
    private String degree;
    /**
     * 档案出生日期
     */
    @TableField(value = "birthday")
    @JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "birthday" , format="yyyy-MM-dd")
    @JsonProperty("birthday")
    private Timestamp birthday;
    /**
     * 档案入党时间
     */
    @TableField(value = "politicaltime")
    @JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "politicaltime" , format="yyyy-MM-dd")
    @JsonProperty("politicaltime")
    private Timestamp politicaltime;
    /**
     * 档案参加工作时间
     */
    @TableField(value = "startworktime")
    @JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "startworktime" , format="yyyy-MM-dd")
    @JsonProperty("startworktime")
    private Timestamp startworktime;
    /**
     * 是否有效
     */
    @DEField(defaultValue = "1")
    @TableField(value = "activeflag")
    @JSONField(name = "activeflag")
    @JsonProperty("activeflag")
    private Integer activeflag;
    /**
     * 人事档案目录
     */
    @TableField(value = "attachment")
    @JSONField(name = "attachment")
    @JsonProperty("attachment")
    private String attachment;
    /**
     * 备注
     */
    @TableField(value = "memo")
    @JSONField(name = "memo")
    @JsonProperty("memo")
    private String memo;
    /**
     * 档案借阅状态
     */
    @TableField(value = "borrowstate")
    @JSONField(name = "borrowstate")
    @JsonProperty("borrowstate")
    private String borrowstate;
    /**
     * 档案管理单位ID
     */
    @TableField(value = "hrorganizationid")
    @JSONField(name = "hrorganizationid")
    @JsonProperty("hrorganizationid")
    private String hrorganizationid;
    /**
     * 档案管理单位
     */
    @TableField(exist = false)
    @JSONField(name = "hrorganizationname")
    @JsonProperty("hrorganizationname")
    private String hrorganizationname;

    /**
     * 员工
     */
    @JsonIgnore
    @JSONField(serialize = false)
    @TableField(exist = false)
    private cn.ibizlab.humanresource.core.humanresource.domain.HREmployee hremployee;

    /**
     * 档案管理单位
     */
    @JsonIgnore
    @JSONField(serialize = false)
    @TableField(exist = false)
    private cn.ibizlab.humanresource.core.base.domain.HROrganization hrorganization;



    /**
     * 设置 [档案信息名称]
     */
    public void setHrarchivesname(String hrarchivesname){
        this.hrarchivesname = hrarchivesname ;
        this.modify("hrarchivesname",hrarchivesname);
    }

    /**
     * 设置 [员工标识]
     */
    public void setHremployeeid(String hremployeeid){
        this.hremployeeid = hremployeeid ;
        this.modify("hremployeeid",hremployeeid);
    }

    /**
     * 设置 [档案编号]
     */
    public void setArchivescode(String archivescode){
        this.archivescode = archivescode ;
        this.modify("archivescode",archivescode);
    }

    /**
     * 设置 [档案室]
     */
    public void setArchivesroom(String archivesroom){
        this.archivesroom = archivesroom ;
        this.modify("archivesroom",archivesroom);
    }

    /**
     * 设置 [档案保管地]
     */
    public void setArchivesplacetype(String archivesplacetype){
        this.archivesplacetype = archivesplacetype ;
        this.modify("archivesplacetype",archivesplacetype);
    }

    /**
     * 设置 [档案保管地]
     */
    public void setArchivesplace(String archivesplace){
        this.archivesplace = archivesplace ;
        this.modify("archivesplace",archivesplace);
    }

    /**
     * 设置 [档案学历]
     */
    public void setDegree(String degree){
        this.degree = degree ;
        this.modify("degree",degree);
    }

    /**
     * 设置 [档案出生日期]
     */
    public void setBirthday(Timestamp birthday){
        this.birthday = birthday ;
        this.modify("birthday",birthday);
    }

    /**
     * 格式化日期 [档案出生日期]
     */
    public String formatBirthday(){
        if (this.birthday == null) {
            return null;
        }
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(birthday);
    }
    /**
     * 设置 [档案入党时间]
     */
    public void setPoliticaltime(Timestamp politicaltime){
        this.politicaltime = politicaltime ;
        this.modify("politicaltime",politicaltime);
    }

    /**
     * 格式化日期 [档案入党时间]
     */
    public String formatPoliticaltime(){
        if (this.politicaltime == null) {
            return null;
        }
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(politicaltime);
    }
    /**
     * 设置 [档案参加工作时间]
     */
    public void setStartworktime(Timestamp startworktime){
        this.startworktime = startworktime ;
        this.modify("startworktime",startworktime);
    }

    /**
     * 格式化日期 [档案参加工作时间]
     */
    public String formatStartworktime(){
        if (this.startworktime == null) {
            return null;
        }
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(startworktime);
    }
    /**
     * 设置 [是否有效]
     */
    public void setActiveflag(Integer activeflag){
        this.activeflag = activeflag ;
        this.modify("activeflag",activeflag);
    }

    /**
     * 设置 [人事档案目录]
     */
    public void setAttachment(String attachment){
        this.attachment = attachment ;
        this.modify("attachment",attachment);
    }

    /**
     * 设置 [备注]
     */
    public void setMemo(String memo){
        this.memo = memo ;
        this.modify("memo",memo);
    }

    /**
     * 设置 [档案借阅状态]
     */
    public void setBorrowstate(String borrowstate){
        this.borrowstate = borrowstate ;
        this.modify("borrowstate",borrowstate);
    }

    /**
     * 设置 [档案管理单位ID]
     */
    public void setHrorganizationid(String hrorganizationid){
        this.hrorganizationid = hrorganizationid ;
        this.modify("hrorganizationid",hrorganizationid);
    }


}


