fix:增加wifi标识、设备不在线标识

This commit is contained in:
liyi 2025-02-17 17:13:18 +08:00
parent cf8bc3ad05
commit 65d853860b
2 changed files with 36 additions and 11 deletions

View File

@ -1,5 +1,6 @@
class LockSetInfoEntity { import 'package:star_lock/main/lockMian/entity/lockListInfo_entity.dart';
class LockSetInfoEntity {
LockSetInfoEntity( LockSetInfoEntity(
{this.errorCode, this.description, this.errorMsg, this.data}); {this.errorCode, this.description, this.errorMsg, this.data});
@ -9,6 +10,7 @@ class LockSetInfoEntity {
errorMsg = json['errorMsg']; errorMsg = json['errorMsg'];
data = json['data'] != null ? LockSetInfoData.fromJson(json['data']) : null; data = json['data'] != null ? LockSetInfoData.fromJson(json['data']) : null;
} }
int? errorCode; int? errorCode;
String? description; String? description;
String? errorMsg; String? errorMsg;
@ -27,7 +29,6 @@ class LockSetInfoEntity {
} }
class LockSetInfoData { class LockSetInfoData {
LockSetInfoData( LockSetInfoData(
{this.lockId, {this.lockId,
this.lockStatus, this.lockStatus,
@ -50,6 +51,7 @@ class LockSetInfoData {
? LockSettingInfo.fromJson(json['lockSettingInfo']) ? LockSettingInfo.fromJson(json['lockSettingInfo'])
: null; : null;
} }
int? lockId; int? lockId;
LockStatus? lockStatus; LockStatus? lockStatus;
LockFeature? lockFeature; LockFeature? lockFeature;
@ -76,12 +78,12 @@ class LockSetInfoData {
} }
class LockStatus { class LockStatus {
LockStatus({this.roomStatus}); LockStatus({this.roomStatus});
LockStatus.fromJson(Map<String, dynamic> json) { LockStatus.fromJson(Map<String, dynamic> json) {
roomStatus = json['roomStatus']; roomStatus = json['roomStatus'];
} }
int? roomStatus; int? roomStatus;
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -91,7 +93,8 @@ class LockStatus {
} }
} }
class LockFeature { // 0: 1: class LockFeature {
// 0: 1:
LockFeature({ LockFeature({
this.password, this.password,
@ -206,6 +209,7 @@ class LockFeature { //人脸开关 0:关闭 1:开启
abnormalWarn = json['abnormalWarn']; abnormalWarn = json['abnormalWarn'];
isSupportBackupBattery = json['isSupportBackupBattery']; isSupportBackupBattery = json['isSupportBackupBattery'];
} }
int? password; int? password;
int? icCard; int? icCard;
int? fingerprint; int? fingerprint;
@ -322,7 +326,6 @@ class LockFeature { //人脸开关 0:关闭 1:开启
} }
class LockBasicInfo { class LockBasicInfo {
LockBasicInfo( LockBasicInfo(
{this.lockId, {this.lockId,
this.electricQuantityDate, this.electricQuantityDate,
@ -348,7 +351,8 @@ class LockBasicInfo {
this.weekDays, this.weekDays,
this.address, this.address,
this.network, this.network,
this.vendor}); this.vendor,
this.networkInfo});
LockBasicInfo.fromJson(Map<String, dynamic> json) { LockBasicInfo.fromJson(Map<String, dynamic> json) {
lockId = json['lockId']; lockId = json['lockId'];
@ -381,7 +385,11 @@ class LockBasicInfo {
address = json['address']; address = json['address'];
network = json['network']; network = json['network'];
vendor = json['vendor']; vendor = json['vendor'];
networkInfo = json['networkInfo'] != null
? NetworkInfo.fromJson(json['networkInfo'])
: null;
} }
int? lockId; int? lockId;
int? electricQuantityDate; int? electricQuantityDate;
int? keyId; int? keyId;
@ -407,6 +415,7 @@ class LockBasicInfo {
String? address; String? address;
String? network; String? network;
String? vendor; String? vendor;
NetworkInfo? networkInfo;
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{}; final Map<String, dynamic> data = <String, dynamic>{};
@ -437,18 +446,21 @@ class LockBasicInfo {
data['address'] = address; data['address'] = address;
data['network'] = network; data['network'] = network;
data['vendor'] = vendor; data['vendor'] = vendor;
if (networkInfo != null) {
data['networkInfo'] = networkInfo!.toJson();
}
return data; return data;
} }
} }
class GroupData { class GroupData {
GroupData({this.id, this.name}); GroupData({this.id, this.name});
GroupData.fromJson(Map<String, dynamic> json) { GroupData.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];
name = json['name']; name = json['name'];
} }
int? id; int? id;
String? name; String? name;
@ -460,7 +472,8 @@ class GroupData {
} }
} }
class LockSettingInfo { // class LockSettingInfo {
//
LockSettingInfo({ LockSettingInfo({
this.remoteUnlock, this.remoteUnlock,
this.autoLock, this.autoLock,
@ -540,6 +553,7 @@ class LockSettingInfo { // 防误开
autoLightScreenTime = json['autoLightScreenTime']; autoLightScreenTime = json['autoLightScreenTime'];
faceEnErrUnlock = json['faceEnErrUnlock']; faceEnErrUnlock = json['faceEnErrUnlock'];
} }
int? remoteUnlock; int? remoteUnlock;
int? autoLock; int? autoLock;
int? autoLockSecond; int? autoLockSecond;
@ -619,7 +633,6 @@ class LockSettingInfo { // 防误开
} }
class PassageModeConfig { class PassageModeConfig {
PassageModeConfig( PassageModeConfig(
{this.startDate, this.endDate, this.weekDays, this.isAllDay}); {this.startDate, this.endDate, this.weekDays, this.isAllDay});
@ -629,6 +642,7 @@ class PassageModeConfig {
weekDays = json['weekDays'].cast<int>(); weekDays = json['weekDays'].cast<int>();
isAllDay = json['isAllDay']; isAllDay = json['isAllDay'];
} }
int? startDate; int? startDate;
int? endDate; int? endDate;
List<int>? weekDays; List<int>? weekDays;
@ -645,7 +659,6 @@ class PassageModeConfig {
} }
class CatEyeConfig { class CatEyeConfig {
CatEyeConfig({this.catEyeMode, this.catEyeModeConfig}); CatEyeConfig({this.catEyeMode, this.catEyeModeConfig});
CatEyeConfig.fromJson(Map<String, dynamic> json) { CatEyeConfig.fromJson(Map<String, dynamic> json) {
@ -654,6 +667,7 @@ class CatEyeConfig {
? CatEyeModeConfig.fromJson(json['catEyeModeConfig']) ? CatEyeModeConfig.fromJson(json['catEyeModeConfig'])
: null; : null;
} }
int? catEyeMode; //1 2 3 4 int? catEyeMode; //1 2 3 4
CatEyeModeConfig? catEyeModeConfig; CatEyeModeConfig? catEyeModeConfig;
@ -667,7 +681,8 @@ class CatEyeConfig {
} }
} }
class CatEyeModeConfig { // class CatEyeModeConfig {
//
CatEyeModeConfig( CatEyeModeConfig(
{this.recordMode, {this.recordMode,
@ -689,6 +704,7 @@ class CatEyeModeConfig { //人体侦测距离
recordStartTime = json['recordStartTime']; recordStartTime = json['recordStartTime'];
detectionDistance = json['detectionDistance']; detectionDistance = json['detectionDistance'];
} }
int? recordMode; // 0 1 int? recordMode; // 0 1
String? recordTime; // String? recordTime; //
int? realTimeMode; // 0 1 int? realTimeMode; // 0 1

View File

@ -422,17 +422,26 @@ class LockSetting {
class NetworkInfo { class NetworkInfo {
NetworkInfo({ NetworkInfo({
this.peerId, this.peerId,
this.isOnline,
this.wifiName,
}); });
NetworkInfo.fromJson(Map<String, dynamic> json) { NetworkInfo.fromJson(Map<String, dynamic> json) {
peerId = json['peerId']; peerId = json['peerId'];
isOnline = json['isOnline'];
wifiName = json['wifiName'];
} }
String? peerId; String? peerId;
String? wifiName;
int? isOnline;
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{}; final Map<String, dynamic> data = <String, dynamic>{};
data['peerId'] = peerId; data['peerId'] = peerId;
data['wifiName'] = wifiName;
data['isOnline'] = isOnline;
return data; return data;
} }
} }