package jnpf.model.personnels.vo.analysis;

import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 人数占比
 * @Author: peng.hao
 * @create: 2024/10/14
 */
@Data
public class FtbPersonnelsPeopleInfoRatioVO {
    /**
     * 名称
     */
    @ExcelProperty(value = "名称")
    private String name;

    /**
     * 总人数
     */
    @ExcelProperty(value = "总人数")
    private Integer totalCount;
    /**
     * 当前人数
     */
    @ExcelProperty(value = "当前人数")
    private Integer currentCount;
    /**
     * 占比率
     */
    @ExcelProperty(value = "占比率")
    private BigDecimal ratio;

    public static FtbPersonnelsPeopleInfoRatioVO covert(FtbPersonnelsPeoplePostRatioVO c) {
        if (c == null) {
            return null;
        }
        FtbPersonnelsPeopleInfoRatioVO ftbPersonnelsPeopleInfoRatioVO = new FtbPersonnelsPeopleInfoRatioVO();
        ftbPersonnelsPeopleInfoRatioVO.setName(c.getPostName());
        ftbPersonnelsPeopleInfoRatioVO.setTotalCount(c.getTotalCount());
        ftbPersonnelsPeopleInfoRatioVO.setCurrentCount(c.getCurrentCount());
        ftbPersonnelsPeopleInfoRatioVO.setRatio(c.getRatio());
        return ftbPersonnelsPeopleInfoRatioVO;
    }
}
