feat:处理代码合并错误
This commit is contained in:
parent
1681c86769
commit
3238359c54
@ -179,6 +179,7 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
Future<void> loadData({ required LockListInfoItemEntity lockListInfoItemEntity,required bool isOnlyOneData}) async {
|
Future<void> loadData({ required LockListInfoItemEntity lockListInfoItemEntity,required bool isOnlyOneData}) async {
|
||||||
state.keyInfos.value = lockListInfoItemEntity;
|
state.keyInfos.value = lockListInfoItemEntity;
|
||||||
CommonDataManage().currentLockUserNo = state.keyInfos.value.lockUserNo!;
|
CommonDataManage().currentLockUserNo = state.keyInfos.value.lockUserNo!;
|
||||||
|
CommonDataManage().initUserNo = state.keyInfos.value.initUserNo!;
|
||||||
CommonDataManage().currentKeyInfo = state.keyInfos.value;
|
CommonDataManage().currentKeyInfo = state.keyInfos.value;
|
||||||
|
|
||||||
state.lockUserNo = state.keyInfos.value.lockUserNo!;
|
state.lockUserNo = state.keyInfos.value.lockUserNo!;
|
||||||
|
|||||||
@ -60,6 +60,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
_initRefreshLockDetailInfoDataEventAction();
|
_initRefreshLockDetailInfoDataEventAction();
|
||||||
logic.initReplySubscription();
|
logic.initReplySubscription();
|
||||||
logic.initLockSetOpenOrCloseCheckInRefreshLockDetailWithAttendanceAction();
|
logic.initLockSetOpenOrCloseCheckInRefreshLockDetailWithAttendanceAction();
|
||||||
|
logic.loadData(lockListInfoItemEntity: widget.lockListInfoItemEntity, isOnlyOneData: widget.isOnlyOneData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -81,69 +82,8 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> loadData() async {
|
|
||||||
state.keyInfos.value = widget.lockListInfoItemEntity;
|
|
||||||
CommonDataManage().currentLockUserNo = state.keyInfos.value.lockUserNo!;
|
|
||||||
CommonDataManage().initUserNo = state.keyInfos.value.initUserNo!;
|
|
||||||
CommonDataManage().currentKeyInfo = state.keyInfos.value;
|
|
||||||
|
|
||||||
state.lockUserNo = state.keyInfos.value.lockUserNo!;
|
|
||||||
|
|
||||||
if (state.keyInfos.value.keyStatus ==
|
|
||||||
XSConstantMacro.keyStatusWaitIneffective ||
|
|
||||||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusFrozen ||
|
|
||||||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusExpired ||
|
|
||||||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusDeleted ||
|
|
||||||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusReset) {
|
|
||||||
state.openDoorBtnisUneable.value = false;
|
|
||||||
state.bottomBtnisEable.value = false;
|
|
||||||
} else {
|
|
||||||
state.openDoorBtnisUneable.value = true;
|
|
||||||
state.bottomBtnisEable.value = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
state.isOnlyOneData = widget.isOnlyOneData;
|
|
||||||
state.senderUserId = state.keyInfos.value.senderUserId!;
|
|
||||||
state.isAttendance.value = state.keyInfos.value.lockSetting!.attendance!;
|
|
||||||
state.isOpenLockNeedOnline.value =
|
|
||||||
state.keyInfos.value.lockSetting!.appUnlockOnline!;
|
|
||||||
state.electricQuantity.value = state.keyInfos.value.electricQuantity!;
|
|
||||||
state.isOpenPassageMode.value = state.keyInfos.value.passageMode!;
|
|
||||||
state.lockAlias.value = state.keyInfos.value.lockAlias!;
|
|
||||||
Storage.setString(saveLockAlias, state.lockAlias.value);
|
|
||||||
|
|
||||||
BlueManage().connectDeviceName =
|
|
||||||
state.keyInfos.value.bluetooth!.bluetoothDeviceName!;
|
|
||||||
|
|
||||||
final List<int> publicKeyData =
|
|
||||||
state.keyInfos.value.bluetooth!.publicKey!.cast<int>();
|
|
||||||
final List<String> saveStrList = changeIntListToStringList(publicKeyData);
|
|
||||||
Storage.setStringList(saveBluePublicKey, saveStrList);
|
|
||||||
|
|
||||||
// 私钥
|
|
||||||
final List<int> privateKeyData =
|
|
||||||
state.keyInfos.value.bluetooth!.privateKey!.cast<int>();
|
|
||||||
final List<String> savePrivateKeyList =
|
|
||||||
changeIntListToStringList(privateKeyData);
|
|
||||||
Storage.setStringList(saveBluePrivateKey, savePrivateKeyList);
|
|
||||||
|
|
||||||
// signKey
|
|
||||||
final List<int> signKeyData =
|
|
||||||
state.keyInfos.value.bluetooth!.signKey!.cast<int>();
|
|
||||||
final List<String> saveSignKeyList = changeIntListToStringList(signKeyData);
|
|
||||||
Storage.setStringList(saveBlueSignKey, saveSignKeyList);
|
|
||||||
|
|
||||||
final bool ifHaveKey = await Storage.ifHaveKey(saveBlueToken);
|
|
||||||
if (!ifHaveKey) {
|
|
||||||
final List<String> saveTokenList =
|
|
||||||
changeIntListToStringList(<int>[0, 0, 0, 0]);
|
|
||||||
Storage.setStringList(saveBlueToken, saveTokenList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
loadData();
|
|
||||||
return F.sw(skyCall: skWidget, xhjCall: xhjWidget);
|
return F.sw(skyCall: skWidget, xhjCall: xhjWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user