中央热水项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
947 B

package com.mh.user.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import java.util.Collections;
import java.util.List;
/**
* @author LJF
* @version 1.0
* @project EEMCS
* @description 研华网关发送接收数据
* @date 2025-01-22 14:43:15
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class SanShiFengReceiver<T> {
/**
* 数据集合
*/
private List<T> datas;
/**
* 主动上报数据时间(带T类型)
*/
private String sn;
private String plcName;
private String projectName;
private String time;
// 确保在 getDatas() 方法中正确处理泛型类型
public List<SanShiFengDatas> getDatas() {
// 如果是从 JSON 反序列化,使用 TypeReference
if (this.datas != null) {
return (List<SanShiFengDatas>) this.datas;
}
return Collections.emptyList();
}
}