142 lines
4.2 KiB
Java
142 lines
4.2 KiB
Java
package com.designhub.vo;
|
||
|
||
import lombok.AllArgsConstructor;
|
||
import lombok.Builder;
|
||
import lombok.Data;
|
||
import lombok.NoArgsConstructor;
|
||
|
||
import java.math.BigDecimal;
|
||
import java.util.List;
|
||
|
||
/**
|
||
* 需求统计数据VO
|
||
*/
|
||
@Data
|
||
@Builder
|
||
@NoArgsConstructor
|
||
@AllArgsConstructor
|
||
public class DemandStatisticsVO {
|
||
|
||
/**
|
||
* 用户维度统计
|
||
*/
|
||
private List<UserDemandStat> userStats;
|
||
|
||
/**
|
||
* 部门维度统计
|
||
*/
|
||
private List<DeptDemandStat> deptStats;
|
||
|
||
/**
|
||
* 趋势数据
|
||
*/
|
||
private List<TrendData> trendData;
|
||
|
||
/**
|
||
* 类型分布
|
||
*/
|
||
private List<TypeDistribution> typeDistribution;
|
||
|
||
/**
|
||
* 总览数据
|
||
*/
|
||
private OverviewData overview;
|
||
|
||
/**
|
||
* 用户需求统计
|
||
*/
|
||
@Data
|
||
@Builder
|
||
@NoArgsConstructor
|
||
@AllArgsConstructor
|
||
public static class UserDemandStat {
|
||
private Long userId;
|
||
private String userName;
|
||
private String deptName;
|
||
private Integer totalDemands; // 总需求数
|
||
private Integer completedDemands; // 已完成数
|
||
private Integer pendingDemands; // 进行中数
|
||
private BigDecimal totalScore; // 总消耗积分
|
||
private BigDecimal avgScore; // 平均积分
|
||
private Double completionRate; // 完成率
|
||
private Double satisfactionRate; // 满意度(五星好评率)
|
||
}
|
||
|
||
/**
|
||
* 部门需求统计
|
||
*/
|
||
@Data
|
||
@Builder
|
||
@NoArgsConstructor
|
||
@AllArgsConstructor
|
||
public static class DeptDemandStat {
|
||
private Long deptId;
|
||
private String deptName;
|
||
private Integer totalDemands; // 总需求数
|
||
private Integer completedDemands; // 已完成数
|
||
private Integer pendingDemands; // 进行中数
|
||
private BigDecimal totalScore; // 总消耗积分
|
||
private BigDecimal remainingScore; // 剩余积分
|
||
private BigDecimal dailyLimit; // 日限额
|
||
private BigDecimal weeklyLimit; // 周限额
|
||
private BigDecimal monthlyLimit; // 月限额
|
||
private BigDecimal dailyUsed; // 今日已用
|
||
private BigDecimal weeklyUsed; // 本周已用
|
||
private BigDecimal monthlyUsed; // 本月已用
|
||
private Double utilizationRate; // 积分使用率
|
||
private String alertLevel; // 预警级别:safe/warning/danger
|
||
}
|
||
|
||
/**
|
||
* 趋势数据
|
||
*/
|
||
@Data
|
||
@Builder
|
||
@NoArgsConstructor
|
||
@AllArgsConstructor
|
||
public static class TrendData {
|
||
private String date; // 日期
|
||
private Integer demandCount; // 需求数量
|
||
private Integer completedCount; // 完成数量
|
||
private BigDecimal scoreUsed; // 积分消耗
|
||
}
|
||
|
||
/**
|
||
* 类型分布
|
||
*/
|
||
@Data
|
||
@Builder
|
||
@NoArgsConstructor
|
||
@AllArgsConstructor
|
||
public static class TypeDistribution {
|
||
private String typeName; // 类型名称
|
||
private Integer count; // 数量
|
||
private Double percentage; // 占比
|
||
private BigDecimal totalScore; // 总积分
|
||
}
|
||
|
||
/**
|
||
* 总览数据
|
||
*/
|
||
@Data
|
||
@Builder
|
||
@NoArgsConstructor
|
||
@AllArgsConstructor
|
||
public static class OverviewData {
|
||
private Integer totalDemands; // 总需求数
|
||
private Integer todayDemands; // 今日需求数
|
||
private Integer weekDemands; // 本周需求数
|
||
private Integer monthDemands; // 本月需求数
|
||
private Integer completedDemands; // 已完成数
|
||
private Integer pendingDemands; // 进行中数
|
||
private Integer canceledDemands; // 已取消数
|
||
private BigDecimal totalScoreUsed; // 总积分消耗
|
||
private BigDecimal todayScoreUsed; // 今日积分消耗
|
||
private BigDecimal weekScoreUsed; // 本周积分消耗
|
||
private BigDecimal monthScoreUsed; // 本月积分消耗
|
||
private Double avgCompletionTime; // 平均完成时长(小时)
|
||
private Double avgSatisfaction; // 平均满意度
|
||
}
|
||
}
|
||
|