1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.ruoyi.production.dto;
 
import com.ruoyi.production.service.impl.ProductionCostServiceImpl;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
 
import java.time.LocalDateTime;
import java.util.Objects;
 
/**
 * <br>
 * 聚合分组 Key 对象
 * </br>
 *
 * @author deslrey
 * @version 1.0
 * @since 2026/03/30 16:16
 */
@ApiModel(value = "GroupKeyDto类", description = "聚合分组 Key 对象")
public class GroupKeyDto {
 
    @ApiModelProperty("日期")
    private final LocalDateTime date;
 
    @ApiModelProperty("类别/订单名称")
    private final String name;
 
    @ApiModelProperty("规格型号")
    private final String model;
 
    @ApiModelProperty("产品类型/强度")
    private final String strength;
 
    @ApiModelProperty("单位")
    private final String unit;
 
    public GroupKeyDto(LocalDateTime date, String name, String model, String strength, String unit) {
        this.date = date;
        this.name = name;
        this.model = model;
        this.strength = strength;
        this.unit = unit;
    }
 
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        GroupKeyDto groupKey = (GroupKeyDto) o;
        return Objects.equals(date, groupKey.date) &&
                Objects.equals(name, groupKey.name) &&
                Objects.equals(model, groupKey.model) &&
                Objects.equals(strength, groupKey.strength) &&
                Objects.equals(unit, groupKey.unit);
    }
 
    @Override
    public int hashCode() {
        return Objects.hash(date, name, model, strength, unit);
    }
}