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

import jnpf.model.personnels.vo.app.FtbPersonnelsBubbleCountVO;
import lombok.Data;

@Data
public class TransferPositionCountDto {
    /**
     * 待审批数量
     */
    private Integer waitCount = 0;
    /**
     * 审批中数量
     */
    private Integer quantityUnderCount  = 0;

    /**
     * 审批不通过数量
     */
    private Integer noPassCount  = 0;

    /**
     * 审批通过数量
     */
    private Integer passCount  = 0;

    public static FtbPersonnelsBubbleCountVO covert(TransferPositionCountDto dto) {
        if (dto == null) {
            return null;
        }
        FtbPersonnelsBubbleCountVO ftbPersonnelsBubbleCountVO = new FtbPersonnelsBubbleCountVO();
        ftbPersonnelsBubbleCountVO.setPendingCount(Long.valueOf(dto.getWaitCount()));
        ftbPersonnelsBubbleCountVO.setQuantityUnderCount(Long.valueOf(dto.getQuantityUnderCount()));
        ftbPersonnelsBubbleCountVO.setApprovedCount(Long.valueOf(dto.getPassCount()));
        ftbPersonnelsBubbleCountVO.setApprovalFailedCount(Long.valueOf(dto.getNoPassCount()));
        return ftbPersonnelsBubbleCountVO;
    }

}
