一次大的提交
This commit is contained in:
@@ -1,5 +1,21 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
/// 告警工单配置实体
|
||||
class AlarmOrderConfigEntity extends Equatable {
|
||||
const AlarmOrderConfigEntity({
|
||||
required this.id,
|
||||
required this.name,
|
||||
this.code,
|
||||
});
|
||||
|
||||
final int id;
|
||||
final String name;
|
||||
final String? code;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id, name, code];
|
||||
}
|
||||
|
||||
/// 告警统计实体
|
||||
class AlarmCountEntity extends Equatable {
|
||||
const AlarmCountEntity({
|
||||
|
||||
@@ -46,6 +46,24 @@ class AlarmDetailEntity extends Equatable {
|
||||
required this.description,
|
||||
required this.suggestions,
|
||||
required this.historyData,
|
||||
this.alarmNo,
|
||||
this.alarmType,
|
||||
this.deviceId,
|
||||
this.deviceType,
|
||||
this.createTime,
|
||||
this.updateTime,
|
||||
this.handleUserId,
|
||||
this.handleUserName,
|
||||
this.handleTime,
|
||||
this.handleRemark,
|
||||
this.rootCause,
|
||||
this.handleSuggestion,
|
||||
this.siteId,
|
||||
this.orgId,
|
||||
this.notifySms,
|
||||
this.notifyTelegram,
|
||||
this.notifyEmail,
|
||||
this.handleResult,
|
||||
});
|
||||
|
||||
/// 告警ID
|
||||
@@ -84,6 +102,60 @@ class AlarmDetailEntity extends Equatable {
|
||||
/// 历史指标数据
|
||||
final HistoryMetrics historyData;
|
||||
|
||||
/// 告警编号
|
||||
final String? alarmNo;
|
||||
|
||||
/// 告警类型
|
||||
final int? alarmType;
|
||||
|
||||
/// 设备ID
|
||||
final String? deviceId;
|
||||
|
||||
/// 设备类型
|
||||
final String? deviceType;
|
||||
|
||||
/// 创建时间
|
||||
final String? createTime;
|
||||
|
||||
/// 更新时间
|
||||
final String? updateTime;
|
||||
|
||||
/// 处理人ID
|
||||
final String? handleUserId;
|
||||
|
||||
/// 处理人名称
|
||||
final String? handleUserName;
|
||||
|
||||
/// 处理时间
|
||||
final String? handleTime;
|
||||
|
||||
/// 处理备注
|
||||
final String? handleRemark;
|
||||
|
||||
/// 根因
|
||||
final String? rootCause;
|
||||
|
||||
/// 处理建议(原始字符串)
|
||||
final String? handleSuggestion;
|
||||
|
||||
/// 站点ID
|
||||
final int? siteId;
|
||||
|
||||
/// 组织ID
|
||||
final int? orgId;
|
||||
|
||||
/// 是否短信通知
|
||||
final int? notifySms;
|
||||
|
||||
/// 是否电报通知
|
||||
final int? notifyTelegram;
|
||||
|
||||
/// 是否邮件通知
|
||||
final int? notifyEmail;
|
||||
|
||||
/// 处理结果
|
||||
final String? handleResult;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
id,
|
||||
@@ -98,6 +170,24 @@ class AlarmDetailEntity extends Equatable {
|
||||
description,
|
||||
suggestions,
|
||||
historyData,
|
||||
alarmNo,
|
||||
alarmType,
|
||||
deviceId,
|
||||
deviceType,
|
||||
createTime,
|
||||
updateTime,
|
||||
handleUserId,
|
||||
handleUserName,
|
||||
handleTime,
|
||||
handleRemark,
|
||||
rootCause,
|
||||
handleSuggestion,
|
||||
siteId,
|
||||
orgId,
|
||||
notifySms,
|
||||
notifyTelegram,
|
||||
notifyEmail,
|
||||
handleResult,
|
||||
];
|
||||
|
||||
AlarmDetailEntity copyWith({
|
||||
@@ -113,6 +203,24 @@ class AlarmDetailEntity extends Equatable {
|
||||
String? description,
|
||||
List<String>? suggestions,
|
||||
HistoryMetrics? historyData,
|
||||
String? alarmNo,
|
||||
int? alarmType,
|
||||
String? deviceId,
|
||||
String? deviceType,
|
||||
String? createTime,
|
||||
String? updateTime,
|
||||
String? handleUserId,
|
||||
String? handleUserName,
|
||||
String? handleTime,
|
||||
String? handleRemark,
|
||||
String? rootCause,
|
||||
String? handleSuggestion,
|
||||
int? siteId,
|
||||
int? orgId,
|
||||
int? notifySms,
|
||||
int? notifyTelegram,
|
||||
int? notifyEmail,
|
||||
String? handleResult,
|
||||
}) {
|
||||
return AlarmDetailEntity(
|
||||
id: id ?? this.id,
|
||||
@@ -127,6 +235,24 @@ class AlarmDetailEntity extends Equatable {
|
||||
description: description ?? this.description,
|
||||
suggestions: suggestions ?? this.suggestions,
|
||||
historyData: historyData ?? this.historyData,
|
||||
alarmNo: alarmNo ?? this.alarmNo,
|
||||
alarmType: alarmType ?? this.alarmType,
|
||||
deviceId: deviceId ?? this.deviceId,
|
||||
deviceType: deviceType ?? this.deviceType,
|
||||
createTime: createTime ?? this.createTime,
|
||||
updateTime: updateTime ?? this.updateTime,
|
||||
handleUserId: handleUserId ?? this.handleUserId,
|
||||
handleUserName: handleUserName ?? this.handleUserName,
|
||||
handleTime: handleTime ?? this.handleTime,
|
||||
handleRemark: handleRemark ?? this.handleRemark,
|
||||
rootCause: rootCause ?? this.rootCause,
|
||||
handleSuggestion: handleSuggestion ?? this.handleSuggestion,
|
||||
siteId: siteId ?? this.siteId,
|
||||
orgId: orgId ?? this.orgId,
|
||||
notifySms: notifySms ?? this.notifySms,
|
||||
notifyTelegram: notifyTelegram ?? this.notifyTelegram,
|
||||
notifyEmail: notifyEmail ?? this.notifyEmail,
|
||||
handleResult: handleResult ?? this.handleResult,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
/// 告警派发工单实体
|
||||
class AlarmDispatchEntity {
|
||||
/// 告警ID
|
||||
final String alarmId;
|
||||
|
||||
/// 告警编号
|
||||
final String? alarmNo;
|
||||
|
||||
/// 告警原始设备类型(如 UAV, MOWER),用于映射 orderType
|
||||
final String? deviceType;
|
||||
|
||||
/// 映射后的工单类型(如 UAV_ERROR, MOWER_ERROR)
|
||||
final String? orderType;
|
||||
|
||||
/// 场站ID
|
||||
final int? siteId;
|
||||
|
||||
/// 场站名称
|
||||
final String? siteName;
|
||||
|
||||
/// 设备ID
|
||||
final String? deviceId;
|
||||
|
||||
/// 设备名称
|
||||
final String? deviceName;
|
||||
|
||||
/// 任务描述
|
||||
final String? description;
|
||||
|
||||
/// 问题等级
|
||||
final String? problemLevel;
|
||||
|
||||
/// 媒体文件路径列表
|
||||
final List<String>? mediaUrls;
|
||||
|
||||
/// 计划开始时间
|
||||
final DateTime? planStartTime;
|
||||
|
||||
/// 计划结束时间
|
||||
final DateTime? planEndTime;
|
||||
|
||||
const AlarmDispatchEntity({
|
||||
required this.alarmId,
|
||||
this.alarmNo,
|
||||
this.deviceType,
|
||||
this.orderType,
|
||||
this.siteId,
|
||||
this.siteName,
|
||||
this.deviceId,
|
||||
this.deviceName,
|
||||
this.description,
|
||||
this.problemLevel,
|
||||
this.mediaUrls,
|
||||
this.planStartTime,
|
||||
this.planEndTime,
|
||||
});
|
||||
|
||||
AlarmDispatchEntity copyWith({
|
||||
String? alarmId,
|
||||
String? alarmNo,
|
||||
String? deviceType,
|
||||
String? orderType,
|
||||
int? siteId,
|
||||
String? siteName,
|
||||
String? deviceId,
|
||||
String? deviceName,
|
||||
String? description,
|
||||
String? problemLevel,
|
||||
List<String>? mediaUrls,
|
||||
DateTime? planStartTime,
|
||||
DateTime? planEndTime,
|
||||
}) {
|
||||
return AlarmDispatchEntity(
|
||||
alarmId: alarmId ?? this.alarmId,
|
||||
alarmNo: alarmNo ?? this.alarmNo,
|
||||
deviceType: deviceType ?? this.deviceType,
|
||||
orderType: orderType ?? this.orderType,
|
||||
siteId: siteId ?? this.siteId,
|
||||
siteName: siteName ?? this.siteName,
|
||||
deviceId: deviceId ?? this.deviceId,
|
||||
deviceName: deviceName ?? this.deviceName,
|
||||
description: description ?? this.description,
|
||||
problemLevel: problemLevel ?? this.problemLevel,
|
||||
mediaUrls: mediaUrls ?? this.mediaUrls,
|
||||
planStartTime: planStartTime ?? this.planStartTime,
|
||||
planEndTime: planEndTime ?? this.planEndTime,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user