package cn.com.victorysoft.business.calc.dto;

import cn.com.victorysoft.business.indicator.entity.UnitMonth;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class IndexUnitMonthDto {

    // 本单位本月
    private UnitMonth current;
    // 本单位上月
    private UnitMonth prevMonth;
    // 本单位上年同期
    private UnitMonth prevYear;

    // 本单位及子单位数据
    private List<UnitMonth> list;

    public void setCurrent(UnitMonth current) {
        this.current = current != null ? current : new UnitMonth();
    }

    public void setPrevMonth(UnitMonth prevMonth) {
        this.prevMonth = prevMonth != null ? prevMonth : new UnitMonth();
    }

    public void setPrevYear(UnitMonth prevYear) {
        this.prevYear = prevYear != null ? prevYear : new UnitMonth();
    }
}
