diff --git a/star_lock/assets/DoorLockLogEntity.json b/star_lock/assets/DoorLockLogEntity.json deleted file mode 100644 index 258e0dc2..00000000 --- a/star_lock/assets/DoorLockLogEntity.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "errorCode": 0, - "description": "success", - "errorMsg": "success", - "data": { - "list": [{ - "recordId": 42672, - "lockId": 1744, - "lockAlias": "T9A_d7d74b2f66b8", - "recordType": 130, - "recordTypeName": "防拆报警", - "username": "", - "operateDate": 1705852800000, - "imagesUrl": null, - "videoUrl": null, - "headUrl": "", - "userid": "" - }, - { - "recordId": 42660, - "lockId": 1744, - "lockAlias": "T9A_d7d74b2f66b8", - "recordType": 220, - "recordTypeName": "逗留检测", - "username": "", - "operateDate": 1706494730335, - "imagesUrl": "http:\/\/oss-pre-starlock.star-lock.cn\/starchart\/T9A_d7d74b2f66b8-1706494718\/54c5044a-93bd-466d-a123-e1face292841.jpg", - "videoUrl": "http:\/\/oss-pre-starlock.star-lock.cn\/starchart\/T9A_d7d74b2f66b8-1706494718\/08a2b732-536b-4f06-9d20-778fdf94f137.mp4", - "headUrl": "", - "userid": "" - }, - { - "recordId": 42659, - "lockId": 1744, - "lockAlias": "T9A_d7d74b2f66b8", - "recordType": 220, - "recordTypeName": "逗留检测", - "username": "", - "operateDate": 1706494672036, - "imagesUrl": "http:\/\/oss-pre-starlock.star-lock.cn\/starchart\/T9A_d7d74b2f66b8-1706494660\/d85dcea0-c402-4f68-8664-5641a0feabe3.jpg", - "videoUrl": "http:\/\/oss-pre-starlock.star-lock.cn\/starchart\/T9A_d7d74b2f66b8-1706494660\/f3de0384-63f8-4177-9611-d8c43707afce.mp4", - "headUrl": "", - "userid": "" - }, - { - "recordId": 42658, - "lockId": 1744, - "lockAlias": "T9A_d7d74b2f66b8", - "recordType": 130, - "recordTypeName": "防拆报警", - "username": "", - "operateDate": 1706493793884, - "imagesUrl": "http:\/\/oss-pre-starlock.star-lock.cn\/starchart\/T9A_d7d74b2f66b8-1706493778\/f43ec840-ddaa-4d94-b759-7ae4384edd8f.jpg", - "videoUrl": "http:\/\/oss-pre-starlock.star-lock.cn\/starchart\/T9A_d7d74b2f66b8-1706493778\/b4a90c5c-d86f-4995-8365-d7e21a67a48d.mp4", - "headUrl": "", - "userid": "" - }, - { - "recordId": 42657, - "lockId": 1744, - "lockAlias": "T9A_d7d74b2f66b8", - "recordType": 130, - "recordTypeName": "防拆报警", - "username": "", - "operateDate": 1706493715812, - "imagesUrl": "http:\/\/oss-pre-starlock.star-lock.cn\/starchart\/T9A_d7d74b2f66b8-1706493702\/928c2b1d-1cd4-4d7f-9e61-e9315f8c4547.jpg", - "videoUrl": "http:\/\/oss-pre-starlock.star-lock.cn\/starchart\/T9A_d7d74b2f66b8-1706493702\/29e8b8e4-cd79-436d-a384-3e50dacf5cc8.mp4", - "headUrl": "", - "userid": "" - } - ], - "pageNo": 1, - "pageSize": 5, - "pages": 4, - "total": 18 - } -} \ No newline at end of file diff --git a/star_lock/images/lan/lan_en.json b/star_lock/images/lan/lan_en.json index 1e994b2d..c4b8d276 100644 --- a/star_lock/images/lan/lan_en.json +++ b/star_lock/images/lan/lan_en.json @@ -678,5 +678,8 @@ "权限被拒绝": "Permission denied", "请手动在系统设置中开启": "Please manually enable it in the system settings", "权限以继续使用应用": "Permission to continue using the application.", - "去设置": "Go set it up" + "去设置": "Go set it up", + + "虹膜":"iris", + "手掌":"palm" } diff --git a/star_lock/images/lan/lan_keys.json b/star_lock/images/lan/lan_keys.json index db7f805f..f300317b 100644 --- a/star_lock/images/lan/lan_keys.json +++ b/star_lock/images/lan/lan_keys.json @@ -677,5 +677,8 @@ "权限被拒绝": "权限被拒绝", "请手动在系统设置中开启": "请手动在系统设置中开启", "权限以继续使用应用": "权限以继续使用应用。", - "去设置": "去设置" + "去设置": "去设置", + + "虹膜":"虹膜", + "手掌":"手掌" } diff --git a/star_lock/images/lan/lan_zh.json b/star_lock/images/lan/lan_zh.json index 1edc5369..9dda9e72 100644 --- a/star_lock/images/lan/lan_zh.json +++ b/star_lock/images/lan/lan_zh.json @@ -679,5 +679,8 @@ "权限被拒绝": "权限被拒绝", "请手动在系统设置中开启": "请手动在系统设置中开启", "权限以继续使用应用": "权限以继续使用应用。", - "去设置": "去设置" + "去设置": "去设置", + + "虹膜":"虹膜", + "手掌":"手掌" } diff --git a/star_lock/lib/main/lockDetail/iris/addIris/addIris_page.dart b/star_lock/lib/main/lockDetail/iris/addIris/addIris_page.dart index 72787529..187566b3 100644 --- a/star_lock/lib/main/lockDetail/iris/addIris/addIris_page.dart +++ b/star_lock/lib/main/lockDetail/iris/addIris/addIris_page.dart @@ -24,7 +24,7 @@ class _AddIrisPageState extends State { return Scaffold( backgroundColor: Colors.white, appBar: TitleAppBar( - barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}虹膜", + barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}${'虹膜'.tr}", haveBack: true, backgroundColor: AppColors.mainColor), body: ListView( diff --git a/star_lock/lib/main/lockDetail/iris/addIrisType/addIrisTypeManage/addIrisTypeManage_page.dart b/star_lock/lib/main/lockDetail/iris/addIrisType/addIrisTypeManage/addIrisTypeManage_page.dart index 7ee02f0b..d31196e9 100644 --- a/star_lock/lib/main/lockDetail/iris/addIrisType/addIrisTypeManage/addIrisTypeManage_page.dart +++ b/star_lock/lib/main/lockDetail/iris/addIrisType/addIrisTypeManage/addIrisTypeManage_page.dart @@ -28,7 +28,7 @@ class _AddIrisTypeManagePageState extends State { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}虹膜", + barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}${'虹膜'.tr}", haveBack: true, backgroundColor: AppColors.mainColor), body: Column( diff --git a/star_lock/lib/main/lockDetail/iris/irisList/irisList_page.dart b/star_lock/lib/main/lockDetail/iris/irisList/irisList_page.dart index c9cdd639..94ee0f97 100644 --- a/star_lock/lib/main/lockDetail/iris/irisList/irisList_page.dart +++ b/star_lock/lib/main/lockDetail/iris/irisList/irisList_page.dart @@ -32,7 +32,7 @@ class _IrisListPageState extends State { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: '虹膜', + barTitle: '虹膜'.tr, haveBack: true, backgroundColor: AppColors.mainColor, actionsList: [ @@ -66,7 +66,7 @@ class _IrisListPageState extends State { ), Expanded(child: _buildMainUI()), AddBottomWhiteBtn( - btnName: '${TranslationLoader.lanKeys!.add!.tr}虹膜', + btnName: '${TranslationLoader.lanKeys!.add!.tr}${'虹膜'.tr}', onClick: () async { // var data = // await Get.toNamed(Routers.addFaceTypeManagePage, arguments: { diff --git a/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart b/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart index 583b288f..f4c94e90 100644 --- a/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart +++ b/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart @@ -678,23 +678,27 @@ class _LockDetailPageState extends State ); } - showWidgetArr.add( - bottomItem('images/main/icon_iris.png', '虹膜', - state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () { - Get.toNamed(Routers.irisListPage, arguments: { - "lockId": state.keyInfos.value.lockId, - }); - }), - ); + if (state.keyInfos.value.lockFeature!.isSupportIris == 1) { + showWidgetArr.add( + bottomItem('images/main/icon_iris.png', '虹膜'.tr, + state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () { + Get.toNamed(Routers.irisListPage, arguments: { + "lockId": state.keyInfos.value.lockId, + }); + }), + ); + } - showWidgetArr.add( - bottomItem('images/main/icon_palm.png', '手掌', - state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () { - Get.toNamed(Routers.palmListPage, arguments: { - "lockId": state.keyInfos.value.lockId, - }); - }), - ); + if (state.keyInfos.value.lockFeature!.palmVein == 1) { + showWidgetArr.add( + bottomItem('images/main/icon_palm.png', '手掌'.tr, + state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () { + Get.toNamed(Routers.palmListPage, arguments: { + "lockId": state.keyInfos.value.lockId, + }); + }), + ); + } //可视对讲门锁新增->监控 if (state.keyInfos.value.lockFeature!.videoIntercom == 1) { diff --git a/star_lock/lib/main/lockDetail/monitoring/monitoring/lockMonitoring_logic.dart b/star_lock/lib/main/lockDetail/monitoring/monitoring/lockMonitoring_logic.dart index d4e6c733..a9289aea 100644 --- a/star_lock/lib/main/lockDetail/monitoring/monitoring/lockMonitoring_logic.dart +++ b/star_lock/lib/main/lockDetail/monitoring/monitoring/lockMonitoring_logic.dart @@ -148,7 +148,9 @@ class LockMonitoringLogic extends BaseGetXController { //开始录音 Future startProcessing() async { - CallTalk().finishPcmSound(); + if (state.isProcessing.value) { + CallTalk().stopPlaySound(); + } state.isButtonDisabled.value = true; state.voiceProcessor?.addFrameListener(_onFrame); @@ -169,6 +171,9 @@ class LockMonitoringLogic extends BaseGetXController { } Future _onFrame(List frame) async { + if (state.isProcessing.value) { + CallTalk().stopPlaySound(); + } state.allFrames.add(frame); // 将帧添加到状态变量中 List concatenatedFrames = concatenateFrames(state.allFrames); // 连接所有帧 Get.log("pcm数据:$concatenatedFrames"); @@ -199,6 +204,9 @@ class LockMonitoringLogic extends BaseGetXController { } Future stopProcessing() async { + if (state.isProcessing.value) { + CallTalk().stopPlaySound(); + } state.isButtonDisabled.value = true; try { await state.voiceProcessor?.stop(); @@ -410,7 +418,7 @@ class LockMonitoringLogic extends BaseGetXController { void onClose() { // TODO: implement onClose print("锁详情界面销毁了"); - CallTalk().finishPcmSound(); + CallTalk().finishAVData(); stopProcessing(); _getUDPStatusRefreshUIEvent!.cancel(); state.getTVDataRefreshUIEvent!.cancel(); diff --git a/star_lock/lib/main/lockDetail/monitoring/monitoring/lockMonitoring_page.dart b/star_lock/lib/main/lockDetail/monitoring/monitoring/lockMonitoring_page.dart index bc040719..c79c0607 100644 --- a/star_lock/lib/main/lockDetail/monitoring/monitoring/lockMonitoring_page.dart +++ b/star_lock/lib/main/lockDetail/monitoring/monitoring/lockMonitoring_page.dart @@ -233,7 +233,7 @@ class _LockMonitoringPageState extends State { bottomBtnItemWidget( "images/main/icon_lockDetail_hangUp.png", "挂断", Colors.red, () async { logic.stopProcessing(); - CallTalk().finishPcmSound(); + CallTalk().finishAVData(); // 挂断 if (state.isClickHangUp.value == false) { logic.initiateUdpHangUpAction(3); diff --git a/star_lock/lib/main/lockDetail/realTimePicture/realTimePicture_logic.dart b/star_lock/lib/main/lockDetail/realTimePicture/realTimePicture_logic.dart index 8b96f863..7b9dbcba 100644 --- a/star_lock/lib/main/lockDetail/realTimePicture/realTimePicture_logic.dart +++ b/star_lock/lib/main/lockDetail/realTimePicture/realTimePicture_logic.dart @@ -318,7 +318,7 @@ class RealTimePictureLogic extends BaseGetXController { void onClose() { // TODO: implement onClose print("锁详情界面销毁了"); - CallTalk().finishPcmSound(); + CallTalk().finishAVData(); _getTVDataRefreshUIEvent!.cancel(); _getUDPStatusRefreshUIEvent!.cancel(); if (state.oneMinuteTimeTimer != null) { diff --git a/star_lock/lib/main/lockDetail/realTimePicture/realTimePicture_page.dart b/star_lock/lib/main/lockDetail/realTimePicture/realTimePicture_page.dart index 13969237..25dbad23 100644 --- a/star_lock/lib/main/lockDetail/realTimePicture/realTimePicture_page.dart +++ b/star_lock/lib/main/lockDetail/realTimePicture/realTimePicture_page.dart @@ -261,7 +261,7 @@ class _RealTimePicturePageState extends State "images/main/icon_lockDetail_hangUp.png", "挂断", Colors.red, () async { // 挂断 logic.udpHangUpAction(); - CallTalk().finishPcmSound(); + CallTalk().finishAVData(); Get.back(); }), bottomBtnItemWidget("images/main/icon_lockDetail_monitoringUnlock.png", @@ -401,7 +401,7 @@ class _RealTimePicturePageState extends State void _handleFailure() { // 在这里处理失败的逻辑 - CallTalk().finishPcmSound(); + CallTalk().finishAVData(); state.realTimePicTimer.cancel(); state.autoBackTimer.cancel(); if (state.animationController != null) { @@ -414,7 +414,7 @@ class _RealTimePicturePageState extends State state.animationController.dispose(); state.realTimePicTimer.cancel(); state.autoBackTimer.cancel(); - CallTalk().finishPcmSound(); + CallTalk().finishAVData(); super.dispose(); } } diff --git a/star_lock/lib/main/lockMian/entity/lockListInfo_entity.dart b/star_lock/lib/main/lockMian/entity/lockListInfo_entity.dart index 76518ca9..d359e0b0 100644 --- a/star_lock/lib/main/lockMian/entity/lockListInfo_entity.dart +++ b/star_lock/lib/main/lockMian/entity/lockListInfo_entity.dart @@ -11,7 +11,9 @@ class LockListInfoEntity { errorCode = json['errorCode']; description = json['description']; errorMsg = json['errorMsg']; - data = json['data'] != null ? LockListInfoGroupEntity.fromJson(json['data']) : null; + data = json['data'] != null + ? LockListInfoGroupEntity.fromJson(json['data']) + : null; } Map toJson() { @@ -33,7 +35,8 @@ class LockListInfoGroupEntity { int? pages; int? total; - LockListInfoGroupEntity({this.groupList, this.pageNo, this.pageSize, this.pages, this.total}); + LockListInfoGroupEntity( + {this.groupList, this.pageNo, this.pageSize, this.pages, this.total}); LockListInfoGroupEntity.fromJson(Map json) { if (json['groupList'] != null) { @@ -125,32 +128,32 @@ class LockListInfoItemEntity { LockListInfoItemEntity( {this.keyId, - this.lockId, - this.lockName, - this.lockAlias, - this.electricQuantity, - this.fwVersion, - this.hwVersion, - this.keyType, - this.passageMode, - this.userType, - this.startDate, - this.endDate, - this.weekDays, - this.remoteEnable, - this.faceAuthentication, - this.lastFaceValidateTime, - this.keyRight, - this.keyStatus, - this.isLockOwner, - this.bluetooth, - this.lockFeature, - this.lockSetting, - this.sendDate, - this.lockUserNo, - this.electricQuantityDate, - this.electricQuantityStandby, - this.senderUserId}); + this.lockId, + this.lockName, + this.lockAlias, + this.electricQuantity, + this.fwVersion, + this.hwVersion, + this.keyType, + this.passageMode, + this.userType, + this.startDate, + this.endDate, + this.weekDays, + this.remoteEnable, + this.faceAuthentication, + this.lastFaceValidateTime, + this.keyRight, + this.keyStatus, + this.isLockOwner, + this.bluetooth, + this.lockFeature, + this.lockSetting, + this.sendDate, + this.lockUserNo, + this.electricQuantityDate, + this.electricQuantityStandby, + this.senderUserId}); LockListInfoItemEntity.fromJson(Map json) { keyId = json['keyId']; @@ -236,10 +239,10 @@ class Bluetooth { Bluetooth( {this.bluetoothDeviceId, - this.bluetoothDeviceName, - this.publicKey, - this.privateKey, - this.signKey}); + this.bluetoothDeviceName, + this.publicKey, + this.privateKey, + this.signKey}); Bluetooth.fromJson(Map json) { bluetoothDeviceId = json['bluetoothDeviceId']; @@ -266,18 +269,20 @@ class LockFeature { int? fingerprint; int? fingerVein; int? palmVein; + int? isSupportIris; int? d3Face; int? bluetoothRemoteControl; int? videoIntercom; LockFeature( {this.password, - this.icCard, - this.fingerprint, - this.fingerVein, - this.palmVein, - this.d3Face, - this.bluetoothRemoteControl, - this.videoIntercom}); + this.icCard, + this.fingerprint, + this.fingerVein, + this.palmVein, + this.isSupportIris, + this.d3Face, + this.bluetoothRemoteControl, + this.videoIntercom}); LockFeature.fromJson(Map json) { password = json['password']; @@ -285,6 +290,7 @@ class LockFeature { fingerprint = json['fingerprint']; fingerVein = json['fingerVein']; palmVein = json['palmVein']; + isSupportIris = json['isSupportIris']; d3Face = json['d3Face']; bluetoothRemoteControl = json['bluetoothRemoteControl']; videoIntercom = json['videoIntercom']; @@ -297,6 +303,7 @@ class LockFeature { data['fingerprint'] = fingerprint; data['fingerVein'] = fingerVein; data['palmVein'] = palmVein; + data['isSupportIris'] = isSupportIris; data['d3Face'] = d3Face; data['bluetoothRemoteControl'] = bluetoothRemoteControl; data['videoIntercom'] = videoIntercom; diff --git a/star_lock/lib/talk/call/callTalk.dart b/star_lock/lib/talk/call/callTalk.dart index b71cdef2..b313d2c8 100644 --- a/star_lock/lib/talk/call/callTalk.dart +++ b/star_lock/lib/talk/call/callTalk.dart @@ -145,8 +145,14 @@ class CallTalk { } } - //停止接收音频数据 - void finishPcmSound() { + void stopPlaySound() { + FlutterPcmSound.pause(); + FlutterPcmSound.clear(); + FlutterPcmSound.stop(); + } + + //停止接收音视频数据 + void finishAVData() { // FlutterPcmSound.setup(sampleRate: 8000, channelCount: 1); FlutterPcmSound.pause(); FlutterPcmSound.clear(); diff --git a/star_lock/lib/talk/udp/udp_reciverData.dart b/star_lock/lib/talk/udp/udp_reciverData.dart index 631cb774..c8624dd1 100644 --- a/star_lock/lib/talk/udp/udp_reciverData.dart +++ b/star_lock/lib/talk/udp/udp_reciverData.dart @@ -203,7 +203,7 @@ class CommandUDPReciverManager { break; case 30: { - CallTalk().finishPcmSound(); + CallTalk().finishAVData(); // 监视结束 if ((data[7] & 0x3) == 1) { diff --git a/star_lock/lib/talk/udp/udp_talkClass.dart b/star_lock/lib/talk/udp/udp_talkClass.dart index dac2e50d..b253a883 100644 --- a/star_lock/lib/talk/udp/udp_talkClass.dart +++ b/star_lock/lib/talk/udp/udp_talkClass.dart @@ -188,7 +188,7 @@ class UDPTalkClass { isBeCall = false; // isEndCall = true; // LockMonitoringState().isClickHangUp.value = false; - CallTalk().finishPcmSound(); + CallTalk().finishAVData(); eventBus.fire(GetUDPStatusRefreshUI(UDPTalkClass().status)); Get.back();