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_HRARCHIVESMOVE",resultMap = "HRArchivesMoveResultMap")
public class HRArchivesMove extends EntityMP implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 档案调档标识
     */
    @DEField(isKeyField=true)
    @TableId(value= "hrarchivesmoveid",type=IdType.ASSIGN_UUID)
    @JSONField(name = "hrarchivesmoveid")
    @JsonProperty("hrarchivesmoveid")
    private String hrarchivesmoveid;
    /**
     * 档案调档名称
     */
    @TableField(value = "hrarchivesmovename")
    @JSONField(name = "hrarchivesmovename")
    @JsonProperty("hrarchivesmovename")
    private String hrarchivesmovename;
    /**
     * 更新人
     */
    @DEField(preType = DEPredefinedFieldType.UPDATEMAN)
    @TableField(value = "updateman")
    @JSONField(name = "updateman")
    @JsonProperty("updateman")
    private String updateman;
    /**
     * 建立人
     */
    @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.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 = "hrarchivesid")
    @JSONField(name = "hrarchivesid")
    @JsonProperty("hrarchivesid")
    private String hrarchivesid;
    /**
     * 调档类型
     */
    @TableField(value = "movetype")
    @JSONField(name = "movetype")
    @JsonProperty("movetype")
    private String movetype;
    /**
     * 调入单位
     */
    @TableField(value = "moveinorg")
    @JSONField(name = "moveinorg")
    @JsonProperty("moveinorg")
    private String moveinorg;
    /**
     * 调出单位
     */
    @TableField(value = "moveoutorg")
    @JSONField(name = "moveoutorg")
    @JsonProperty("moveoutorg")
    private String moveoutorg;
    /**
     * 调档时间
     */
    @TableField(value = "activetime")
    @JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "activetime" , format="yyyy-MM-dd")
    @JsonProperty("activetime")
    private Timestamp activetime;
    /**
     * 备注
     */
    @TableField(value = "memo")
    @JSONField(name = "memo")
    @JsonProperty("memo")
    private String memo;

    /**
     * 员工档案
     */
    @JsonIgnore
    @JSONField(serialize = false)
    @TableField(exist = false)
    private cn.ibizlab.humanresource.core.humanresource.domain.HRArchives hrarchives;



    /**
     * 设置 [档案调档名称]
     */
    public void setHrarchivesmovename(String hrarchivesmovename){
        this.hrarchivesmovename = hrarchivesmovename ;
        this.modify("hrarchivesmovename",hrarchivesmovename);
    }

    /**
     * 设置 [档案信息标识]
     */
    public void setHrarchivesid(String hrarchivesid){
        this.hrarchivesid = hrarchivesid ;
        this.modify("hrarchivesid",hrarchivesid);
    }

    /**
     * 设置 [调档类型]
     */
    public void setMovetype(String movetype){
        this.movetype = movetype ;
        this.modify("movetype",movetype);
    }

    /**
     * 设置 [调入单位]
     */
    public void setMoveinorg(String moveinorg){
        this.moveinorg = moveinorg ;
        this.modify("moveinorg",moveinorg);
    }

    /**
     * 设置 [调出单位]
     */
    public void setMoveoutorg(String moveoutorg){
        this.moveoutorg = moveoutorg ;
        this.modify("moveoutorg",moveoutorg);
    }

    /**
     * 设置 [调档时间]
     */
    public void setActivetime(Timestamp activetime){
        this.activetime = activetime ;
        this.modify("activetime",activetime);
    }

    /**
     * 格式化日期 [调档时间]
     */
    public String formatActivetime(){
        if (this.activetime == null) {
            return null;
        }
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(activetime);
    }
    /**
     * 设置 [备注]
     */
    public void setMemo(String memo){
        this.memo = memo ;
        this.modify("memo",memo);
    }


}


