package jnpf.model.personnels.dto.config;

import com.fasterxml.jackson.annotation.JsonIgnore;
import jnpf.model.personnels.po.FtbPersonnelsAuditSubConfig;
import lombok.Data;

/**
 * @Title:FtbPersonnelsAuditConfigInfoDTO
 * @Author:peng.hao
 * @create: 2024/2/211:09
 */
@Data
public class FtbPersonnelsAuditConfigInfoDTO {

    private String id;
    /**
     * 主配置表Id
     */
    private String masterId;


    /**
     * 审核人Id
     */
    private String auditorId;

    /**
     * 审核人名称
     */
    private String auditorName;

    /**
     * 组织id
     */
    private String orgId;
    /**
     * 组织id
     */
    private String orgName;

    /**
     * 岗位id
     */
    private String postId;

    /**
     * 岗位名称
     */
    private String postName;

    /**
     * 职等id
     */
    private String gradeId;

    /** 职等名称 */
    private String gradeName;

    /**
     * 薪资填写(0否,1是)
     */
    private String payrollEntry;

    /** 薪资审核(0否,1是) */
    private String payrollAudit;

    /** 黑名单填写(0否,1是) (v1.1) */
    private String blacklistFilling;

    /** 审核流程等级 */
    private Integer auditProcessLevel;

    /**
     * 审核前一个Id
     */
    @JsonIgnore
    private String preReview;

    /**
     * 审核下一个Id
     */
    @JsonIgnore
    private String nextReview;

    public static FtbPersonnelsAuditSubConfig coverFtbPersonnelsAuditSubConfig(FtbPersonnelsAuditConfigInfoDTO dto) {
        if (dto == null) {
            return null;
        }
        FtbPersonnelsAuditSubConfig ftbPersonnelsAuditSubConfig = new FtbPersonnelsAuditSubConfig();
        ftbPersonnelsAuditSubConfig.setId(dto.getId());
        ftbPersonnelsAuditSubConfig.setMasterId(dto.getMasterId());
        ftbPersonnelsAuditSubConfig.setAuditorId(dto.getAuditorId());
        ftbPersonnelsAuditSubConfig.setAuditorName(dto.getAuditorName());
        ftbPersonnelsAuditSubConfig.setOrgId(dto.getOrgId());
        ftbPersonnelsAuditSubConfig.setOrgName(dto.getOrgName());
        ftbPersonnelsAuditSubConfig.setPostId(dto.getPostId());
        ftbPersonnelsAuditSubConfig.setPostName(dto.getPostName());
        ftbPersonnelsAuditSubConfig.setGradeId(dto.getGradeId());
        ftbPersonnelsAuditSubConfig.setGradeName(dto.getGradeName());
        ftbPersonnelsAuditSubConfig.setPayrollEntry(dto.getPayrollEntry());
        ftbPersonnelsAuditSubConfig.setPayrollAudit(dto.getPayrollAudit());
        ftbPersonnelsAuditSubConfig.setAuditProcessLevel(dto.getAuditProcessLevel());
        ftbPersonnelsAuditSubConfig.setPreReview(dto.getPreReview());
        ftbPersonnelsAuditSubConfig.setNextReview(dto.getNextReview());
        ftbPersonnelsAuditSubConfig.setBlacklistFilling(dto.getBlacklistFilling());
        return ftbPersonnelsAuditSubConfig;
    }

}
