package com.aucma.production.domain.dto;

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

/**
 * 安灯生产监控看板数据传输对象
 * 
 * @author Yinq
 * @date 2025-12-30
 */
public class AndonDashboardDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 设备状态统计 */
    private DeviceStatusSummary deviceStatusSummary;

    /** 任务完成情况 */
    private TaskCompletionSummary taskCompletionSummary;

    /** OEE数据 */
    private OeeSummary oeeSummary;

    /** 利用率统计 */
    private UtilizationSummary utilizationSummary;

    /** 品质数据 */
    private QualitySummary qualitySummary;

    /** 安灯事件统计 */
    private AndonEventSummary andonEventSummary;

    public DeviceStatusSummary getDeviceStatusSummary() {
        return deviceStatusSummary;
    }

    public void setDeviceStatusSummary(DeviceStatusSummary deviceStatusSummary) {
        this.deviceStatusSummary = deviceStatusSummary;
    }

    public TaskCompletionSummary getTaskCompletionSummary() {
        return taskCompletionSummary;
    }

    public void setTaskCompletionSummary(TaskCompletionSummary taskCompletionSummary) {
        this.taskCompletionSummary = taskCompletionSummary;
    }

    public OeeSummary getOeeSummary() {
        return oeeSummary;
    }

    public void setOeeSummary(OeeSummary oeeSummary) {
        this.oeeSummary = oeeSummary;
    }

    public UtilizationSummary getUtilizationSummary() {
        return utilizationSummary;
    }

    public void setUtilizationSummary(UtilizationSummary utilizationSummary) {
        this.utilizationSummary = utilizationSummary;
    }

    public QualitySummary getQualitySummary() {
        return qualitySummary;
    }

    public void setQualitySummary(QualitySummary qualitySummary) {
        this.qualitySummary = qualitySummary;
    }

    public AndonEventSummary getAndonEventSummary() {
        return andonEventSummary;
    }

    public void setAndonEventSummary(AndonEventSummary andonEventSummary) {
        this.andonEventSummary = andonEventSummary;
    }

    /**
     * 设备状态统计
     */
    public static class DeviceStatusSummary implements Serializable {
        private static final long serialVersionUID = 1L;
        
        /** 设备总数 */
        private int totalDevices;
        /** 运行中设备数 */
        private int runningDevices;
        /** 停机设备数 */
        private int stoppedDevices;
        /** 故障设备数 */
        private int faultDevices;
        /** 待机设备数 */
        private int idleDevices;
        /** 设备状态详情列表 */
        private List<DeviceStatusDetail> deviceDetails;

        public int getTotalDevices() {
            return totalDevices;
        }

        public void setTotalDevices(int totalDevices) {
            this.totalDevices = totalDevices;
        }

        public int getRunningDevices() {
            return runningDevices;
        }

        public void setRunningDevices(int runningDevices) {
            this.runningDevices = runningDevices;
        }

        public int getStoppedDevices() {
            return stoppedDevices;
        }

        public void setStoppedDevices(int stoppedDevices) {
            this.stoppedDevices = stoppedDevices;
        }

        public int getFaultDevices() {
            return faultDevices;
        }

        public void setFaultDevices(int faultDevices) {
            this.faultDevices = faultDevices;
        }

        public int getIdleDevices() {
            return idleDevices;
        }

        public void setIdleDevices(int idleDevices) {
            this.idleDevices = idleDevices;
        }

        public List<DeviceStatusDetail> getDeviceDetails() {
            return deviceDetails;
        }

        public void setDeviceDetails(List<DeviceStatusDetail> deviceDetails) {
            this.deviceDetails = deviceDetails;
        }
    }

    /**
     * 设备状态详情
     */
    public static class DeviceStatusDetail implements Serializable {
        private static final long serialVersionUID = 1L;
        
        private String deviceCode;
        private String deviceName;
        private String productLineCode;
        private String productLineName;
        /** 状态：0-停机, 1-运行, 2-故障, 3-待机 */
        private Integer status;
        private String statusName;

        public String getDeviceCode() {
            return deviceCode;
        }

        public void setDeviceCode(String deviceCode) {
            this.deviceCode = deviceCode;
        }

        public String getDeviceName() {
            return deviceName;
        }

        public void setDeviceName(String deviceName) {
            this.deviceName = deviceName;
        }

        public String getProductLineCode() {
            return productLineCode;
        }

        public void setProductLineCode(String productLineCode) {
            this.productLineCode = productLineCode;
        }

        public String getProductLineName() {
            return productLineName;
        }

        public void setProductLineName(String productLineName) {
            this.productLineName = productLineName;
        }

        public Integer getStatus() {
            return status;
        }

        public void setStatus(Integer status) {
            this.status = status;
        }

        public String getStatusName() {
            return statusName;
        }

        public void setStatusName(String statusName) {
            this.statusName = statusName;
        }
    }

    /**
     * 任务完成情况统计
     */
    public static class TaskCompletionSummary implements Serializable {
        private static final long serialVersionUID = 1L;
        
        /** 今日计划数量 */
        private long todayPlanAmount;
        /** 今日完成数量 */
        private long todayCompleteAmount;
        /** 今日完成率 */
        private double todayCompletionRate;
        /** 本月计划数量 */
        private long monthPlanAmount;
        /** 本月完成数量 */
        private long monthCompleteAmount;
        /** 本月完成率 */
        private double monthCompletionRate;
        /** 各产线完成情况 */
        private List<LineTaskCompletion> lineCompletions;

        public long getTodayPlanAmount() {
            return todayPlanAmount;
        }

        public void setTodayPlanAmount(long todayPlanAmount) {
            this.todayPlanAmount = todayPlanAmount;
        }

        public long getTodayCompleteAmount() {
            return todayCompleteAmount;
        }

        public void setTodayCompleteAmount(long todayCompleteAmount) {
            this.todayCompleteAmount = todayCompleteAmount;
        }

        public double getTodayCompletionRate() {
            return todayCompletionRate;
        }

        public void setTodayCompletionRate(double todayCompletionRate) {
            this.todayCompletionRate = todayCompletionRate;
        }

        public long getMonthPlanAmount() {
            return monthPlanAmount;
        }

        public void setMonthPlanAmount(long monthPlanAmount) {
            this.monthPlanAmount = monthPlanAmount;
        }

        public long getMonthCompleteAmount() {
            return monthCompleteAmount;
        }

        public void setMonthCompleteAmount(long monthCompleteAmount) {
            this.monthCompleteAmount = monthCompleteAmount;
        }

        public double getMonthCompletionRate() {
            return monthCompletionRate;
        }

        public void setMonthCompletionRate(double monthCompletionRate) {
            this.monthCompletionRate = monthCompletionRate;
        }

        public List<LineTaskCompletion> getLineCompletions() {
            return lineCompletions;
        }

        public void setLineCompletions(List<LineTaskCompletion> lineCompletions) {
            this.lineCompletions = lineCompletions;
        }
    }

    /**
     * 产线任务完成情况
     */
    public static class LineTaskCompletion implements Serializable {
        private static final long serialVersionUID = 1L;
        
        private String productLineCode;
        private String productLineName;
        private long planAmount;
        private long completeAmount;
        private double completionRate;

        public String getProductLineCode() {
            return productLineCode;
        }

        public void setProductLineCode(String productLineCode) {
            this.productLineCode = productLineCode;
        }

        public String getProductLineName() {
            return productLineName;
        }

        public void setProductLineName(String productLineName) {
            this.productLineName = productLineName;
        }

        public long getPlanAmount() {
            return planAmount;
        }

        public void setPlanAmount(long planAmount) {
            this.planAmount = planAmount;
        }

        public long getCompleteAmount() {
            return completeAmount;
        }

        public void setCompleteAmount(long completeAmount) {
            this.completeAmount = completeAmount;
        }

        public double getCompletionRate() {
            return completionRate;
        }

        public void setCompletionRate(double completionRate) {
            this.completionRate = completionRate;
        }
    }

    /**
     * OEE数据统计
     */
    public static class OeeSummary implements Serializable {
        private static final long serialVersionUID = 1L;
        
        /** 整体OEE */
        private double overallOee;
        /** 可用率 */
        private double availability;
        /** 性能稼动率 */
        private double performance;
        /** 良品率 */
        private double quality;
        /** 计划运行时间（分钟） */
        private long plannedTimeMinutes;
        /** 停机时间（分钟） */
        private long downtimeMinutes;
        /** 各设备OEE详情 */
        private List<DeviceOeeDetail> deviceOeeDetails;

        public double getOverallOee() {
            return overallOee;
        }

        public void setOverallOee(double overallOee) {
            this.overallOee = overallOee;
        }

        public double getAvailability() {
            return availability;
        }

        public void setAvailability(double availability) {
            this.availability = availability;
        }

        public double getPerformance() {
            return performance;
        }

        public void setPerformance(double performance) {
            this.performance = performance;
        }

        public double getQuality() {
            return quality;
        }

        public void setQuality(double quality) {
            this.quality = quality;
        }

        public long getPlannedTimeMinutes() {
            return plannedTimeMinutes;
        }

        public void setPlannedTimeMinutes(long plannedTimeMinutes) {
            this.plannedTimeMinutes = plannedTimeMinutes;
        }

        public long getDowntimeMinutes() {
            return downtimeMinutes;
        }

        public void setDowntimeMinutes(long downtimeMinutes) {
            this.downtimeMinutes = downtimeMinutes;
        }

        public List<DeviceOeeDetail> getDeviceOeeDetails() {
            return deviceOeeDetails;
        }

        public void setDeviceOeeDetails(List<DeviceOeeDetail> deviceOeeDetails) {
            this.deviceOeeDetails = deviceOeeDetails;
        }
    }

    /**
     * 设备OEE详情
     */
    public static class DeviceOeeDetail implements Serializable {
        private static final long serialVersionUID = 1L;
        
        private String deviceCode;
        private String deviceName;
        private double oee;
        private double availability;
        private double performance;
        private double quality;

        public String getDeviceCode() {
            return deviceCode;
        }

        public void setDeviceCode(String deviceCode) {
            this.deviceCode = deviceCode;
        }

        public String getDeviceName() {
            return deviceName;
        }

        public void setDeviceName(String deviceName) {
            this.deviceName = deviceName;
        }

        public double getOee() {
            return oee;
        }

        public void setOee(double oee) {
            this.oee = oee;
        }

        public double getAvailability() {
            return availability;
        }

        public void setAvailability(double availability) {
            this.availability = availability;
        }

        public double getPerformance() {
            return performance;
        }

        public void setPerformance(double performance) {
            this.performance = performance;
        }

        public double getQuality() {
            return quality;
        }

        public void setQuality(double quality) {
            this.quality = quality;
        }
    }

    /**
     * 利用率统计
     */
    public static class UtilizationSummary implements Serializable {
        private static final long serialVersionUID = 1L;
        
        /** 整体利用率 */
        private double overallUtilization;
        /** 各产线利用率 */
        private List<LineUtilization> lineUtilizations;

        public double getOverallUtilization() {
            return overallUtilization;
        }

        public void setOverallUtilization(double overallUtilization) {
            this.overallUtilization = overallUtilization;
        }

        public List<LineUtilization> getLineUtilizations() {
            return lineUtilizations;
        }

        public void setLineUtilizations(List<LineUtilization> lineUtilizations) {
            this.lineUtilizations = lineUtilizations;
        }
    }

    /**
     * 产线利用率
     */
    public static class LineUtilization implements Serializable {
        private static final long serialVersionUID = 1L;
        
        private String productLineCode;
        private String productLineName;
        private double utilization;
        /** 运行时间（分钟） */
        private long runningMinutes;
        /** 计划时间（分钟） */
        private long plannedMinutes;

        public String getProductLineCode() {
            return productLineCode;
        }

        public void setProductLineCode(String productLineCode) {
            this.productLineCode = productLineCode;
        }

        public String getProductLineName() {
            return productLineName;
        }

        public void setProductLineName(String productLineName) {
            this.productLineName = productLineName;
        }

        public double getUtilization() {
            return utilization;
        }

        public void setUtilization(double utilization) {
            this.utilization = utilization;
        }

        public long getRunningMinutes() {
            return runningMinutes;
        }

        public void setRunningMinutes(long runningMinutes) {
            this.runningMinutes = runningMinutes;
        }

        public long getPlannedMinutes() {
            return plannedMinutes;
        }

        public void setPlannedMinutes(long plannedMinutes) {
            this.plannedMinutes = plannedMinutes;
        }
    }

    /**
     * 品质数据统计
     */
    public static class QualitySummary implements Serializable {
        private static final long serialVersionUID = 1L;
        
        /** 今日产量 */
        private long todayOutput;
        /** 今日良品数 */
        private long todayGoodCount;
        /** 今日不良品数 */
        private long todayDefectCount;
        /** 今日良品率 */
        private double todayYieldRate;
        /** 本月良品率 */
        private double monthYieldRate;
        /** 各产线品质数据 */
        private List<LineQuality> lineQualities;

        public long getTodayOutput() {
            return todayOutput;
        }

        public void setTodayOutput(long todayOutput) {
            this.todayOutput = todayOutput;
        }

        public long getTodayGoodCount() {
            return todayGoodCount;
        }

        public void setTodayGoodCount(long todayGoodCount) {
            this.todayGoodCount = todayGoodCount;
        }

        public long getTodayDefectCount() {
            return todayDefectCount;
        }

        public void setTodayDefectCount(long todayDefectCount) {
            this.todayDefectCount = todayDefectCount;
        }

        public double getTodayYieldRate() {
            return todayYieldRate;
        }

        public void setTodayYieldRate(double todayYieldRate) {
            this.todayYieldRate = todayYieldRate;
        }

        public double getMonthYieldRate() {
            return monthYieldRate;
        }

        public void setMonthYieldRate(double monthYieldRate) {
            this.monthYieldRate = monthYieldRate;
        }

        public List<LineQuality> getLineQualities() {
            return lineQualities;
        }

        public void setLineQualities(List<LineQuality> lineQualities) {
            this.lineQualities = lineQualities;
        }
    }

    /**
     * 产线品质数据
     */
    public static class LineQuality implements Serializable {
        private static final long serialVersionUID = 1L;
        
        private String productLineCode;
        private String productLineName;
        private long output;
        private long goodCount;
        private long defectCount;
        private double yieldRate;

        public String getProductLineCode() {
            return productLineCode;
        }

        public void setProductLineCode(String productLineCode) {
            this.productLineCode = productLineCode;
        }

        public String getProductLineName() {
            return productLineName;
        }

        public void setProductLineName(String productLineName) {
            this.productLineName = productLineName;
        }

        public long getOutput() {
            return output;
        }

        public void setOutput(long output) {
            this.output = output;
        }

        public long getGoodCount() {
            return goodCount;
        }

        public void setGoodCount(long goodCount) {
            this.goodCount = goodCount;
        }

        public long getDefectCount() {
            return defectCount;
        }

        public void setDefectCount(long defectCount) {
            this.defectCount = defectCount;
        }

        public double getYieldRate() {
            return yieldRate;
        }

        public void setYieldRate(double yieldRate) {
            this.yieldRate = yieldRate;
        }
    }

    /**
     * 安灯事件统计
     */
    public static class AndonEventSummary implements Serializable {
        private static final long serialVersionUID = 1L;
        
        /** 今日事件总数 */
        private int todayTotal;
        /** 待处理事件数 */
        private int pendingCount;
        /** 处理中事件数 */
        private int processingCount;
        /** 已解决事件数 */
        private int resolvedCount;
        /** 平均响应时间（分钟） */
        private double avgResponseMinutes;
        /** 平均解决时间（分钟） */
        private double avgResolveMinutes;
        /** 各类型事件统计 */
        private List<EventTypeStats> eventTypeStats;

        public int getTodayTotal() {
            return todayTotal;
        }

        public void setTodayTotal(int todayTotal) {
            this.todayTotal = todayTotal;
        }

        public int getPendingCount() {
            return pendingCount;
        }

        public void setPendingCount(int pendingCount) {
            this.pendingCount = pendingCount;
        }

        public int getProcessingCount() {
            return processingCount;
        }

        public void setProcessingCount(int processingCount) {
            this.processingCount = processingCount;
        }

        public int getResolvedCount() {
            return resolvedCount;
        }

        public void setResolvedCount(int resolvedCount) {
            this.resolvedCount = resolvedCount;
        }

        public double getAvgResponseMinutes() {
            return avgResponseMinutes;
        }

        public void setAvgResponseMinutes(double avgResponseMinutes) {
            this.avgResponseMinutes = avgResponseMinutes;
        }

        public double getAvgResolveMinutes() {
            return avgResolveMinutes;
        }

        public void setAvgResolveMinutes(double avgResolveMinutes) {
            this.avgResolveMinutes = avgResolveMinutes;
        }

        public List<EventTypeStats> getEventTypeStats() {
            return eventTypeStats;
        }

        public void setEventTypeStats(List<EventTypeStats> eventTypeStats) {
            this.eventTypeStats = eventTypeStats;
        }
    }

    /**
     * 事件类型统计
     */
    public static class EventTypeStats implements Serializable {
        private static final long serialVersionUID = 1L;
        
        private String callTypeCode;
        private String callTypeName;
        private int count;
        private int pendingCount;
        private int resolvedCount;

        public String getCallTypeCode() {
            return callTypeCode;
        }

        public void setCallTypeCode(String callTypeCode) {
            this.callTypeCode = callTypeCode;
        }

        public String getCallTypeName() {
            return callTypeName;
        }

        public void setCallTypeName(String callTypeName) {
            this.callTypeName = callTypeName;
        }

        public int getCount() {
            return count;
        }

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

        public int getPendingCount() {
            return pendingCount;
        }

        public void setPendingCount(int pendingCount) {
            this.pendingCount = pendingCount;
        }

        public int getResolvedCount() {
            return resolvedCount;
        }

        public void setResolvedCount(int resolvedCount) {
            this.resolvedCount = resolvedCount;
        }
    }
}
