完成bugly添加
This commit is contained in:
parent
e4eaa97046
commit
dbc5c0bfd5
@ -112,7 +112,7 @@ class AddICCardLogic extends BaseGetXController{
|
|||||||
BuglyTool.uploadException(
|
BuglyTool.uploadException(
|
||||||
message: '添加卡结果,解析数据',
|
message: '添加卡结果,解析数据',
|
||||||
detail: '添加卡结果,解析数据 _replyAddICCardConfirmation:${reply.data}',
|
detail: '添加卡结果,解析数据 _replyAddICCardConfirmation:${reply.data}',
|
||||||
eventStr: '添加卡事件',
|
eventStr: '添加卡事件结果',
|
||||||
upload: true
|
upload: true
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -201,7 +201,6 @@ class AddICCardLogic extends BaseGetXController{
|
|||||||
token: getTokenList,
|
token: getTokenList,
|
||||||
).toString();
|
).toString();
|
||||||
|
|
||||||
|
|
||||||
showBlueConnetctToastTimer(action: () async {
|
showBlueConnetctToastTimer(action: () async {
|
||||||
final String getMobile = (await Storage.getMobile())!;
|
final String getMobile = (await Storage.getMobile())!;
|
||||||
UmengCommonSdk.onEvent('add_card', {
|
UmengCommonSdk.onEvent('add_card', {
|
||||||
@ -214,7 +213,7 @@ class AddICCardLogic extends BaseGetXController{
|
|||||||
BuglyTool.uploadException(
|
BuglyTool.uploadException(
|
||||||
message: '添加卡超时处理-添加卡失败',
|
message: '添加卡超时处理-添加卡失败',
|
||||||
detail: '添加卡超时处理,断开连接,添加卡失败--SenderAddICCardWithTimeCycleCoercionCommand:$command',
|
detail: '添加卡超时处理,断开连接,添加卡失败--SenderAddICCardWithTimeCycleCoercionCommand:$command',
|
||||||
eventStr: '添加卡事件',
|
eventStr: '添加卡事件超时',
|
||||||
upload: true
|
upload: true
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -256,7 +255,7 @@ class AddICCardLogic extends BaseGetXController{
|
|||||||
BuglyTool.uploadException(
|
BuglyTool.uploadException(
|
||||||
message: '添加卡超时处理-添加卡失败',
|
message: '添加卡超时处理-添加卡失败',
|
||||||
detail: '添加卡超时处理,断开连接,添加卡失败--SenderAddICCardWithTimeCycleCoercionCommand:$command',
|
detail: '添加卡超时处理,断开连接,添加卡失败--SenderAddICCardWithTimeCycleCoercionCommand:$command',
|
||||||
eventStr: '添加卡事件',
|
eventStr: '添加卡事件断开连接',
|
||||||
upload: true
|
upload: true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -19,6 +19,7 @@ import '../../../blue/io_tool/manager_event_bus.dart';
|
|||||||
import '../../../blue/sender_manage.dart';
|
import '../../../blue/sender_manage.dart';
|
||||||
import '../../../network/api_repository.dart';
|
import '../../../network/api_repository.dart';
|
||||||
import '../../../tools/baseGetXController.dart';
|
import '../../../tools/baseGetXController.dart';
|
||||||
|
import '../../../tools/bugly/bugly_tool.dart';
|
||||||
import '../../../tools/storage.dart';
|
import '../../../tools/storage.dart';
|
||||||
import '../lockOperatingRecord/keyOperationRecord_entity.dart';
|
import '../lockOperatingRecord/keyOperationRecord_entity.dart';
|
||||||
|
|
||||||
@ -39,6 +40,13 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 根据时间查解析数据
|
// 根据时间查解析数据
|
||||||
Future<void> _replyReferEventRecordTime(Reply reply) async {
|
Future<void> _replyReferEventRecordTime(Reply reply) async {
|
||||||
|
BuglyTool.uploadException(
|
||||||
|
message: '查询锁记录结果,解析数据',
|
||||||
|
detail: '查询锁记录结果,解析数据:${reply.data}',
|
||||||
|
eventStr: '查询锁记录事件结果',
|
||||||
|
upload: true
|
||||||
|
);
|
||||||
|
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
final int status = reply.data[2];
|
final int status = reply.data[2];
|
||||||
|
|
||||||
@ -108,6 +116,28 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 查询事件记录(时间查询)
|
// 查询事件记录(时间查询)
|
||||||
Future<void> senderReferEventRecordTime() async {
|
Future<void> senderReferEventRecordTime() async {
|
||||||
|
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
|
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
|
|
||||||
|
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
||||||
|
final List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
|
final List<String>? publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||||
|
final List<int> getPublicKeyList = changeStringListToIntList(publicKey!);
|
||||||
|
|
||||||
|
final String command = SenderReferEventRecordTimeCommand(
|
||||||
|
keyID: BlueManage().connectDeviceName,
|
||||||
|
userID: await Storage.getUid(),
|
||||||
|
logsCount: state.logCountPage,
|
||||||
|
// time:DateTime.now().millisecondsSinceEpoch~/1000,
|
||||||
|
time: state.operateDate,
|
||||||
|
currentDate: state.currentDate,
|
||||||
|
token: getTokenList,
|
||||||
|
needAuthor: 1,
|
||||||
|
publicKey: getPublicKeyList,
|
||||||
|
privateKey: getPrivateKeyList,
|
||||||
|
).toString();
|
||||||
|
|
||||||
showEasyLoading();
|
showEasyLoading();
|
||||||
showBlueConnetctToastTimer(action: () async {
|
showBlueConnetctToastTimer(action: () async {
|
||||||
dismissEasyLoading();
|
dismissEasyLoading();
|
||||||
@ -119,22 +149,26 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
'date':DateTool().getNowDateWithType(1),
|
'date':DateTool().getNowDateWithType(1),
|
||||||
'open_lock_result':'超时',
|
'open_lock_result':'超时',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
BuglyTool.uploadException(
|
||||||
|
message: '查询锁记录超时-查询锁记录失败',
|
||||||
|
detail: '添加密码超时,查询锁记录失败--senderReferEventRecordTimeCommand:$command',
|
||||||
|
eventStr: '查询锁记录事件超时',
|
||||||
|
upload: true
|
||||||
|
);
|
||||||
|
|
||||||
});
|
});
|
||||||
BlueManage().blueSendData(BlueManage().connectDeviceName,
|
BlueManage().blueSendData(BlueManage().connectDeviceName,
|
||||||
(BluetoothConnectionState connectionStateState) async {
|
(BluetoothConnectionState connectionStateState) async {
|
||||||
if (connectionStateState == BluetoothConnectionState.connected) {
|
if (connectionStateState == BluetoothConnectionState.connected) {
|
||||||
final List<String>? privateKey =
|
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
await Storage.getStringList(saveBluePrivateKey);
|
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
final List<int> getPrivateKeyList =
|
|
||||||
changeStringListToIntList(privateKey!);
|
|
||||||
|
|
||||||
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
||||||
final List<int> getTokenList = changeStringListToIntList(token!);
|
final List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
final List<String>? publicKey =
|
final List<String>? publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||||
await Storage.getStringList(saveBluePublicKey);
|
final List<int> getPublicKeyList = changeStringListToIntList(publicKey!);
|
||||||
final List<int> getPublicKeyList =
|
|
||||||
changeStringListToIntList(publicKey!);
|
|
||||||
|
|
||||||
IoSenderManage.senderReferEventRecordTimeCommand(
|
IoSenderManage.senderReferEventRecordTimeCommand(
|
||||||
keyID: BlueManage().connectDeviceName,
|
keyID: BlueManage().connectDeviceName,
|
||||||
@ -161,6 +195,12 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
'open_lock_result':'断开连接',
|
'open_lock_result':'断开连接',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
BuglyTool.uploadException(
|
||||||
|
message: '查询锁记录超时-查询锁记录失败',
|
||||||
|
detail: '添加密码超时,查询锁记录失败--senderReferEventRecordTimeCommand:$command',
|
||||||
|
eventStr: '查询锁记录事件断开连接',
|
||||||
|
upload: true
|
||||||
|
);
|
||||||
if (state.ifCurrentScreen.value == true) {
|
if (state.ifCurrentScreen.value == true) {
|
||||||
showBlueConnetctToast();
|
showBlueConnetctToast();
|
||||||
}
|
}
|
||||||
@ -238,9 +278,7 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
if(list.isEmpty){
|
if(list.isEmpty){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final KeyOperationRecordEntity entity = await ApiRepository.to
|
final KeyOperationRecordEntity entity = await ApiRepository.to.lockRecordUploadData(lockId: state.keyInfos.value.lockId.toString(), records: list);
|
||||||
.lockRecordUploadData(
|
|
||||||
lockId: state.keyInfos.value.lockId.toString(), records: list);
|
|
||||||
final String getMobile = (await Storage.getMobile())!;
|
final String getMobile = (await Storage.getMobile())!;
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
if (state.ifHaveNext == true) {
|
if (state.ifHaveNext == true) {
|
||||||
|
|||||||
@ -212,8 +212,8 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
|
|
||||||
BuglyTool.uploadException(
|
BuglyTool.uploadException(
|
||||||
message: '添加指纹确认结果,解析数据',
|
message: '添加指纹确认结果,解析数据',
|
||||||
detail: '添加指纹确认结果,解析数据 _replyAddFingerprintConfirmation:${reply.data}',
|
detail: '添加指纹确认结果蓝牙返回失败结果,解析数据 _replyAddFingerprintConfirmation:${reply.data}',
|
||||||
eventStr: '添加指纹事件',
|
eventStr: '添加指纹事件蓝牙返回失败结果',
|
||||||
upload: true
|
upload: true
|
||||||
);
|
);
|
||||||
state.ifAddState.value = false;
|
state.ifAddState.value = false;
|
||||||
@ -264,7 +264,7 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
BuglyTool.uploadException(
|
BuglyTool.uploadException(
|
||||||
message: '添加指纹超时处理-添加指纹失败',
|
message: '添加指纹超时处理-添加指纹失败',
|
||||||
detail: '添加指纹超时处理,断开连接,添加指纹失败--SenderAddFingerprintWithTimeCycleCoercionCommand:$command',
|
detail: '添加指纹超时处理,断开连接,添加指纹失败--SenderAddFingerprintWithTimeCycleCoercionCommand:$command',
|
||||||
eventStr: '添加指纹事件',
|
eventStr: '添加指纹事件超时',
|
||||||
upload: true
|
upload: true
|
||||||
);
|
);
|
||||||
Get.close(1);
|
Get.close(1);
|
||||||
@ -312,7 +312,7 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
BuglyTool.uploadException(
|
BuglyTool.uploadException(
|
||||||
message: '添加指纹断开连接-添加指纹失败',
|
message: '添加指纹断开连接-添加指纹失败',
|
||||||
detail: '添加指纹断开连接-添加指纹失败--SenderAddFingerprintWithTimeCycleCoercionCommand:$command',
|
detail: '添加指纹断开连接-添加指纹失败--SenderAddFingerprintWithTimeCycleCoercionCommand:$command',
|
||||||
eventStr: '添加指纹事件',
|
eventStr: '添加指纹事件断开连接',
|
||||||
upload: true
|
upload: true
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -376,8 +376,8 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
updateFingerprintUserNoLoadData(entity.data!.fingerprintId.toString());
|
updateFingerprintUserNoLoadData(entity.data!.fingerprintId.toString());
|
||||||
BuglyTool.uploadException(
|
BuglyTool.uploadException(
|
||||||
message: '添加指纹调用接口成功',
|
message: '添加指纹调用接口成功',
|
||||||
detail: '添加指纹调用接口成功 - ',
|
detail: '添加指纹调用接口成功',
|
||||||
eventStr: '添加指纹事件',
|
eventStr: '添加指纹事件用接口成功',
|
||||||
upload: true
|
upload: true
|
||||||
);
|
);
|
||||||
}else{
|
}else{
|
||||||
@ -385,7 +385,7 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
BuglyTool.uploadException(
|
BuglyTool.uploadException(
|
||||||
message: '添加指纹调用接口失败',
|
message: '添加指纹调用接口失败',
|
||||||
detail: '添加指纹调用接口添加指纹调用接口失败 - ${entity.errorMsg}',
|
detail: '添加指纹调用接口添加指纹调用接口失败 - ${entity.errorMsg}',
|
||||||
eventStr: '添加指纹事件',
|
eventStr: '添加指纹事件接口失败',
|
||||||
upload: true
|
upload: true
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import '../../../../blue/io_tool/io_tool.dart';
|
|||||||
import '../../../../blue/io_tool/manager_event_bus.dart';
|
import '../../../../blue/io_tool/manager_event_bus.dart';
|
||||||
import '../../../../blue/sender_manage.dart';
|
import '../../../../blue/sender_manage.dart';
|
||||||
import '../../../../tools/baseGetXController.dart';
|
import '../../../../tools/baseGetXController.dart';
|
||||||
|
import '../../../../tools/bugly/bugly_tool.dart';
|
||||||
import '../../../../tools/commonDataManage.dart';
|
import '../../../../tools/commonDataManage.dart';
|
||||||
import '../../../../tools/dateTool.dart';
|
import '../../../../tools/dateTool.dart';
|
||||||
import '../../../../tools/storage.dart';
|
import '../../../../tools/storage.dart';
|
||||||
@ -243,11 +244,16 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
|
|||||||
late StreamSubscription<Reply> _replySubscription;
|
late StreamSubscription<Reply> _replySubscription;
|
||||||
|
|
||||||
void _initReplySubscription() {
|
void _initReplySubscription() {
|
||||||
_replySubscription =
|
_replySubscription = EventBusManager().eventBus!.on<Reply>().listen((Reply reply) async {
|
||||||
EventBusManager().eventBus!.on<Reply>().listen((Reply reply) async {
|
|
||||||
// 设置自定义密码
|
// 设置自定义密码
|
||||||
if ((reply is SenderCustomPasswordsReply) &&
|
if ((reply is SenderCustomPasswordsReply) && (state.ifCurrentScreen.value == true)) {
|
||||||
(state.ifCurrentScreen.value == true)) {
|
BuglyTool.uploadException(
|
||||||
|
message: '添加密码结果,解析数据',
|
||||||
|
detail: '添加密码结果,解析数据:${reply.data}',
|
||||||
|
eventStr: '添加密码事件结果',
|
||||||
|
upload: true
|
||||||
|
);
|
||||||
|
|
||||||
final int status = reply.data[2];
|
final int status = reply.data[2];
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
@ -384,6 +390,32 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
state.sureBtnState.value = 1;
|
state.sureBtnState.value = 1;
|
||||||
|
|
||||||
|
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
|
||||||
|
final List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
|
|
||||||
|
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
|
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
|
|
||||||
|
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
||||||
|
final List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
|
final String command = SenderCustomPasswordsCommand(
|
||||||
|
keyID: '1',
|
||||||
|
userID: await Storage.getUid(),
|
||||||
|
pwdNo: 0,
|
||||||
|
pwd: state.pwdController.text,
|
||||||
|
operate: 0,
|
||||||
|
isAdmin: state.isAdministrator.value == true ? 1 : 0,
|
||||||
|
useCountLimit: 0xffff,
|
||||||
|
startTime: startDate ~/ 1000,
|
||||||
|
endTime: endDate ~/ 1000,
|
||||||
|
needAuthor: 1,
|
||||||
|
signKey: signKeyDataList,
|
||||||
|
privateKey: getPrivateKeyList,
|
||||||
|
token: getTokenList
|
||||||
|
).toString();
|
||||||
|
|
||||||
|
|
||||||
showEasyLoading();
|
showEasyLoading();
|
||||||
showBlueConnetctToastTimer(action: () async {
|
showBlueConnetctToastTimer(action: () async {
|
||||||
final String getMobile = (await Storage.getMobile())!;
|
final String getMobile = (await Storage.getMobile())!;
|
||||||
@ -394,20 +426,24 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
|
|||||||
'add_password_result':'添加自定义密码超时',
|
'add_password_result':'添加自定义密码超时',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
BuglyTool.uploadException(
|
||||||
|
message: '添加密码超时处理-添加密码失败',
|
||||||
|
detail: '添加密码超时,添加密码失败--senderCustomPasswordsCommand:$command',
|
||||||
|
eventStr: '添加密码事件超时',
|
||||||
|
upload: true
|
||||||
|
);
|
||||||
|
|
||||||
dismissEasyLoading();
|
dismissEasyLoading();
|
||||||
state.sureBtnState.value = 0;
|
state.sureBtnState.value = 0;
|
||||||
});
|
});
|
||||||
BlueManage().blueSendData(BlueManage().connectDeviceName,
|
BlueManage().blueSendData(BlueManage().connectDeviceName,
|
||||||
(BluetoothConnectionState deviceConnectionState) async {
|
(BluetoothConnectionState deviceConnectionState) async {
|
||||||
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
||||||
final List<String>? signKey =
|
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
|
||||||
await Storage.getStringList(saveBlueSignKey);
|
|
||||||
final List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
final List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
|
|
||||||
final List<String>? privateKey =
|
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
await Storage.getStringList(saveBluePrivateKey);
|
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
final List<int> getPrivateKeyList =
|
|
||||||
changeStringListToIntList(privateKey!);
|
|
||||||
|
|
||||||
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
||||||
final List<int> getTokenList = changeStringListToIntList(token!);
|
final List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
@ -436,6 +472,13 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
|
|||||||
'add_password_result':'添加自定义密码断开',
|
'add_password_result':'添加自定义密码断开',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
BuglyTool.uploadException(
|
||||||
|
message: '添加密码断开-添加密码失败',
|
||||||
|
detail: '添加密码断开,添加密码失败--senderCustomPasswordsCommand:$command',
|
||||||
|
eventStr: '添加密码事件断开连接',
|
||||||
|
upload: true
|
||||||
|
);
|
||||||
|
|
||||||
dismissEasyLoading();
|
dismissEasyLoading();
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
state.sureBtnState.value = 0;
|
state.sureBtnState.value = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user