package com.sundot.airport.exam.dto;

import java.io.Serializable;
import java.util.List;

/**
 * <b>功能名：</b>DashboardExpiredAnalysisDTO<br>
 * <b>说明：</b> 逾期任务分析数据DTO <br>
 * <b>著作权：</b> Copyright (C) 2025 SUNDOT CORPORATION<br>
 * <b>修改履历：
 *
 * @author 2025-01-19
 */
public class DashboardExpiredAnalysisDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 按逾期天数分组
     */
    private List<ExpiredGroupItem> byExpireDays;

    /**
     * 按部门分组
     */
    private List<ExpiredGroupItem> byDept;

    /**
     * 按角色分组
     */
    private List<ExpiredGroupItem> byRole;

    /**
     * 总逾期任务数
     */
    private Long totalExpired;

    public List<ExpiredGroupItem> getByExpireDays() {
        return byExpireDays;
    }

    public void setByExpireDays(List<ExpiredGroupItem> byExpireDays) {
        this.byExpireDays = byExpireDays;
    }

    public List<ExpiredGroupItem> getByDept() {
        return byDept;
    }

    public void setByDept(List<ExpiredGroupItem> byDept) {
        this.byDept = byDept;
    }

    public List<ExpiredGroupItem> getByRole() {
        return byRole;
    }

    public void setByRole(List<ExpiredGroupItem> byRole) {
        this.byRole = byRole;
    }

    public Long getTotalExpired() {
        return totalExpired;
    }

    public void setTotalExpired(Long totalExpired) {
        this.totalExpired = totalExpired;
    }

    /**
     * 逾期任务分组项
     */
    public static class ExpiredGroupItem implements Serializable {

        private static final long serialVersionUID = 1L;

        /**
         * 分组名称/范围 (如: "1天内", "运行控制部", "管制员")
         */
        private String name;

        /**
         * 数量
         */
        private Long count;

        /**
         * 占比(%)
         */
        private Double percentage;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Long getCount() {
            return count;
        }

        public void setCount(Long count) {
            this.count = count;
        }

        public Double getPercentage() {
            return percentage;
        }

        public void setPercentage(Double percentage) {
            this.percentage = percentage;
        }
    }

    @Override
    public String toString() {
        return "DashboardExpiredAnalysisDTO{" +
                "byExpireDays=" + byExpireDays +
                ", byDept=" + byDept +
                ", byRole=" + byRole +
                ", totalExpired=" + totalExpired +
                '}';
    }
}
