package com.ruoyi.oa.domain.vo.dashboard;

import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 工资趋势VO
 */
@Data
public class SalaryTrendVo {
    /**
     * 月份列表
     */
    private List<Integer> months;
    
    /**
     * 实发工资趋势
     */
    private List<BigDecimal> netSalaryTrend;
    
    /**
     * 应发工资趋势
     */
    private List<BigDecimal> grossSalaryTrend;
    
    /**
     * 人均实发工资趋势
     */
    private List<BigDecimal> avgNetSalaryTrend;
    
    public SalaryTrendVo(List<SalaryTrendPointVo> points) {
        this.months = new ArrayList<>();
        this.netSalaryTrend = new ArrayList<>();
        this.grossSalaryTrend = new ArrayList<>();
        this.avgNetSalaryTrend = new ArrayList<>();
        
        for (SalaryTrendPointVo point : points) {
            this.months.add(point.getMonth());
            this.netSalaryTrend.add(point.getTotalNetSalary());
            this.grossSalaryTrend.add(point.getTotalGrossSalary());
            this.avgNetSalaryTrend.add(point.getAvgNetSalary());
        }
    }
}