Merge branch 'develop_sky_liyi' into 'develop_sky'
Develop sky liyi See merge request StarlockTeam/app-starlock!159
This commit is contained in:
commit
0ffde21dda
@ -126,6 +126,17 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
TalkStatus.answeredSuccessfully) {
|
TalkStatus.answeredSuccessfully) {
|
||||||
showToast('开锁成功'.tr);
|
showToast('开锁成功'.tr);
|
||||||
}
|
}
|
||||||
|
// 如果是单次钥匙,则开锁成功之后调用删除
|
||||||
|
if (state.keyInfos.value.keyType == 3) {
|
||||||
|
final LockListInfoEntity entity = await ApiRepository.to
|
||||||
|
.deletOwnerKeyData(
|
||||||
|
lockId: state.keyInfos.value.lockId.toString(),
|
||||||
|
keyId: state.keyInfos.value!.keyId.toString(),
|
||||||
|
includeUnderlings: 0);
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
AppLog.log("删除成功");
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 0x06:
|
case 0x06:
|
||||||
//无权限
|
//无权限
|
||||||
@ -532,8 +543,7 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
final List<int> getPublicKeyList =
|
final List<int> getPublicKeyList =
|
||||||
changeStringListToIntList(publicKey!);
|
changeStringListToIntList(publicKey!);
|
||||||
|
|
||||||
AppLog.log(
|
AppLog.log('发送同步锁记录命令:${BlueManage().connectDeviceName}');
|
||||||
'发送同步锁记录命令:${BlueManage().connectDeviceName}');
|
|
||||||
IoSenderManage.senderReferEventRecordTimeCommand(
|
IoSenderManage.senderReferEventRecordTimeCommand(
|
||||||
keyID: BlueManage().connectDeviceName,
|
keyID: BlueManage().connectDeviceName,
|
||||||
userID: await Storage.getUid(),
|
userID: await Storage.getUid(),
|
||||||
|
|||||||
@ -798,8 +798,48 @@ class UploadDataLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
state.indexCount.value = 0;
|
if (uploadType == 1) {
|
||||||
state.sureBtnState.value = 0;
|
// 1设置
|
||||||
|
// state.indexCount.value = 0;
|
||||||
|
// state.sureBtnState.value = 0;
|
||||||
|
// showToast('上传成功'.tr);
|
||||||
|
} else {
|
||||||
|
// 2开门方式
|
||||||
|
switch (recordType) {
|
||||||
|
// case 1:
|
||||||
|
// // 电子钥匙
|
||||||
|
//
|
||||||
|
// break;
|
||||||
|
case 2:
|
||||||
|
// 密码上传成功之后,获取卡列表
|
||||||
|
getUpdataLockCardList();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
// IC卡上传成功,获取指纹列表
|
||||||
|
getUpdataLockFingerprintList();
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
// 指纹上传成功,获取人脸列表
|
||||||
|
getUpdataLockFaceList();
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
// 人脸上传成功,获取掌静脉列表
|
||||||
|
getUpdataLockPalmVeinList();
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
// 掌静脉上传成功,获取锁遥控
|
||||||
|
getUpdataLockRemoteControlList();
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
// 遥控上传成功,获取锁设置
|
||||||
|
getUpdataLockSet();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// state.indexCount.value = 0;
|
||||||
|
// state.sureBtnState.value = 0;
|
||||||
dismissEasyLoading();
|
dismissEasyLoading();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,9 @@ import 'dart:typed_data';
|
|||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/appRouters.dart';
|
||||||
import 'package:star_lock/app_settings/app_settings.dart';
|
import 'package:star_lock/app_settings/app_settings.dart';
|
||||||
|
import 'package:star_lock/main/lockMian/entity/lockListInfo_entity.dart';
|
||||||
import 'package:star_lock/talk/starChart/constant/message_type_constant.dart';
|
import 'package:star_lock/talk/starChart/constant/message_type_constant.dart';
|
||||||
import 'package:star_lock/talk/starChart/constant/talk_status.dart';
|
import 'package:star_lock/talk/starChart/constant/talk_status.dart';
|
||||||
import 'package:star_lock/talk/starChart/entity/scp_message.dart';
|
import 'package:star_lock/talk/starChart/entity/scp_message.dart';
|
||||||
@ -16,6 +18,8 @@ import 'package:star_lock/talk/starChart/proto/talk_data.pb.dart';
|
|||||||
import 'package:star_lock/talk/starChart/proto/talk_expect.pb.dart';
|
import 'package:star_lock/talk/starChart/proto/talk_expect.pb.dart';
|
||||||
import 'package:star_lock/talk/starChart/views/talkView/talk_view_logic.dart';
|
import 'package:star_lock/talk/starChart/views/talkView/talk_view_logic.dart';
|
||||||
import 'package:star_lock/talk/starChart/views/talkView/talk_view_state.dart';
|
import 'package:star_lock/talk/starChart/views/talkView/talk_view_state.dart';
|
||||||
|
import 'package:star_lock/tools/commonDataManage.dart';
|
||||||
|
import 'package:star_lock/tools/storage.dart';
|
||||||
|
|
||||||
import '../../star_chart_manage.dart';
|
import '../../star_chart_manage.dart';
|
||||||
|
|
||||||
@ -32,10 +36,14 @@ class UdpTalkExpectHandler extends ScpMessageBaseHandle
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void handleResp(ScpMessage scpMessage) {
|
void handleResp(ScpMessage scpMessage) async {
|
||||||
// 收到预期音视频数据回复
|
// 收到预期音视频数据回复
|
||||||
final TalkExpectResp talkExpectResp = scpMessage.Payload;
|
final TalkExpectResp talkExpectResp = scpMessage.Payload;
|
||||||
|
|
||||||
if (talkExpectResp != null) {
|
if (talkExpectResp != null) {
|
||||||
|
// 播放铃声
|
||||||
|
//test:使用自定义铃声
|
||||||
|
playRingtone();
|
||||||
// print('收到预期音视频数据回复,scpMessage:$scpMessage');
|
// print('收到预期音视频数据回复,scpMessage:$scpMessage');
|
||||||
// 停止发送预期数据的定时器
|
// 停止发送预期数据的定时器
|
||||||
startChartManage.stopTalkExpectMessageTimer();
|
startChartManage.stopTalkExpectMessageTimer();
|
||||||
@ -45,7 +53,7 @@ class UdpTalkExpectHandler extends ScpMessageBaseHandle
|
|||||||
startChartManage.rotateAngle = talkExpectResp.rotate;
|
startChartManage.rotateAngle = talkExpectResp.rotate;
|
||||||
startChartManage.videoWidth = talkExpectResp.width;
|
startChartManage.videoWidth = talkExpectResp.width;
|
||||||
startChartManage.videoHeight = talkExpectResp.height;
|
startChartManage.videoHeight = talkExpectResp.height;
|
||||||
AppLog.log('视频画面需要旋转:${talkExpectResp.rotate},画面宽高:${talkExpectResp.width}-${talkExpectResp.height}');
|
|
||||||
// 收到预期数据的应答后,代表建立了连接,启动通话保持的监听
|
// 收到预期数据的应答后,代表建立了连接,启动通话保持的监听
|
||||||
// 启动通话保持监听定时器(用来判断如果x秒内没有收到通话保持则执行的操作);
|
// 启动通话保持监听定时器(用来判断如果x秒内没有收到通话保持则执行的操作);
|
||||||
talkePingOverTimeTimerManager.start();
|
talkePingOverTimeTimerManager.start();
|
||||||
@ -59,6 +67,50 @@ class UdpTalkExpectHandler extends ScpMessageBaseHandle
|
|||||||
// 主动呼叫时需要启动ping
|
// 主动呼叫时需要启动ping
|
||||||
startChartManage.startTalkPingMessageTimer();
|
startChartManage.startTalkPingMessageTimer();
|
||||||
}
|
}
|
||||||
|
AppLog.log(
|
||||||
|
'视频画面需要旋转:${talkExpectResp.rotate},画面宽高:${talkExpectResp.width}-${talkExpectResp.height}');
|
||||||
|
// 获取锁支持项
|
||||||
|
final LockListInfoItemEntity currentKeyInfo =
|
||||||
|
CommonDataManage().currentKeyInfo;
|
||||||
|
// 0、wifi保活 1、wifi不保活图传 2、wifi不保活可视对讲
|
||||||
|
var isWifiLockType = currentKeyInfo.lockFeature?.wifiLockType == 1;
|
||||||
|
|
||||||
|
final LockListInfoGroupEntity? lockListInfoGroupEntity =
|
||||||
|
await Storage.getLockMainListData();
|
||||||
|
if (lockListInfoGroupEntity != null) {
|
||||||
|
lockListInfoGroupEntity!.groupList?.forEach((element) {
|
||||||
|
final lockList = element.lockList;
|
||||||
|
if (lockList != null && lockList.length != 0) {
|
||||||
|
for (var lockInfo in lockList) {
|
||||||
|
final peerId = lockInfo.network?.peerId;
|
||||||
|
if (peerId != null && peerId != '') {
|
||||||
|
if (peerId == scpMessage.FromPeerId) {
|
||||||
|
isWifiLockType = lockInfo.lockFeature?.wifiLockType == 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (isWifiLockType ||
|
||||||
|
(talkExpectResp.rotate == 0 &&
|
||||||
|
talkExpectResp.width == 640 &&
|
||||||
|
talkExpectResp.height == 480)) {
|
||||||
|
Get.toNamed(Routers.imageTransmissionView);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (startChartManage
|
||||||
|
.getDefaultTalkExpect()
|
||||||
|
.videoType
|
||||||
|
.contains(VideoTypeE.H264)) {
|
||||||
|
Get.toNamed(
|
||||||
|
Routers.h264WebView,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Get.toNamed(
|
||||||
|
Routers.starChartTalkView,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -90,52 +90,10 @@ class UdpTalkRequestHandler extends ScpMessageBaseHandle
|
|||||||
}) async {
|
}) async {
|
||||||
// 发送预期数据、通知锁板需要获取视频数据
|
// 发送预期数据、通知锁板需要获取视频数据
|
||||||
_handleRequestSendExpect(lockPeerID: lockPeerID);
|
_handleRequestSendExpect(lockPeerID: lockPeerID);
|
||||||
// 播放铃声
|
|
||||||
//test:使用自定义铃声
|
|
||||||
playRingtone();
|
|
||||||
// 显示状态栏弹窗
|
// 显示状态栏弹窗
|
||||||
// _showTalkRequestNotification(talkObjectName: talkObjectName);
|
// _showTalkRequestNotification(talkObjectName: talkObjectName);
|
||||||
// 设置为等待接听状态
|
// 设置为等待接听状态
|
||||||
talkStatus.setPassiveCallWaitingAnswer();
|
talkStatus.setPassiveCallWaitingAnswer();
|
||||||
|
|
||||||
// 获取锁支持项
|
|
||||||
final LockListInfoItemEntity currentKeyInfo =
|
|
||||||
CommonDataManage().currentKeyInfo;
|
|
||||||
var isWifiLockType = currentKeyInfo.lockFeature?.wifiLockType == 1;
|
|
||||||
|
|
||||||
final LockListInfoGroupEntity? lockListInfoGroupEntity =
|
|
||||||
await Storage.getLockMainListData();
|
|
||||||
if (lockListInfoGroupEntity != null) {
|
|
||||||
lockListInfoGroupEntity!.groupList?.forEach((element) {
|
|
||||||
final lockList = element.lockList;
|
|
||||||
if (lockList != null && lockList.length != 0) {
|
|
||||||
for (var lockInfo in lockList) {
|
|
||||||
final peerId = lockInfo.network?.peerId;
|
|
||||||
if (peerId != null && peerId != '') {
|
|
||||||
if (peerId == lockPeerID) {
|
|
||||||
isWifiLockType = lockInfo.lockFeature?.wifiLockType == 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (isWifiLockType) {
|
|
||||||
Get.toNamed(Routers.imageTransmissionView);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (startChartManage
|
|
||||||
.getDefaultTalkExpect()
|
|
||||||
.videoType
|
|
||||||
.contains(VideoTypeE.H264)) {
|
|
||||||
Get.toNamed(
|
|
||||||
Routers.h264WebView,
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
Get.toNamed(
|
|
||||||
Routers.starChartTalkView,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 收到来电请求时进行本地通知
|
// 收到来电请求时进行本地通知
|
||||||
|
|||||||
@ -55,13 +55,22 @@ class _ImageTransmissionPageState extends State<ImageTransmissionPage>
|
|||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String handlerAppBarTitle() {
|
||||||
|
if (startChartManage.rotateAngle == 0 &&
|
||||||
|
startChartManage.videoWidth == 640 &&
|
||||||
|
startChartManage.videoHeight == 480) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
return '图传'.tr;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
barTitle: '图传'.tr,
|
barTitle: handlerAppBarTitle(),
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor,
|
backgroundColor: AppColors.mainColor,
|
||||||
backAction: () {
|
backAction: () {
|
||||||
@ -142,7 +151,7 @@ class _ImageTransmissionPageState extends State<ImageTransmissionPage>
|
|||||||
borderRadius: BorderRadius.circular(30.h),
|
borderRadius: BorderRadius.circular(30.h),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: barWidth,
|
width: barWidth,
|
||||||
height: double.infinity,
|
// height: double.infinity,
|
||||||
child: RotatedBox(
|
child: RotatedBox(
|
||||||
quarterTurns: startChartManage.rotateAngle ~/ 90,
|
quarterTurns: startChartManage.rotateAngle ~/ 90,
|
||||||
child: RawImage(
|
child: RawImage(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user