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;
|
|
public String getKey() {
|
if (key == null) {
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
key = getFactory() + "##" + getMaterialCode() + "##" + sdf.format(getPredictDate());
|
}
|
return key;
|
}
|
|
}
|