新增猫眼读取配置接口
This commit is contained in:
parent
48033eecb6
commit
29705929cb
@ -13,5 +13,28 @@ class CatEyeSetState {
|
|||||||
CatEyeSetState() {
|
CatEyeSetState() {
|
||||||
Map map = Get.arguments;
|
Map map = Get.arguments;
|
||||||
lockSetInfoData.value = map["lockSetInfoData"];
|
lockSetInfoData.value = map["lockSetInfoData"];
|
||||||
|
|
||||||
|
if (lockSetInfoData.value != null &&
|
||||||
|
lockSetInfoData.value.lockSettingInfo != null) {
|
||||||
|
selectBrightDuration.value =
|
||||||
|
'${lockSetInfoData.value.lockSettingInfo?.autoLightScreenTime} 秒';
|
||||||
|
if (lockSetInfoData.value.lockSettingInfo?.autoLightScreen == 1) {
|
||||||
|
isAutoBright.value = true;
|
||||||
|
} else {
|
||||||
|
isAutoBright.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lockSetInfoData.value.lockSettingInfo?.stayWarn == 1) {
|
||||||
|
isStayWarning.value = true;
|
||||||
|
} else {
|
||||||
|
isStayWarning.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lockSetInfoData.value.lockSettingInfo?.abnormalWarn == 1) {
|
||||||
|
isExceptionWarning.value = true;
|
||||||
|
} else {
|
||||||
|
isExceptionWarning.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,6 +15,7 @@ class CatEyeWorkModeLogic extends BaseGetXController {
|
|||||||
'recordMode': state.recordMode.value,
|
'recordMode': state.recordMode.value,
|
||||||
'recordStartTime': state.recordStartTime.value,
|
'recordStartTime': state.recordStartTime.value,
|
||||||
'recordEndTime': state.recordEndTime.value,
|
'recordEndTime': state.recordEndTime.value,
|
||||||
|
'recordTime': state.recordTime.value,
|
||||||
'detectionDistance': state.detectionDistance.value,
|
'detectionDistance': state.detectionDistance.value,
|
||||||
'realTimeMode': state.realTimeMode.value,
|
'realTimeMode': state.realTimeMode.value,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,12 +33,12 @@ class LockSetInfoData {
|
|||||||
LockBasicInfo? lockBasicInfo;
|
LockBasicInfo? lockBasicInfo;
|
||||||
LockSettingInfo? lockSettingInfo;
|
LockSettingInfo? lockSettingInfo;
|
||||||
|
|
||||||
LockSetInfoData({
|
LockSetInfoData(
|
||||||
this.lockId,
|
{this.lockId,
|
||||||
this.lockStatus,
|
this.lockStatus,
|
||||||
this.lockFeature,
|
this.lockFeature,
|
||||||
this.lockBasicInfo,
|
this.lockBasicInfo,
|
||||||
this.lockSettingInfo});
|
this.lockSettingInfo});
|
||||||
|
|
||||||
LockSetInfoData.fromJson(Map<String, dynamic> json) {
|
LockSetInfoData.fromJson(Map<String, dynamic> json) {
|
||||||
lockId = json['lockId'];
|
lockId = json['lockId'];
|
||||||
@ -145,59 +145,60 @@ class LockFeature {
|
|||||||
int? stayWarn;
|
int? stayWarn;
|
||||||
int? abnormalWarn;
|
int? abnormalWarn;
|
||||||
|
|
||||||
LockFeature(
|
LockFeature({
|
||||||
{this.password,
|
this.password,
|
||||||
this.icCard,
|
this.icCard,
|
||||||
this.fingerprint,
|
this.fingerprint,
|
||||||
this.fingerVein,
|
this.fingerVein,
|
||||||
this.palmVein,
|
this.palmVein,
|
||||||
this.d3Face,
|
this.d3Face,
|
||||||
this.qrCode,
|
this.qrCode,
|
||||||
this.bluetoothRemoteControl,
|
this.bluetoothRemoteControl,
|
||||||
this.wirelessKey,
|
this.wirelessKey,
|
||||||
this.gatewayUnlock,
|
this.gatewayUnlock,
|
||||||
this.lockCommand,
|
this.lockCommand,
|
||||||
this.firmwareUpgrade,
|
this.firmwareUpgrade,
|
||||||
this.passwordIssue,
|
this.passwordIssue,
|
||||||
this.cardIssue,
|
this.cardIssue,
|
||||||
this.fingerprintIssue,
|
this.fingerprintIssue,
|
||||||
this.fingerVeinIssue,
|
this.fingerVeinIssue,
|
||||||
this.palmVeinIssue,
|
this.palmVeinIssue,
|
||||||
this.d3FaceIssue,
|
this.d3FaceIssue,
|
||||||
this.lockFreeze,
|
this.lockFreeze,
|
||||||
this.readAdminPassword,
|
this.readAdminPassword,
|
||||||
this.passwordManagement,
|
this.passwordManagement,
|
||||||
this.passwordWithDelete,
|
this.passwordWithDelete,
|
||||||
this.remoteUnlock,
|
this.remoteUnlock,
|
||||||
this.autoLock,
|
this.autoLock,
|
||||||
this.antiPrySwitch,
|
this.antiPrySwitch,
|
||||||
this.resetSwitch,
|
this.resetSwitch,
|
||||||
this.lockSwitch,
|
this.lockSwitch,
|
||||||
this.lockSound,
|
this.lockSound,
|
||||||
this.languageSetting,
|
this.languageSetting,
|
||||||
this.realTimeClock,
|
this.realTimeClock,
|
||||||
this.wifi,
|
this.wifi,
|
||||||
this.videoIntercom,
|
this.videoIntercom,
|
||||||
this.cyclePassword,
|
this.cyclePassword,
|
||||||
this.cycleFingerprintCard,
|
this.cycleFingerprintCard,
|
||||||
this.doubleAuthentication,
|
this.doubleAuthentication,
|
||||||
this.openDirection,
|
this.openDirection,
|
||||||
this.proximitySensing,
|
this.proximitySensing,
|
||||||
this.doorStatus,
|
this.doorStatus,
|
||||||
this.wiredDoorMagnet,
|
this.wiredDoorMagnet,
|
||||||
this.wirelessDoorMagnet,
|
this.wirelessDoorMagnet,
|
||||||
this.doorNotClosedAlarm,
|
this.doorNotClosedAlarm,
|
||||||
this.unlockReminder,
|
this.unlockReminder,
|
||||||
this.wirelessKeyboard,
|
this.wirelessKeyboard,
|
||||||
this.lightingTime,
|
this.lightingTime,
|
||||||
this.passageMode,
|
this.passageMode,
|
||||||
this.hotelLockCardSystem,
|
this.hotelLockCardSystem,
|
||||||
this.appUnlockOnline,
|
this.appUnlockOnline,
|
||||||
this.bluetoothBroadcast,
|
this.bluetoothBroadcast,
|
||||||
this.attendance,
|
this.attendance,
|
||||||
this.motorTorsion,
|
this.motorTorsion,
|
||||||
this.stayWarn,
|
this.stayWarn,
|
||||||
this.abnormalWarn,});
|
this.abnormalWarn,
|
||||||
|
});
|
||||||
|
|
||||||
LockFeature.fromJson(Map<String, dynamic> json) {
|
LockFeature.fromJson(Map<String, dynamic> json) {
|
||||||
password = json['password'];
|
password = json['password'];
|
||||||
@ -335,26 +336,25 @@ class LockBasicInfo {
|
|||||||
int? lockUserNo;
|
int? lockUserNo;
|
||||||
|
|
||||||
LockBasicInfo(
|
LockBasicInfo(
|
||||||
{
|
{this.lockId,
|
||||||
this.lockId,
|
this.electricQuantityDate,
|
||||||
this.electricQuantityDate,
|
this.keyId,
|
||||||
this.keyId,
|
this.model,
|
||||||
this.model,
|
this.electricQuantity,
|
||||||
this.electricQuantity,
|
this.indate,
|
||||||
this.indate,
|
this.isLockOwner,
|
||||||
this.isLockOwner,
|
this.lockAlias,
|
||||||
this.lockAlias,
|
this.lockName,
|
||||||
this.lockName,
|
this.groupId,
|
||||||
this.groupId,
|
this.groupName,
|
||||||
this.groupName,
|
this.groupData,
|
||||||
this.groupData,
|
this.adminPwd,
|
||||||
this.adminPwd,
|
this.keyType,
|
||||||
this.keyType,
|
this.startDate,
|
||||||
this.startDate,
|
this.endDate,
|
||||||
this.endDate,
|
this.mac,
|
||||||
this.mac,
|
this.keyRight,
|
||||||
this.keyRight,
|
this.senderUserId,
|
||||||
this.senderUserId,
|
|
||||||
this.lockUserNo});
|
this.lockUserNo});
|
||||||
|
|
||||||
LockBasicInfo.fromJson(Map<String, dynamic> json) {
|
LockBasicInfo.fromJson(Map<String, dynamic> json) {
|
||||||
@ -458,33 +458,60 @@ class LockSettingInfo {
|
|||||||
int? motorTorsion;
|
int? motorTorsion;
|
||||||
int? stayWarn;
|
int? stayWarn;
|
||||||
int? abnormalWarn;
|
int? abnormalWarn;
|
||||||
|
List<CatEyeModeConfig>? catEyeConfig;
|
||||||
|
int? faceSwitch; //人脸开关 0:关闭 1:开启
|
||||||
|
int? faceAutoLightScreen; //人脸自动亮屏开关 0:关闭 1:开启
|
||||||
|
int? faceInductionDistance; //人脸感应距离
|
||||||
|
int? faceAntiMistakeOpen; //人脸防误开门 0:关闭 1:开启
|
||||||
|
int? autoLightScreen; //猫眼-自动亮屏开关 0:关闭 1:开启
|
||||||
|
int? autoLightScreenTime; //猫眼-自动亮屏时间
|
||||||
|
int? dayNotOpenDoorSwitch; //N天未开门开关 (启用/禁用)
|
||||||
|
int? dayNotOpenDoorValue; //N天未开门值
|
||||||
|
int? doorNotCloseSwitch; //门未关闭开关 (启用/禁用)
|
||||||
|
int? lowElecNoticeSwitch; //低电量开关 (启用/禁用)
|
||||||
|
int? doorbellNoticeSwitch; //有人按门铃开关 (启用/禁用)
|
||||||
|
int? someoneAtDoorSwitch; //有人出现在门口开关 (启用/禁用)//
|
||||||
|
|
||||||
LockSettingInfo(
|
LockSettingInfo({
|
||||||
{this.remoteUnlock,
|
this.remoteUnlock,
|
||||||
this.autoLock,
|
this.autoLock,
|
||||||
this.autoLockSecond,
|
this.autoLockSecond,
|
||||||
this.antiPrySwitch,
|
this.antiPrySwitch,
|
||||||
this.resetSwitch,
|
this.resetSwitch,
|
||||||
this.lockSwitch,
|
this.lockSwitch,
|
||||||
this.lockSound,
|
this.lockSound,
|
||||||
this.lockSoundVolume,
|
this.lockSoundVolume,
|
||||||
this.languageSettingLang,
|
this.languageSettingLang,
|
||||||
this.openDirectionValue,
|
this.openDirectionValue,
|
||||||
this.doorNotClosedAlarm,
|
this.doorNotClosedAlarm,
|
||||||
this.unlockReminder,
|
this.unlockReminder,
|
||||||
this.lightingTime,
|
this.lightingTime,
|
||||||
this.lightingSecond,
|
this.lightingSecond,
|
||||||
this.passageMode,
|
this.passageMode,
|
||||||
this.passageModeConfig,
|
this.passageModeConfig,
|
||||||
this.attendance,
|
this.attendance,
|
||||||
this.appUnlockOnline,
|
this.appUnlockOnline,
|
||||||
this.bluetoothBroadcast,
|
this.bluetoothBroadcast,
|
||||||
this.adminPwd,
|
this.adminPwd,
|
||||||
this.unlockReminderPush,
|
this.unlockReminderPush,
|
||||||
this.languageSettingLangText,
|
this.languageSettingLangText,
|
||||||
this.motorTorsion,
|
this.motorTorsion,
|
||||||
this.stayWarn,
|
this.stayWarn,
|
||||||
this.abnormalWarn,});
|
this.abnormalWarn,
|
||||||
|
this.catEyeConfig,
|
||||||
|
this.faceSwitch,
|
||||||
|
this.faceAutoLightScreen,
|
||||||
|
this.faceInductionDistance,
|
||||||
|
this.faceAntiMistakeOpen,
|
||||||
|
this.autoLightScreen,
|
||||||
|
this.autoLightScreenTime,
|
||||||
|
this.dayNotOpenDoorSwitch,
|
||||||
|
this.dayNotOpenDoorValue,
|
||||||
|
this.doorNotCloseSwitch,
|
||||||
|
this.lowElecNoticeSwitch,
|
||||||
|
this.doorbellNoticeSwitch,
|
||||||
|
this.someoneAtDoorSwitch,
|
||||||
|
});
|
||||||
|
|
||||||
LockSettingInfo.fromJson(Map<String, dynamic> json) {
|
LockSettingInfo.fromJson(Map<String, dynamic> json) {
|
||||||
remoteUnlock = json['remoteUnlock'];
|
remoteUnlock = json['remoteUnlock'];
|
||||||
@ -517,6 +544,24 @@ class LockSettingInfo {
|
|||||||
motorTorsion = json['motorTorsion'];
|
motorTorsion = json['motorTorsion'];
|
||||||
stayWarn = json['stayWarn'];
|
stayWarn = json['stayWarn'];
|
||||||
abnormalWarn = json['abnormalWarn'];
|
abnormalWarn = json['abnormalWarn'];
|
||||||
|
if (json['catEyeConfig'] != null) {
|
||||||
|
catEyeConfig = <CatEyeModeConfig>[];
|
||||||
|
json['catEyeConfig'].forEach((v) {
|
||||||
|
catEyeConfig!.add(CatEyeModeConfig.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
faceSwitch = json['faceSwitch'];
|
||||||
|
faceAutoLightScreen = json['faceAutoLightScreen'];
|
||||||
|
faceInductionDistance = json['faceInductionDistance'];
|
||||||
|
faceAntiMistakeOpen = json['faceAntiMistakeOpen'];
|
||||||
|
autoLightScreen = json['autoLightScreen'];
|
||||||
|
autoLightScreenTime = json['autoLightScreenTime'];
|
||||||
|
dayNotOpenDoorSwitch = json['dayNotOpenDoorSwitch'];
|
||||||
|
dayNotOpenDoorValue = json['dayNotOpenDoorValue'];
|
||||||
|
doorNotCloseSwitch = json['doorNotCloseSwitch'];
|
||||||
|
lowElecNoticeSwitch = json['lowElecNoticeSwitch'];
|
||||||
|
doorbellNoticeSwitch = json['doorbellNoticeSwitch'];
|
||||||
|
someoneAtDoorSwitch = json['someoneAtDoorSwitch'];
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@ -549,6 +594,22 @@ class LockSettingInfo {
|
|||||||
data['motorTorsion'] = motorTorsion;
|
data['motorTorsion'] = motorTorsion;
|
||||||
data['stayWarn'] = stayWarn;
|
data['stayWarn'] = stayWarn;
|
||||||
data['abnormalWarn'] = abnormalWarn;
|
data['abnormalWarn'] = abnormalWarn;
|
||||||
|
if (catEyeConfig != null) {
|
||||||
|
data['catEyeConfig'] = catEyeConfig!.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
data['faceSwitch'] = faceSwitch;
|
||||||
|
data['faceAutoLightScreen'] = faceAutoLightScreen;
|
||||||
|
data['faceInductionDistance'] = faceInductionDistance;
|
||||||
|
data['faceAntiMistakeOpen'] = faceAntiMistakeOpen;
|
||||||
|
data['autoLightScreen'] = autoLightScreen;
|
||||||
|
data['autoLightScreenTime'] = autoLightScreenTime;
|
||||||
|
data['dayNotOpenDoorSwitch'] = dayNotOpenDoorSwitch;
|
||||||
|
data['dayNotOpenDoorValue'] = dayNotOpenDoorValue;
|
||||||
|
data['doorNotCloseSwitch'] = doorNotCloseSwitch;
|
||||||
|
data['lowElecNoticeSwitch'] = lowElecNoticeSwitch;
|
||||||
|
data['doorbellNoticeSwitch'] = doorbellNoticeSwitch;
|
||||||
|
data['someoneAtDoorSwitch'] = someoneAtDoorSwitch;
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -579,3 +640,62 @@ class PassageModeConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class CatEyeConfig {
|
||||||
|
int? catEyeMode;
|
||||||
|
CatEyeModeConfig? catEyeModeConfig;
|
||||||
|
|
||||||
|
CatEyeConfig({this.catEyeMode, this.catEyeModeConfig});
|
||||||
|
|
||||||
|
CatEyeConfig.fromJson(Map<String, dynamic> json) {
|
||||||
|
catEyeMode = json['catEyeMode'];
|
||||||
|
catEyeModeConfig = json['catEyeModeConfig'] != null
|
||||||
|
? CatEyeModeConfig.fromJson(json['catEyeModeConfig'])
|
||||||
|
: null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
|
data['catEyeMode'] = catEyeMode;
|
||||||
|
if (catEyeModeConfig != null) {
|
||||||
|
data['catEyeModeConfig'] = catEyeModeConfig!.toJson();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CatEyeModeConfig {
|
||||||
|
int? recordMode;
|
||||||
|
String? recordTime;
|
||||||
|
int? realTimeMode;
|
||||||
|
int? recordEndTime;
|
||||||
|
int? recordStartTime;
|
||||||
|
double? detectionDistance;
|
||||||
|
|
||||||
|
CatEyeModeConfig(
|
||||||
|
{this.recordMode,
|
||||||
|
this.recordTime,
|
||||||
|
this.realTimeMode,
|
||||||
|
this.recordEndTime,
|
||||||
|
this.recordStartTime,
|
||||||
|
this.detectionDistance});
|
||||||
|
|
||||||
|
CatEyeModeConfig.fromJson(Map<String, dynamic> json) {
|
||||||
|
recordMode = json['recordMode'];
|
||||||
|
recordTime = json['recordTime'];
|
||||||
|
realTimeMode = json['realTimeMode'];
|
||||||
|
recordEndTime = json['recordEndTime'];
|
||||||
|
recordStartTime = json['recordStartTime'];
|
||||||
|
detectionDistance = json['detectionDistance'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
|
data['recordMode'] = recordMode;
|
||||||
|
data['recordTime'] = recordTime;
|
||||||
|
data['realTimeMode'] = realTimeMode;
|
||||||
|
data['recordEndTime'] = recordEndTime;
|
||||||
|
data['recordStartTime'] = recordStartTime;
|
||||||
|
data['detectionDistance'] = detectionDistance;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user