新增设置猫眼工作模式接口

新增设置自动亮屏接口及逻辑
新增设置亮屏持续时间接口及逻辑
新增逗留警告接口及逻辑处理
新增设置异常警告接口及逻辑处理
This commit is contained in:
Daisy 2024-03-27 17:40:31 +08:00
parent 1ffe7d228e
commit 611ff5ee08
11 changed files with 425 additions and 162 deletions

View File

@ -54,10 +54,17 @@ class XSConstantMacro {
return "未知"; return "未知";
} }
} }
// lockEventType 0-10-20-30-40- // lockEventType 0-10-20-30-40-
static int lockEventTypeAll = 0; static int lockEventTypeAll = 0;
static int lockEventTypeOpenDoor = 10; static int lockEventTypeOpenDoor = 10;
static int lockEventTypeAbnormal = 20; static int lockEventTypeAbnormal = 20;
static int lockEventTypeDoorbell = 30; static int lockEventTypeDoorbell = 30;
static int lockEventTypeVideo = 40; static int lockEventTypeVideo = 40;
//
static int catEyeWorkModePowerSaving = 1; //
static int catEyeWorkModeStayCapture = 2; //
static int catEyeWorkModeRealTimeMonitoring = 3; //
static int catEyeWorkModeCustom = 4; //
} }

View File

@ -1,7 +1,53 @@
import 'package:star_lock/network/api_repository.dart';
import 'package:star_lock/tools/baseGetXController.dart'; import 'package:star_lock/tools/baseGetXController.dart';
import 'catEyeSet_state.dart'; import 'catEyeSet_state.dart';
class CatEyeSetLogic extends BaseGetXController { class CatEyeSetLogic extends BaseGetXController {
final CatEyeSetState state = CatEyeSetState(); final CatEyeSetState state = CatEyeSetState();
//
void updateAutoLightScreenConfig() async {
var entity = await ApiRepository.to.updateAutoLightScreenConfig(
lockId: state.lockSetInfoData.value.lockId!,
autoLightScreen: state.isAutoBright.value == true ? 1 : 0,
);
if (entity.errorCode!.codeIsSuccessful) {
showToast('设置成功');
}
}
//
void updateLightScreenTimeConfig() async {
var entity = await ApiRepository.to.updateLightScreenTimeConfig(
lockId: state.lockSetInfoData.value.lockId!,
autoLightScreenTime:
int.parse(state.selectBrightDuration.value.replaceAll('', '')),
);
if (entity.errorCode!.codeIsSuccessful) {
showToast('设置成功');
}
}
//
void updateStayWarnConfig() async {
var entity = await ApiRepository.to.updateStayWarnConfig(
lockId: state.lockSetInfoData.value.lockId!,
stayWarn: state.isStayWarning.value == true ? 1 : 0,
);
if (entity.errorCode!.codeIsSuccessful) {
showToast('设置成功');
}
}
//
void updateAbnormalWarnConfig() async {
var entity = await ApiRepository.to.updateAbnormalWarnConfig(
lockId: state.lockSetInfoData.value.lockId!,
abnormalWarn: state.isExceptionWarning.value == true ? 1 : 0,
);
if (entity.errorCode!.codeIsSuccessful) {
showToast('设置成功');
}
}
} }

View File

