package cn.iocoder.yudao.module.server.controller.admin.policycommunications.vo.analysis;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

@Schema(description = "管理后台 - 部门处理效能分析 Response VO")
@Data
public class PolicyCommunicationsDepartmentAnalysisRespVO {
    
    @Schema(description = "部门分析数据")
    private List<DepartmentAnalysisItem> departmentData;
    
    @Schema(description = "工作量分布")
    private List<WorkloadItem> workloadDistribution;
    
    @Schema(description = "效率排行")
    private List<EfficiencyItem> efficiencyRanking;
    
    @Data
    @Schema(description = "部门分析项")
    public static class DepartmentAnalysisItem {
        @Schema(description = "部门ID")
        private Long deptId;
        
        @Schema(description = "部门名称")
        private String deptName;
        
        @Schema(description = "接收总数")
        private Long totalCount;
        
        @Schema(description = "已回复数")
        private Long repliedCount;
        
        @Schema(description = "待处理数")
        private Long pendingCount;
        
        @Schema(description = "已公开数")
        private Long publishedCount;
        
        @Schema(description = "平均处理时长（天）")
        private Double avgProcessDays;
        
        @Schema(description = "回复率（%）")
        private Double replyRate;
        
        @Schema(description = "超时数量（>30天）")
        private Long overdueCount;
    }
    
    @Data
    @Schema(description = "工作量分布项")
    public static class WorkloadItem {
        @Schema(description = "部门名称")
        private String deptName;
        
        @Schema(description = "工作量（数量）")
        private Long workload;
        
        @Schema(description = "占比（%）")
        private Double percentage;
    }
    
    @Data
    @Schema(description = "效率排行项")
    public static class EfficiencyItem {
        @Schema(description = "部门名称")
        private String deptName;
        
        @Schema(description = "平均处理天数")
        private Double avgProcessDays;
        
        @Schema(description = "排名")
        private Integer rank;
    }
}