package jnpf.model.personnels.dto.staff.transfer;

import lombok.Data;

import java.util.Date;

@Data
public class TransferGrowthLogDto {

    /**
     * 调岗后组织
     */
    private String toOrg;

    /**
     * 调岗后岗位
     */
    private String toPositionId;

    /**
     * 调岗后职等
     */
    private String toRankId;


    /**
     * 调岗后组织 名称
     */
    private String toOrgName;

    /**
     * 调岗后岗位 名称
     */
    private String toPositionIdName;

    /**
     * 调岗后职等 名称
     */
    private String toRankIdName;

    /**
     * 调岗后直接主管 名称
     */
    private String toManagerName;


    /**
     * 调岗前组织
     */
    private String fromOrg;

    /**
     * 调岗前岗位
     */
    private String fromPositionId;

    /**
     * 调岗前职等
     */
    private String fromRankId;


    /**
     * 调岗前组织 名称
     */
    private String fromOrgName;

    /**
     * 调岗前岗位 名称
     */
    private String fromPositionIdName;

    /**
     * 调岗前职等 名称
     */
    private String fromRankIdName;

    /**
     * 调岗前直接主管 名称
     */
    private String fromManagerName;

    /**
     * 调岗后备注
     */
    private String remarks;

    /**
     *入职日期
     */
    private Date actualStartDate;

    /**
     * 办理人姓名
     */
    private String opUserName;

    public static  TransferGrowthLogDto covert(TransferPositionDto dto) {
        if (dto == null) {
            return null;
        }
        TransferGrowthLogDto transferGrowthLogDto = new TransferGrowthLogDto();
        transferGrowthLogDto.setToOrg(dto.getToOrg());
        transferGrowthLogDto.setToPositionId(dto.getToPositionId());
        transferGrowthLogDto.setToRankId(dto.getToRankId());
        transferGrowthLogDto.setToOrgName(dto.getToOrgName());
        transferGrowthLogDto.setToPositionIdName(dto.getToPositionIdName());
        transferGrowthLogDto.setToRankIdName(dto.getToRankIdName());
        transferGrowthLogDto.setToManagerName(dto.getToManagerName());
        transferGrowthLogDto.setFromOrg(dto.getFromOrg());
        transferGrowthLogDto.setFromPositionId(dto.getFromPositionId());
        transferGrowthLogDto.setFromRankId(dto.getFromRankId());
        transferGrowthLogDto.setFromOrgName(dto.getFromOrgName());
        transferGrowthLogDto.setFromPositionIdName(dto.getFromPositionIdName());
        transferGrowthLogDto.setFromRankIdName(dto.getFromRankIdName());
        transferGrowthLogDto.setFromManagerName(dto.getFromManagerName());
        transferGrowthLogDto.setRemarks(dto.getRemarks());
        transferGrowthLogDto.setActualStartDate(dto.getActualStartDate());
        transferGrowthLogDto.setOpUserName(dto.getOpUserName());
        return transferGrowthLogDto;
    }

}