@ -33,12 +33,18 @@ class _CatEyeSetPageState extends State<CatEyeSetPage> {
children: [ children: [
CommonItem( CommonItem(
leftTitel: '猫眼工作模式', leftTitel: '猫眼工作模式',
rightTitle: "", rightTitle: state.selectCatEyeWorkMode.value,
allHeight: 70.h, allHeight: 70.h,
isHaveLine: true, isHaveLine: true,
isHaveDirection: true, isHaveDirection: true,
action: () { action: () {
Get.toNamed(Routers.catEyeWorkModePage); Get.toNamed(Routers.catEyeWorkModePage, arguments: {
'lockSetInfoData': state.lockSetInfoData.value
})?.then((value) {
if (value != null) {
state.selectCatEyeWorkMode.value = value;
}
});
}), }),
Obx(() => CommonItem( Obx(() => CommonItem(
leftTitel: '自动亮屏', leftTitel: '自动亮屏',
@ -94,15 +100,26 @@ class _CatEyeSetPageState extends State<CatEyeSetPage> {
onChanged: (value) { onChanged: (value) {
switch (clickIndex) { switch (clickIndex) {
case 1: // case 1: //
{
state.isAutoBright.value = value; state.isAutoBright.value = value;
logic.updateAutoLightScreenConfig();
}
break; break;
case 2: // case 2: //
{
state.isStayWarning.value = value; state.isStayWarning.value = value;
logic.updateStayWarnConfig();
}
break; break;
case 3: // case 3: //
{
state.isExceptionWarning.value = value; state.isExceptionWarning.value = value;
logic.updateAbnormalWarnConfig();
}
break; break;
default: default:
print('clickIndex is not match');
break;
} }
}, },
); );
@ -120,6 +137,7 @@ class _CatEyeSetPageState extends State<CatEyeSetPage> {
chooseCallback: (value) { chooseCallback: (value) {
state.selectBrightDuration.value = state.selectBrightDuration.value =
state.brightDurationTimeList[value]; state.brightDurationTimeList[value];
logic.updateLightScreenTimeConfig();
}, },
); );
}); });

View File

@ -1,4 +1,5 @@
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart';
class CatEyeSetState { class CatEyeSetState {
var brightDurationTimeList = ['10秒', '15秒', '20秒'].obs; var brightDurationTimeList = ['10秒', '15秒', '20秒'].obs;
@ -6,4 +7,11 @@ class CatEyeSetState {
var isAutoBright = false.obs; // var isAutoBright = false.obs; //
var isStayWarning = false.obs; // var isStayWarning = false.obs; //
var isExceptionWarning = false.obs; // var isExceptionWarning = false.obs; //
var lockSetInfoData = LockSetInfoData().obs;
var selectCatEyeWorkMode = ''.obs; //
CatEyeSetState() {
Map map = Get.arguments;
lockSetInfoData.value = map["lockSetInfoData"];
}
} }

View File

@ -0,0 +1,27 @@
import 'package:star_lock/main/lockDetail/lockSet/catEyeSet/catEyeWorkMode/catEyeWorkMode_state.dart';
import 'package:star_lock/network/api_repository.dart';
import 'package:star_lock/tools/baseGetXController.dart';
class CatEyeWorkModeLogic extends BaseGetXController {
final CatEyeWorkModeState state = CatEyeWorkModeState();
//
void updateCatEyeModeConfig() async {
var entity = await ApiRepository.to.updateCatEyeModeConfig(
lockId: state.lockSetInfoData.value.lockId!,
catEyeConfig: {
'catEyeMode': state.selectCatEyeWorkMode.value,
'catEyeModeConfig': {
'recordMode': state.recordMode.value,
'recordStartTime': state.recordStartTime.value,
'recordEndTime': state.recordEndTime.value,
'detectionDistance': state.detectionDistance.value,
'realTimeMode': state.realTimeMode.value,
}
},
);
if (entity.errorCode!.codeIsSuccessful) {
showToast('设置成功');
}
}
}

View File

@ -2,6 +2,8 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/appRouters.dart'; import 'package:star_lock/appRouters.dart';
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
import 'package:star_lock/main/lockDetail/lockSet/catEyeSet/catEyeWorkMode/catEyeWorkMode_logic.dart';
import '../../../../../app_settings/app_colors.dart'; import '../../../../../app_settings/app_colors.dart';
import '../../../../../tools/titleAppBar.dart'; import '../../../../../tools/titleAppBar.dart';
@ -14,8 +16,8 @@ class CatEyeWorkModePage extends StatefulWidget {
} }
class _CatEyeWorkModePageState extends State<CatEyeWorkModePage> { class _CatEyeWorkModePageState extends State<CatEyeWorkModePage> {
bool isCheck = false; final logic = Get.put(CatEyeWorkModeLogic());
List boolList = [true, false, false, false]; final state = Get.find<CatEyeWorkModeLogic>().state;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -30,44 +32,34 @@ class _CatEyeWorkModePageState extends State<CatEyeWorkModePage> {
SizedBox( SizedBox(
height: 30.h, height: 30.h,
), ),
_buildTipsView( _buildTipsView('省电模式:\n',
'省电模式:\n', '适合门口较为安全的环境。\n仅发生特定事件才录像,并可查看实时画面。\n一般情况下满电可使用7-8个月', 0),
'适合门口较为安全的环境。\n仅发生特定事件才录像,并可查看实时画面。\n一般情况下满电可使用7-8个月', SizedBox(
0, height: 30.h,
boolList[0]), ),
_buildTipsView('逗留抓拍模式:\n',
'有人逗留或发生特定事件才录像,可随时查看\n实时画面。\n一般情况下满电可使用5~6个月。', 1),
SizedBox(
height: 30.h,
),
_buildTipsView('实时监控模式:\n',
'适合门口人员复杂、较不安全的环境。\n有人出现就录像,可随时查看实时画面。\n一般情况下满电可使用2~4个月。', 2),
SizedBox( SizedBox(
height: 30.h, height: 30.h,
), ),
_buildTipsView( _buildTipsView(
'逗留抓拍模式:\n', '自定义模式:\n', '根据您家门口实际情况设置录像和实时画面功能。\n可使用时长由具体设置决定。', 3)
'有人逗留或发生特定事件才录像,可随时查看\n实时画面。\n一般情况下满电可使用5~6个月。',
1,
boolList[1]),
SizedBox(
height: 30.h,
),
_buildTipsView(
'实时监控模式:\n',
'适合门口人员复杂、较不安全的环境。\n有人出现就录像,可随时查看实时画面。\n一般情况下满电可使用2~4个月。',
2,
boolList[2]),
SizedBox(
height: 30.h,
),
_buildTipsView('自定义模式:\n', '根据您家门口实际情况设置录像和实时画面功能。\n可使用时长由具体设置决定。',
3, boolList[3])
], ],
)); ));
} }
Widget _buildTipsView( Widget _buildTipsView(String titleStr, String subTitle, int clickIndex) {
String titleStr, String subTitle, int clickIndex, bool isClick) {
return GestureDetector( return GestureDetector(
child: Container( child: Container(
width: ScreenUtil().screenWidth - 40.w, width: ScreenUtil().screenWidth - 40.w,
margin: EdgeInsets.only(left: 20.w, right: 20.w, bottom: 10.h), margin: EdgeInsets.only(left: 20.w, right: 20.w, bottom: 10.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: isClick color: state.boolList.value[clickIndex]
? AppColors.blueViewBgColor ? AppColors.blueViewBgColor
: AppColors.greyBackgroundColor, : AppColors.greyBackgroundColor,
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),
@ -77,7 +69,7 @@ class _CatEyeWorkModePageState extends State<CatEyeWorkModePage> {
left: 20.w, top: 30.h, bottom: 30.h, right: 20.w), left: 20.w, top: 30.h, bottom: 30.h, right: 20.w),
child: Row( child: Row(
children: [ children: [
isClick state.boolList.value[clickIndex]
? Image.asset( ? Image.asset(
'images/mine/icon_mine_blueSelect.png', 'images/mine/icon_mine_blueSelect.png',
width: 20.w, width: 20.w,
@ -89,7 +81,8 @@ class _CatEyeWorkModePageState extends State<CatEyeWorkModePage> {
), ),
SizedBox(width: 10.w), SizedBox(width: 10.w),
Expanded( Expanded(
child: _buildRichText(titleStr, subTitle, isClick), child: _buildRichText(
titleStr, subTitle, state.boolList.value[clickIndex]),
), ),
SizedBox( SizedBox(
width: 10.w, width: 10.w,
@ -128,11 +121,30 @@ class _CatEyeWorkModePageState extends State<CatEyeWorkModePage> {
), ),
onTap: () { onTap: () {
setState(() { setState(() {
for (int i = 0; i < boolList.length; i++) { for (int i = 0; i < state.boolList.value.length; i++) {
if (clickIndex == i) { if (clickIndex == i) {
boolList[clickIndex] = true; state.boolList.value[clickIndex] = true;
switch (clickIndex) {
case 0:
state.selectCatEyeWorkMode.value =
XSConstantMacro.catEyeWorkModePowerSaving;
break;
case 1:
state.selectCatEyeWorkMode.value =
XSConstantMacro.catEyeWorkModeStayCapture;
break;
case 2:
state.selectCatEyeWorkMode.value =
XSConstantMacro.catEyeWorkModeRealTimeMonitoring;
break;
case 3:
state.selectCatEyeWorkMode.value =
XSConstantMacro.catEyeWorkModeCustom;
break;
}
logic.updateCatEyeModeConfig();
} else { } else {
boolList[i] = false; state.boolList.value[i] = false;
} }
} }
}); });

View File

@ -0,0 +1,20 @@
import 'package:get/get.dart';
import 'package:star_lock/main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart';
class CatEyeWorkModeState {
var lockSetInfoData = LockSetInfoData().obs;
var selectCatEyeWorkMode = 0.obs; //
var boolList = [true, false, false, false].obs;
var recordMode = 0.obs; // 0 1
//recordStartTime与recordEndTime参数
var recordStartTime = 0.obs; // 1709715049775,
var recordEndTime = 0.obs; //1709715049775,
var recordTime = 0.obs; //
var detectionDistance = 0.obs; //
var realTimeMode = 0.obs; // 0 1
CatEyeWorkModeState() {
Map map = Get.arguments;
lockSetInfoData.value = map["lockSetInfoData"];
}
}

View File

@ -380,7 +380,9 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
isHaveLine: true, isHaveLine: true,
isHaveDirection: true, isHaveDirection: true,
action: () { action: () {
Get.toNamed(Routers.catEyeSetPage); Get.toNamed(Routers.catEyeSetPage, arguments: {
'lockSetInfoData': state.lockSetInfoData.value
});
})), })),
// Obx(() => // Obx(() =>
// //

View File

@ -176,4 +176,7 @@ abstract class Api {
final String deletMessageURL = '/notifications/delete'; // final String deletMessageURL = '/notifications/delete'; //
final String getVersionURL = '/app/getVersion'; // final String getVersionURL = '/app/getVersion'; //
final String updateCatEyeConfigURL =
'/lockSetting/updateCatEyeConfig'; //
} }

View File

@ -220,8 +220,7 @@ class ApiProvider extends BaseProvider {
jsonEncode({'lockId': lockId, 'operatorUid': operatorUid})); jsonEncode({'lockId': lockId, 'operatorUid': operatorUid}));
Future<Response> lockRecordList( Future<Response> lockRecordList(
{ {required String endDate,
required String endDate,
required String keyId, required String keyId,
required String keyStatus, required String keyStatus,
required String lockId, required String lockId,
@ -234,8 +233,7 @@ class ApiProvider extends BaseProvider {
required String timezoneRawOffSet, required String timezoneRawOffSet,
required String keyboardPwdId, required String keyboardPwdId,
required String cardId, required String cardId,
required String fingerprintId required String fingerprintId}) =>
}) =>
post( post(
keyOperationRecordURL.toUrl, keyOperationRecordURL.toUrl,
jsonEncode({ jsonEncode({
@ -358,9 +356,15 @@ class ApiProvider extends BaseProvider {
})); }));
// //
Future<Response> deletOwnerKeyInfo(String lockId, String keyId, int includeUnderlings) => post( Future<Response> deletOwnerKeyInfo(
String lockId, String keyId, int includeUnderlings) =>
post(
deleteElectronicKeyURL.toUrl, deleteElectronicKeyURL.toUrl,
jsonEncode({'lockId': lockId, 'keyId': keyId, 'includeUnderlings': includeUnderlings})); jsonEncode({
'lockId': lockId,
'keyId': keyId,
'includeUnderlings': includeUnderlings
}));
// //
Future<Response> checkLoginPassword(String password) => post( Future<Response> checkLoginPassword(String password) => post(
@ -527,8 +531,7 @@ class ApiProvider extends BaseProvider {
'remoteEnable': remoteEnable 'remoteEnable': remoteEnable
})); }));
Future<Response> expireLockList(String pageNo, String pageSize) => Future<Response> expireLockList(String pageNo, String pageSize) => post(
post(
expireLockListURL.toUrl, expireLockListURL.toUrl,
jsonEncode({ jsonEncode({
'pageNo': pageNo, 'pageNo': pageNo,
@ -1197,7 +1200,8 @@ class ApiProvider extends BaseProvider {
String changeType, String changeType,
int startTime, int startTime,
int endTime, int endTime,
int cardType,) => int cardType,
) =>
post( post(
editICCardURL.toUrl, editICCardURL.toUrl,
jsonEncode({ jsonEncode({
@ -1568,12 +1572,58 @@ class ApiProvider extends BaseProvider {
})); }));
// //
Future<Response> getVersionData(String brandName, String currentVersion) => post( Future<Response> getVersionData(String brandName, String currentVersion) =>
post(
getVersionURL.toUrl, getVersionURL.toUrl,
jsonEncode({ jsonEncode({
'brandName': brandName, 'brandName': brandName,
'currentVersion': currentVersion, 'currentVersion': currentVersion,
})); }));
//
Future<Response> updateCatEyeModeConfig(int lockId, Map catEyeConfig) => post(
updateCatEyeConfigURL.toUrl,
jsonEncode({
'lockId': lockId,
'catEyeConfig': catEyeConfig,
}));
//
Future<Response> updateAutoLightScreenConfig(
int lockId, int autoLightScreen) =>
post(
updateCatEyeConfigURL.toUrl,
jsonEncode({
'lockId': lockId,
'autoLightScreen': autoLightScreen,
}));
//
Future<Response> updateLightScreenTimeConfig(
int lockId, int autoLightScreenTime) =>
post(
updateCatEyeConfigURL.toUrl,
jsonEncode({
'lockId': lockId,
'autoLightScreenTime': autoLightScreenTime,
}));
//
Future<Response> updateStayWarnConfig(int lockId, int stayWarn) => post(
updateCatEyeConfigURL.toUrl,
jsonEncode({
'lockId': lockId,
'stayWarn': stayWarn,
}));
//
Future<Response> updateAbnormalWarnConfig(int lockId, int abnormalWarn) =>
post(
updateCatEyeConfigURL.toUrl,
jsonEncode({
'lockId': lockId,
'abnormalWarn': abnormalWarn,
}));
} }
extension ExtensionString on String { extension ExtensionString on String {

View File

@ -191,8 +191,7 @@ class ApiRepository {
//- //-
Future<KeyOperationRecordEntity> lockRecordList( Future<KeyOperationRecordEntity> lockRecordList(
{ {required String endDate,
required String endDate,
required String keyId, required String keyId,
required String keyStatus, required String keyStatus,
required String lockId, required String lockId,
@ -205,8 +204,7 @@ class ApiRepository {
required String timezoneRawOffSet, required String timezoneRawOffSet,
required String keyboardPwdId, required String keyboardPwdId,
required String cardId, required String cardId,
required String fingerprintId required String fingerprintId}) async {
}) async {
final res = await apiProvider.lockRecordList( final res = await apiProvider.lockRecordList(
endDate: endDate, endDate: endDate,
keyId: keyId, keyId: keyId,
@ -384,8 +382,11 @@ class ApiRepository {
// //
Future<LockListInfoEntity> deletOwnerKeyData( Future<LockListInfoEntity> deletOwnerKeyData(
{required String lockId, required String keyId, required int includeUnderlings}) async { {required String lockId,
final res = await apiProvider.deletOwnerKeyInfo(lockId, keyId, includeUnderlings); required String keyId,
required int includeUnderlings}) async {
final res =
await apiProvider.deletOwnerKeyInfo(lockId, keyId, includeUnderlings);
return LockListInfoEntity.fromJson(res.body); return LockListInfoEntity.fromJson(res.body);
} }
@ -545,7 +546,8 @@ class ApiRepository {
} }
// //
Future<ExpireLockListEntity> expireLockList(String pageNo, String pageSize) async { Future<ExpireLockListEntity> expireLockList(
String pageNo, String pageSize) async {
final res = await apiProvider.expireLockList(pageNo, pageSize); final res = await apiProvider.expireLockList(pageNo, pageSize);
return ExpireLockListEntity.fromJson(res.body); return ExpireLockListEntity.fromJson(res.body);
} }
@ -1158,8 +1160,18 @@ class ApiRepository {
required int startTime, required int startTime,
required int endTime, required int endTime,
required int fingerprintType}) async { required int fingerprintType}) async {
final res = await apiProvider.editFingerprintsData(fingerprintId, lockId, final res = await apiProvider.editFingerprintsData(
weekDay, startDate, endDate, isCoerced, fingerprintName, changeType, startTime, endTime, fingerprintType); fingerprintId,
lockId,
weekDay,
startDate,
endDate,
isCoerced,
fingerprintName,
changeType,
startTime,
endTime,
fingerprintType);
return LoginEntity.fromJson(res.body); return LoginEntity.fromJson(res.body);
} }
@ -1316,14 +1328,25 @@ class ApiRepository {
required int endTime, required int endTime,
required int cardRight, required int cardRight,
}) async { }) async {
final res = await apiProvider.addICCardData(lockId, endDate, cardName, final res = await apiProvider.addICCardData(
cardNumber, cardType, addType, startDate, isCoerced, weekDay, startTime, endTime, cardRight); lockId,
endDate,
cardName,
cardNumber,
cardType,
addType,
startDate,
isCoerced,
weekDay,
startTime,
endTime,
cardRight);
return AddICCardEntity.fromJson(res.body); return AddICCardEntity.fromJson(res.body);
} }
// IC卡 // IC卡
Future<LoginEntity> editICCardData( Future<LoginEntity> editICCardData({
{required String lockId, required String lockId,
required String cardId, required String cardId,
required String cardName, required String cardName,
required String startDate, required String startDate,
@ -1333,9 +1356,20 @@ class ApiRepository {
required String changeType, required String changeType,
required int startTime, required int startTime,
required int endTime, required int endTime,
required int cardType,}) async { required int cardType,
final res = await apiProvider.editICCardData(lockId, cardId, cardName, }) async {
startDate, endDate, isCoerced, weekDay, changeType, startTime, endTime, cardType); final res = await apiProvider.editICCardData(
lockId,
cardId,
cardName,
startDate,
endDate,
isCoerced,
weekDay,
changeType,
startTime,
endTime,
cardType);
return LoginEntity.fromJson(res.body); return LoginEntity.fromJson(res.body);
} }
@ -1586,11 +1620,47 @@ class ApiRepository {
} }
// //
Future<VersionUndateEntity> getVersionData({ Future<VersionUndateEntity> getVersionData(
required String brandName, {required String brandName, required String currentVersion}) async {
required String currentVersion
}) async {
final res = await apiProvider.getVersionData(brandName, currentVersion); final res = await apiProvider.getVersionData(brandName, currentVersion);
return VersionUndateEntity.fromJson(res.body); return VersionUndateEntity.fromJson(res.body);
} }
//
Future<VersionUndateEntity> updateCatEyeModeConfig(
{required int lockId, required Map catEyeConfig}) async {
final res = await apiProvider.updateCatEyeModeConfig(lockId, catEyeConfig);
return VersionUndateEntity.fromJson(res.body);
}
//
Future<VersionUndateEntity> updateAutoLightScreenConfig(
{required int lockId, required int autoLightScreen}) async {
final res =
await apiProvider.updateAutoLightScreenConfig(lockId, autoLightScreen);
return VersionUndateEntity.fromJson(res.body);
}
//
Future<VersionUndateEntity> updateLightScreenTimeConfig(
{required int lockId, required int autoLightScreenTime}) async {
final res = await apiProvider.updateLightScreenTimeConfig(
lockId, autoLightScreenTime);
return VersionUndateEntity.fromJson(res.body);
}
//
Future<VersionUndateEntity> updateStayWarnConfig(
{required int lockId, required int stayWarn}) async {
final res = await apiProvider.updateStayWarnConfig(lockId, stayWarn);
return VersionUndateEntity.fromJson(res.body);
}
//
Future<VersionUndateEntity> updateAbnormalWarnConfig(
{required int lockId, required int abnormalWarn}) async {
final res =
await apiProvider.updateAbnormalWarnConfig(lockId, abnormalWarn);
return VersionUndateEntity.fromJson(res.body);
}
} }