接入设备故障告警和场站实时任务进度
This commit is contained in:
@@ -19,6 +19,9 @@ class DeviceDataModel {
|
||||
|
||||
/// 机型编码(如 MC700PRO)
|
||||
final String? productModel;
|
||||
final String? deviceAlias;
|
||||
final int? orgId;
|
||||
final int? siteId;
|
||||
|
||||
const DeviceDataModel({
|
||||
required this.deviceId,
|
||||
@@ -34,6 +37,9 @@ class DeviceDataModel {
|
||||
this.isRobot = false,
|
||||
this.productName = '',
|
||||
this.productModel,
|
||||
this.deviceAlias,
|
||||
this.orgId,
|
||||
this.siteId,
|
||||
});
|
||||
|
||||
/// 从 JSON 创建数据模型
|
||||
@@ -51,6 +57,9 @@ class DeviceDataModel {
|
||||
radiation: json['radiation']?.toDouble(),
|
||||
productName: (json['productName'] as String?) ?? '',
|
||||
productModel: json['productModel'] as String?,
|
||||
deviceAlias: json['deviceAlias'] as String?,
|
||||
orgId: int.tryParse('${json['orgId']}'),
|
||||
siteId: int.tryParse('${json['siteId']}'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -69,6 +78,9 @@ class DeviceDataModel {
|
||||
'radiation': radiation,
|
||||
'productName': productName,
|
||||
'productModel': productModel,
|
||||
'deviceAlias': deviceAlias,
|
||||
'orgId': orgId,
|
||||
'siteId': siteId,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -88,6 +100,9 @@ class DeviceDataModel {
|
||||
isRobot: isRobot,
|
||||
productName: productName,
|
||||
productModel: productModel,
|
||||
deviceAlias: deviceAlias,
|
||||
orgId: orgId,
|
||||
siteId: siteId,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user