sfd
2025-05-21 029cac7aa07914999f7bf85a1e052ae1c4421772
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
62
63
64
65
66
67
68
69
70
71
package com.aps.core.domain;
 
import com.aps.common.core.annotation.Excel;
import com.aps.common.core.web.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.data.annotation.Id;
 
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
 
/**
 * 管路手工气体预测数据对象 aps_gas_pipeline_prediction
 * 
 * @author ruoyi
 * @date 2025-05-19
 */
@Data
@Schema(description = "管路手工气体预测数据实体类")
public class ApsGasPipelinePrediction extends BaseEntity
{
    private static final long serialVersionUID = 1L;
 
    @Id
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    /** ID */
    @Schema(description = "ID")
    private Long id;
 
    /** 生产基地 */
    @Excel(name = "生产基地")
    @Schema(description = "生产基地")
    private String factory;
 
    /** 料号 */
    @Excel(name = "料号")
    @Schema(description = "料号")
    private String materialCode;
 
    /** 预测日期 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "预测日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "预测日期")
    private Timestamp predictDate;
 
    /** 数量 */
    @Excel(name = "数量")
    @Schema(description = "数量")
    private BigDecimal predictQuantity;
 
    @JsonIgnore
    @TableField(exist = false)
    private String key;
 
    @JsonIgnore
    public String getKey() {
        if (key == null && getPredictDate() != null) {
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
            key = getFactory() + "##" + getMaterialCode() + "##" + sdf.format(getPredictDate());
        }
        return key;
    }
 
}