develop_sky #1

Merged
liyi merged 62 commits from develop_sky into develop_sky_liyi 2025-09-22 17:48:20 +08:00
5 changed files with 119 additions and 50 deletions
Showing only changes of commit 0ffde21dda - Show all commits

View File

@ -126,6 +126,17 @@ class LockDetailLogic extends BaseGetXController {
TalkStatus.answeredSuccessfully) {
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;
case 0x06:
//
@ -532,8 +543,7 @@ class LockDetailLogic extends BaseGetXController {
final List<int> getPublicKeyList =
changeStringListToIntList(publicKey!);
AppLog.log(
'发送同步锁记录命令:${BlueManage().connectDeviceName}');
AppLog.log('发送同步锁记录命令:${BlueManage().connectDeviceName}');
IoSenderManage.senderReferEventRecordTimeCommand(
keyID: BlueManage().connectDeviceName,
userID: await Storage.getUid(),

View File

@ -798,8 +798,48 @@ class UploadDataLogic extends BaseGetXController {
}
}
} else {
state.indexCount.value = 0;
state.sureBtnState.value = 0;
if (uploadType == 1) {
// 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();
}
}

View File

@ -4,7 +4,9 @@ import 'dart:typed_data';
import 'package:flutter/services.dart';
import 'package:flutter_easyloading/flutter_easyloading.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/main/lockMian/entity/lockListInfo_entity.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/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/views/talkView/talk_view_logic.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';
@ -32,10 +36,14 @@ class UdpTalkExpectHandler extends ScpMessageBaseHandle
}
@override
void handleResp(ScpMessage scpMessage) {
void handleResp(ScpMessage scpMessage) async {
//
final TalkExpectResp talkExpectResp = scpMessage.Payload;
if (talkExpectResp != null) {
//
//test:使
playRingtone();
// print('收到预期音视频数据回复,scpMessage:$scpMessage');
//
startChartManage.stopTalkExpectMessageTimer();
@ -45,7 +53,7 @@ class UdpTalkExpectHandler extends ScpMessageBaseHandle
startChartManage.rotateAngle = talkExpectResp.rotate;
startChartManage.videoWidth = talkExpectResp.width;
startChartManage.videoHeight = talkExpectResp.height;
AppLog.log('视频画面需要旋转:${talkExpectResp.rotate},画面宽高:${talkExpectResp.width}-${talkExpectResp.height}');
//
// x秒内没有收到通话保持则执行的操作;
talkePingOverTimeTimerManager.start();
@ -59,6 +67,50 @@ class UdpTalkExpectHandler extends ScpMessageBaseHandle
// ping
startChartManage.startTalkPingMessageTimer();
}
AppLog.log(
'视频画面需要旋转:${talkExpectResp.rotate},画面宽高:${talkExpectResp.width}-${talkExpectResp.height}');
//
final LockListInfoItemEntity currentKeyInfo =
CommonDataManage().currentKeyInfo;
// 0wifi保活 1wifi不保活图传 2wifi不保活可视对讲
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,
);
}
}
}

View File

@ -90,52 +90,10 @@ class UdpTalkRequestHandler extends ScpMessageBaseHandle
}) async {
//
_handleRequestSendExpect(lockPeerID: lockPeerID);
//
//test:使
playRingtone();
//
// _showTalkRequestNotification(talkObjectName: talkObjectName);
//
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,
);
}
}
//

View File

@ -55,13 +55,22 @@ class _ImageTransmissionPageState extends State<ImageTransmissionPage>
super.dispose();
}
String handlerAppBarTitle() {
if (startChartManage.rotateAngle == 0 &&
startChartManage.videoWidth == 640 &&
startChartManage.videoHeight == 480) {
return '';
}
return '图传'.tr;
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
resizeToAvoidBottomInset: false,
appBar: TitleAppBar(
barTitle: '图传'.tr,
barTitle: handlerAppBarTitle(),
haveBack: true,
backgroundColor: AppColors.mainColor,
backAction: () {
@ -142,7 +151,7 @@ class _ImageTransmissionPageState extends State<ImageTransmissionPage>
borderRadius: BorderRadius.circular(30.h),
child: Container(
width: barWidth,
height: double.infinity,
// height: double.infinity,
child: RotatedBox(
quarterTurns: startChartManage.rotateAngle ~/ 90,
child: RawImage(