package cn.ibizlab.humanresource.core.pcm.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_HRTRANSFERAPPLY",resultMap = "HRTransferApplyResultMap")
public class HRTransferApply extends EntityMP implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 调动申请标识
     */
    @DEField(isKeyField=true)
    @TableId(value= "hrtransferapplyid",type=IdType.ASSIGN_UUID)
    @JSONField(name = "hrtransferapplyid")
    @JsonProperty("hrtransferapplyid")
    private String hrtransferapplyid;
    /**
     * 调动申请名称
     */
    @TableField(value = "hrtransferapplyname")
    @JSONField(name = "hrtransferapplyname")
    @JsonProperty("hrtransferapplyname")
    private String hrtransferapplyname;
    /**
     * 更新人
     */
    @DEField(preType = DEPredefinedFieldType.UPDATEMAN)
    @TableField(value = "updateman")
    @JSONField(name = "updateman")
    @JsonProperty("updateman")
    private String updateman;
    /**
     * 建立时间
     */
    @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.CREATEMAN)
    @TableField(value = "createman" , fill = FieldFill.INSERT)
    @JSONField(name = "createman")
    @JsonProperty("createman")
    private String createman;
    /**
     * 更新时间
     */
    @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;
    /**
     * 部门ID
     */
    @TableField(exist = false)
    @JSONField(name = "organizationid")
    @JsonProperty("organizationid")
    private String organizationid;
    /**
     * 部门
     */
    @TableField(exist = false)
    @JSONField(name = "organizationname")
    @JsonProperty("organizationname")
    private String organizationname;
    /**
     * 职务
     */
    @TableField(value = "hrdutyname")
    @JSONField(name = "hrdutyname")
    @JsonProperty("hrdutyname")
    private String hrdutyname;
    /**
     * 职位
     */
    @TableField(value = "hrpostname")
    @JSONField(name = "hrpostname")
    @JsonProperty("hrpostname")
    private String hrpostname;
    /**
     * 新组织ID
     */
    @TableField(value = "hrorganizationid2")
    @JSONField(name = "hrorganizationid2")
    @JsonProperty("hrorganizationid2")
    private String hrorganizationid2;
    /**
     * 新部门
     */
    @TableField(exist = false)
    @JSONField(name = "hrorganizationname2")
    @JsonProperty("hrorganizationname2")
    private String hrorganizationname2;
    /**
     * 新职位标识
     */
    @TableField(value = "hrpostid2")
    @JSONField(name = "hrpostid2")
    @JsonProperty("hrpostid2")
    private String hrpostid2;
    /**
     * 新职位
     */
    @TableField(exist = false)
    @JSONField(name = "hrpostname2")
    @JsonProperty("hrpostname2")
    private String hrpostname2;
    /**
     * 新职务
     */
    @TableField(value = "hrdutyname2")
    @JSONField(name = "hrdutyname2")
    @JsonProperty("hrdutyname2")
    private String hrdutyname2;
    /**
     * 生效日期
     */
    @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 = "attachment")
    @JSONField(name = "attachment")
    @JsonProperty("attachment")
    private String attachment;
    /**
     * 工作流实例
     */
    @TableField(value = "wfinstanceid")
    @JSONField(name = "wfinstanceid")
    @JsonProperty("wfinstanceid")
    private String wfinstanceid;
    /**
     * 工作流版本
     */
    @TableField(value = "wfversion")
    @JSONField(name = "wfversion")
    @JsonProperty("wfversion")
    private String wfversion;
    /**
     * 工作流步骤
     */
    @TableField(value = "wfstep")
    @JSONField(name = "wfstep")
    @JsonProperty("wfstep")
    private String wfstep;
    /**
     * 工作流状态
     */
    @TableField(value = "wfstate")
    @JSONField(name = "wfstate")
    @JsonProperty("wfstate")
    private Integer wfstate;
    /**
     * 工作流业务状态
     */
    @DEField(defaultValue = "10" , defaultValueType = DEFieldDefaultValueType.PARAM)
    @TableField(value = "checkstatus")
    @JSONField(name = "checkstatus")
    @JsonProperty("checkstatus")
    private String checkstatus;

    /**
     * 员工
     */
    @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 hrorganization2;

    /**
     * 新职位
     */
    @JsonIgnore
    @JSONField(serialize = false)
    @TableField(exist = false)
    private cn.ibizlab.humanresource.core.humanresource.domain.HRPost hrpost2;



    /**
     * 设置 [调动申请名称]
     */
    public void setHrtransferapplyname(String hrtransferapplyname){
        this.hrtransferapplyname = hrtransferapplyname ;
        this.modify("hrtransferapplyname",hrtransferapplyname);
    }

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

    /**
     * 设置 [职务]
     */
    public void setHrdutyname(String hrdutyname){
        this.hrdutyname = hrdutyname ;
        this.modify("hrdutyname",hrdutyname);
    }

    /**
     * 设置 [职位]
     */
    public void setHrpostname(String hrpostname){
        this.hrpostname = hrpostname ;
        this.modify("hrpostname",hrpostname);
    }

    /**
     * 设置 [新组织ID]
     */
    public void setHrorganizationid2(String hrorganizationid2){
        this.hrorganizationid2 = hrorganizationid2 ;
        this.modify("hrorganizationid2",hrorganizationid2);
    }

    /**
     * 设置 [新职位标识]
     */
    public void setHrpostid2(String hrpostid2){
        this.hrpostid2 = hrpostid2 ;
        this.modify("hrpostid2",hrpostid2);
    }

    /**
     * 设置 [新职务]
     */
    public void setHrdutyname2(String hrdutyname2){
        this.hrdutyname2 = hrdutyname2 ;
        this.modify("hrdutyname2",hrdutyname2);
    }

    /**
     * 设置 [生效日期]
     */
    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 setAttachment(String attachment){
        this.attachment = attachment ;
        this.modify("attachment",attachment);
    }

    /**
     * 设置 [工作流实例]
     */
    public void setWfinstanceid(String wfinstanceid){
        this.wfinstanceid = wfinstanceid ;
        this.modify("wfinstanceid",wfinstanceid);
    }

    /**
     * 设置 [工作流版本]
     */
    public void setWfversion(String wfversion){
        this.wfversion = wfversion ;
        this.modify("wfversion",wfversion);
    }

    /**
     * 设置 [工作流步骤]
     */
    public void setWfstep(String wfstep){
        this.wfstep = wfstep ;
        this.modify("wfstep",wfstep);
    }

    /**
     * 设置 [工作流状态]
     */
    public void setWfstate(Integer wfstate){
        this.wfstate = wfstate ;
        this.modify("wfstate",wfstate);
    }

    /**
     * 设置 [工作流业务状态]
     */
    public void setCheckstatus(String checkstatus){
        this.checkstatus = checkstatus ;
        this.modify("checkstatus",checkstatus);
    }


}


