监视部分提交
This commit is contained in:
parent
2c94fb9310
commit
8957756a0f
@ -26,7 +26,8 @@ class LockDetailPage extends StatefulWidget {
|
||||
State<LockDetailPage> createState() => _LockDetailPageState();
|
||||
}
|
||||
|
||||
class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStateMixin, RouteAware {
|
||||
class _LockDetailPageState extends State<LockDetailPage>
|
||||
with TickerProviderStateMixin, RouteAware {
|
||||
// with RouteAware
|
||||
final logic = Get.put(LockDetailLogic());
|
||||
final state = Get.find<LockDetailLogic>().state;
|
||||
@ -41,22 +42,27 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
|
||||
state.lockUserNo = state.keyInfos.value.lockUserNo!;
|
||||
state.senderUserId = state.keyInfos.value.senderUserId!;
|
||||
state.isAttendance.value = state.keyInfos.value.lockSetting!.attendance!;
|
||||
state.isOpenLockNeedOnline.value = state.keyInfos.value.lockSetting!.appUnlockOnline!;
|
||||
state.isOpenLockNeedOnline.value =
|
||||
state.keyInfos.value.lockSetting!.appUnlockOnline!;
|
||||
state.electricQuantity.value = state.keyInfos.value.electricQuantity!;
|
||||
|
||||
BlueManage().connectDeviceName = state.keyInfos.value.bluetooth!.bluetoothDeviceName!;
|
||||
BlueManage().connectDeviceName =
|
||||
state.keyInfos.value.bluetooth!.bluetoothDeviceName!;
|
||||
|
||||
List<int> publicKeyData = state.keyInfos.value.bluetooth!.publicKey!.cast<int>();
|
||||
List<int> publicKeyData =
|
||||
state.keyInfos.value.bluetooth!.publicKey!.cast<int>();
|
||||
var saveStrList = changeIntListToStringList(publicKeyData);
|
||||
Storage.setStringList(saveBluePublicKey, saveStrList);
|
||||
|
||||
// 私钥
|
||||
List<int> privateKeyData = state.keyInfos.value.bluetooth!.privateKey!.cast<int>();
|
||||
List<int> privateKeyData =
|
||||
state.keyInfos.value.bluetooth!.privateKey!.cast<int>();
|
||||
var savePrivateKeyList = changeIntListToStringList(privateKeyData);
|
||||
Storage.setStringList(saveBluePrivateKey, savePrivateKeyList);
|
||||
|
||||
// signKey
|
||||
List<int> signKeyData = state.keyInfos.value.bluetooth!.signKey!.cast<int>();
|
||||
List<int> signKeyData =
|
||||
state.keyInfos.value.bluetooth!.signKey!.cast<int>();
|
||||
var saveSignKeyList = changeIntListToStringList(signKeyData);
|
||||
Storage.setStringList(saveBlueSignKey, saveSignKeyList);
|
||||
|
||||
@ -74,10 +80,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
|
||||
height: 1.sh - ScreenUtil().statusBarHeight * 2,
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
children: [
|
||||
topWidget(),
|
||||
Expanded(child: Obx(() => bottomWidget()))
|
||||
],
|
||||
children: [topWidget(), Expanded(child: Obx(() => bottomWidget()))],
|
||||
),
|
||||
);
|
||||
}
|
||||
@ -93,20 +96,27 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
|
||||
SizedBox(
|
||||
width: 1.sw - 120.w * 2,
|
||||
child: Center(
|
||||
child:
|
||||
Text(widget.lockListInfoItemEntity.lockAlias!, style: TextStyle(fontSize: 22.sp, fontWeight: FontWeight.w400),
|
||||
child: Text(
|
||||
widget.lockListInfoItemEntity.lockAlias!,
|
||||
style:
|
||||
TextStyle(fontSize: 22.sp, fontWeight: FontWeight.w400),
|
||||
))),
|
||||
Positioned(
|
||||
child: Obx(() => Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Text("${state.electricQuantity.value}%", style: TextStyle(fontSize: 18.sp, color: AppColors.darkGrayTextColor)),
|
||||
SizedBox(width: 2.w),
|
||||
Image.asset(showElectricIcon(state.electricQuantity.value), width: 30.w, height: 24.w),
|
||||
SizedBox(width: 30.w),
|
||||
],
|
||||
))
|
||||
)
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Text("${state.electricQuantity.value}%",
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp,
|
||||
color: AppColors.darkGrayTextColor)),
|
||||
SizedBox(width: 2.w),
|
||||
Image.asset(
|
||||
showElectricIcon(state.electricQuantity.value),
|
||||
width: 30.w,
|
||||
height: 24.w),
|
||||
SizedBox(width: 30.w),
|
||||
],
|
||||
)))
|
||||
],
|
||||
),
|
||||
SizedBox(height: 30.h),
|
||||
@ -118,7 +128,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
|
||||
children: [
|
||||
Center(
|
||||
child: GestureDetector(
|
||||
child: Obx(() => Stack(
|
||||
child: Obx(() => Stack(
|
||||
children: [
|
||||
Image.asset(
|
||||
// state.connectState.value == 0 ? 'images/main/icon_main_openLockBtn_grey.png' : 'images/main/icon_main_openLockBtn_center.png',
|
||||
@ -136,14 +146,14 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
|
||||
)),
|
||||
],
|
||||
)),
|
||||
onTap: () {
|
||||
// Get.log("点击开锁");
|
||||
logic.startOpenLock();
|
||||
},
|
||||
onLongPressStart: (details) {
|
||||
Get.log("长按开锁");
|
||||
// logic.startConnect();
|
||||
},
|
||||
onTap: () {
|
||||
// Get.log("点击开锁");
|
||||
logic.startOpenLock();
|
||||
},
|
||||
onLongPressStart: (details) {
|
||||
Get.log("长按开锁");
|
||||
// logic.startConnect();
|
||||
},
|
||||
)),
|
||||
],
|
||||
),
|
||||
@ -196,7 +206,9 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
|
||||
Text(
|
||||
state.keyInfos.value.isLockOwner == 1
|
||||
? TranslationLoader.lanKeys!.superAdmin!.tr
|
||||
: (state.keyInfos.value.keyRight == 1 ? TranslationLoader.lanKeys!.authorizedAdmin!.tr: TranslationLoader.lanKeys!.normalUser!.tr),
|
||||
: (state.keyInfos.value.keyRight == 1
|
||||
? TranslationLoader.lanKeys!.authorizedAdmin!.tr
|
||||
: TranslationLoader.lanKeys!.normalUser!.tr),
|
||||
style: TextStyle(
|
||||
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
|
||||
),
|
||||
@ -272,11 +284,12 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
|
||||
}
|
||||
|
||||
// 根据权限显示不同的底部按钮
|
||||
List<Widget> getBottomWidget(){
|
||||
if(state.keyInfos.value.isLockOwner == 1 || state.keyInfos.value.keyRight == 1){
|
||||
List<Widget> getBottomWidget() {
|
||||
if (state.keyInfos.value.isLockOwner == 1 ||
|
||||
state.keyInfos.value.keyRight == 1) {
|
||||
// 超级管理员、授权管理员
|
||||
return getAllWidget();
|
||||
}else{
|
||||
} else {
|
||||
return getNormalWidget();
|
||||
}
|
||||
}
|
||||
@ -287,12 +300,14 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
|
||||
// 操作记录
|
||||
bottomItem('images/main/icon_main_operatingRecord.png',
|
||||
TranslationLoader.lanKeys!.operatingRecord!.tr, () {
|
||||
Get.toNamed(Routers.lockOperatingRecordPage,
|
||||
arguments: {"keyInfo": widget.lockListInfoItemEntity});
|
||||
}),
|
||||
Get.toNamed(Routers.lockOperatingRecordPage,
|
||||
arguments: {"keyInfo": widget.lockListInfoItemEntity});
|
||||
}),
|
||||
|
||||
// 设置
|
||||
bottomItem('images/main/icon_main_set.png', TranslationLoader.lanKeys!.set!.tr, () {
|
||||
bottomItem(
|
||||
'images/main/icon_main_set.png', TranslationLoader.lanKeys!.set!.tr,
|
||||
() {
|
||||
// BlueManage().stopScan();
|
||||
Get.toNamed(Routers.lockSetPage,
|
||||
arguments: {"lockId": widget.lockListInfoItemEntity.lockId});
|
||||
@ -358,7 +373,8 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
|
||||
//可视对讲门锁新增->人脸
|
||||
if (state.keyInfos.value.lockFeature!.d3Face == 1) {
|
||||
showWidgetArr.add(
|
||||
bottomItem('images/main/icon_face.png', TranslationLoader.lanKeys!.humanFace!.tr, () {
|
||||
bottomItem('images/main/icon_face.png',
|
||||
TranslationLoader.lanKeys!.humanFace!.tr, () {
|
||||
Get.toNamed(Routers.faceList, arguments: {
|
||||
"lockId": widget.lockListInfoItemEntity.lockId,
|
||||
}); // Toast.show(msg: "功能暂未开放");
|
||||
@ -377,7 +393,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
|
||||
bottomItem('images/main/icon_catEyes.png',
|
||||
TranslationLoader.lanKeys!.monitoring!.tr, () {
|
||||
Get.toNamed(Routers.realTimePicturePage, arguments: {
|
||||
"lockId": widget.lockListInfoItemEntity.lockId,
|
||||
"lockName": widget.lockListInfoItemEntity.lockName,
|
||||
"isMonitoring": true
|
||||
});
|
||||
}),
|
||||
@ -398,16 +414,20 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
|
||||
arguments: {"keyInfo": widget.lockListInfoItemEntity});
|
||||
}),
|
||||
// 视频日志
|
||||
bottomItem('images/main/icon_lockDetail_videoLog.png', TranslationLoader.lanKeys!.videoLog!.tr, () {
|
||||
bottomItem('images/main/icon_lockDetail_videoLog.png',
|
||||
TranslationLoader.lanKeys!.videoLog!.tr, () {
|
||||
//视频日志
|
||||
Get.toNamed(Routers.videoLogPage);
|
||||
}),
|
||||
// 消息提醒
|
||||
bottomItem('images/main/icon_lockDetail_messageReminding.png', TranslationLoader.lanKeys!.messageReminding!.tr, () {
|
||||
bottomItem('images/main/icon_lockDetail_messageReminding.png',
|
||||
TranslationLoader.lanKeys!.messageReminding!.tr, () {
|
||||
Get.toNamed(Routers.msgNotificationPage);
|
||||
}),
|
||||
// 设置
|
||||
bottomItem('images/main/icon_main_set.png', TranslationLoader.lanKeys!.set!.tr, () {
|
||||
bottomItem(
|
||||
'images/main/icon_main_set.png', TranslationLoader.lanKeys!.set!.tr,
|
||||
() {
|
||||
// BlueManage().stopScan();
|
||||
Get.toNamed(Routers.lockSetPage,
|
||||
arguments: {"lockId": widget.lockListInfoItemEntity.lockId});
|
||||
@ -466,16 +486,16 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
|
||||
// logic.connectBlueAndAnimationController();
|
||||
}
|
||||
|
||||
String showElectricIcon (int electricnumber){
|
||||
if(electricnumber >= 100){
|
||||
String showElectricIcon(int electricnumber) {
|
||||
if (electricnumber >= 100) {
|
||||
return 'images/main/icon_lockElectricLevel_5.png';
|
||||
}else if((electricnumber > 50) && (electricnumber < 100)){
|
||||
} else if ((electricnumber > 50) && (electricnumber < 100)) {
|
||||
return 'images/main/icon_lockElectricLevel_4.png';
|
||||
}else if((electricnumber > 25) && (electricnumber <= 50)){
|
||||
} else if ((electricnumber > 25) && (electricnumber <= 50)) {
|
||||
return 'images/main/icon_lockElectricLevel_3.png';
|
||||
}else if((electricnumber > 5) && (electricnumber <= 25)){
|
||||
} else if ((electricnumber > 5) && (electricnumber <= 25)) {
|
||||
return 'images/main/icon_lockElectricLevel_2.png';
|
||||
}else if(electricnumber <= 5){
|
||||
} else if (electricnumber <= 5) {
|
||||
return 'images/main/icon_lockElectricLevel_1.png';
|
||||
}
|
||||
return 'images/main/icon_lockElectricLevel_5.png';
|
||||
@ -612,6 +632,4 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
|
||||
state.animationController.reset();
|
||||
state.animationController.forward();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ class RealTimePictureLogic extends BaseGetXController {
|
||||
command: 150,
|
||||
commandTypeIsCalling: 1,
|
||||
subCommand: 30,
|
||||
lockID: state.getLockID.value,
|
||||
lockID: state.getLockName.value,
|
||||
lockIP: UDPManage().host,
|
||||
userMobile: await state.userMobile,
|
||||
userMobileIP: await state.userMobileIP,
|
||||
@ -79,7 +79,7 @@ class RealTimePictureLogic extends BaseGetXController {
|
||||
command: 152,
|
||||
commandTypeIsCalling: 1,
|
||||
subCommand: 20,
|
||||
lockID: state.getLockID.value,
|
||||
lockID: state.getLockName.value,
|
||||
lockIP: UDPManage().host,
|
||||
userMobile: await state.userMobile,
|
||||
userMobileIP: await state.userMobileIP,
|
||||
@ -92,11 +92,12 @@ class RealTimePictureLogic extends BaseGetXController {
|
||||
command: 152,
|
||||
commandTypeIsCalling: 1,
|
||||
subCommand: 1,
|
||||
lockID: state.getLockID.value,
|
||||
lockID: state.getLockName.value,
|
||||
lockIP: UDPManage().host,
|
||||
userMobile: await state.userMobile,
|
||||
userMobileIP: await state.userMobileIP,
|
||||
endData: []);
|
||||
// print('得到lockName------${state.getLockName.value}');
|
||||
}
|
||||
|
||||
/// 接听
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -40,12 +42,24 @@ class _RealTimePicturePageState extends State<RealTimePicturePage>
|
||||
}
|
||||
});
|
||||
|
||||
// 延迟10秒后自动暂停动画
|
||||
Future.delayed(const Duration(seconds: 10), () {
|
||||
state.animationController.stop();
|
||||
});
|
||||
initiateUdpMonitorAction();
|
||||
}
|
||||
|
||||
logic.udpMonitorAction();
|
||||
//发起监视命令,每隔一秒钟发一次,三十秒无应答则失败
|
||||
void initiateUdpMonitorAction() {
|
||||
// 每隔一秒调用一次 udpMonitorAction 方法
|
||||
state.realTimePicTimer =
|
||||
Timer.periodic(const Duration(seconds: 1), (timer) {
|
||||
state.elapsedSeconds++;
|
||||
logic.udpMonitorAction();
|
||||
|
||||
// 检查条件,如果达到30秒且未得到应答,则认为失败
|
||||
if (state.elapsedSeconds >= 30) {
|
||||
state.realTimePicTimer.cancel(); // 取消定时器
|
||||
|
||||
_handleFailure();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
@ -70,12 +84,14 @@ class _RealTimePicturePageState extends State<RealTimePicturePage>
|
||||
height: 1.sh,
|
||||
fit: BoxFit.cover,
|
||||
)),
|
||||
Positioned(
|
||||
bottom: 300.h,
|
||||
child: Text(
|
||||
'正在创建安全连接...',
|
||||
style: TextStyle(color: Colors.black, fontSize: 26.sp),
|
||||
)),
|
||||
Obx(() => state.listData.value.isEmpty
|
||||
? Positioned(
|
||||
bottom: 300.h,
|
||||
child: Text(
|
||||
'正在创建安全连接...',
|
||||
style: TextStyle(color: Colors.black, fontSize: 26.sp),
|
||||
))
|
||||
: Container()),
|
||||
Positioned(
|
||||
bottom: 10.w,
|
||||
child: Container(
|
||||
@ -95,7 +111,9 @@ class _RealTimePicturePageState extends State<RealTimePicturePage>
|
||||
],
|
||||
),
|
||||
)),
|
||||
buildRotationTransition()
|
||||
Obx(() => state.listData.value.isEmpty
|
||||
? buildRotationTransition()
|
||||
: Container())
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -193,10 +211,9 @@ class _RealTimePicturePageState extends State<RealTimePicturePage>
|
||||
})),
|
||||
bottomBtnItemWidget(
|
||||
"images/main/icon_lockDetail_hangUp.png", "挂断", Colors.red, () async {
|
||||
logic.stopProcessing();
|
||||
CallTalk().stopPcmSound();
|
||||
// 挂断
|
||||
logic.udpHangUpAction();
|
||||
Get.back();
|
||||
}),
|
||||
bottomBtnItemWidget("images/main/icon_lockDetail_monitoringUnlock.png",
|
||||
"开锁", AppColors.mainColor, () {
|
||||
@ -314,11 +331,18 @@ class _RealTimePicturePageState extends State<RealTimePicturePage>
|
||||
),
|
||||
onTap: () {
|
||||
state.animationController.forward();
|
||||
initiateUdpMonitorAction();
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _handleFailure() {
|
||||
// 在这里处理失败的逻辑
|
||||
print('Failed to get response within 30 seconds.');
|
||||
state.animationController.stop();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
state.animationController.dispose();
|
||||
|
||||
@ -29,7 +29,7 @@ class RealTimePictureState {
|
||||
Timer(const Duration(seconds: 1), () {}); // 定时器超过60秒关闭当前界面
|
||||
var oneMinuteTime = 0.obs; // 定时器秒数
|
||||
|
||||
var getLockID = ''.obs; //lockID
|
||||
var getLockName = ''.obs; //lockName
|
||||
|
||||
// 定时器如果发送了接听的命令 而没收到回复就每秒重复发送10次
|
||||
late Timer answerTimer;
|
||||
@ -37,7 +37,11 @@ class RealTimePictureState {
|
||||
late Timer openDoorTimer;
|
||||
late AnimationController animationController;
|
||||
|
||||
late Timer realTimePicTimer =
|
||||
Timer(const Duration(seconds: 1), () {}); //监视命令定时器
|
||||
var elapsedSeconds = 0.obs;
|
||||
|
||||
RealTimePictureState() {
|
||||
getLockID.value = Get.arguments["lockId"].toString();
|
||||
getLockName.value = Get.arguments["lockName"].toString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
abstract class Api {
|
||||
static String baseAddress = "https://pre.lock.star-lock.cn:8093"; //预发布环境
|
||||
// static String baseAddress = "http://192.168.56.101:8099"; //联调环境
|
||||
// static String baseAddress = "https://pre.lock.star-lock.cn:8093"; //预发布环境
|
||||
static String baseAddress = "http://192.168.56.101:8099"; //联调环境
|
||||
// static String baseAddress = "http://192.168.1.15:8022"; //谢总本地
|
||||
|
||||
final String baseUrl = "$baseAddress/api";
|
||||
@ -27,7 +27,8 @@ abstract class Api {
|
||||
'/room/uploadElectricQuantity'; //锁电量更新
|
||||
|
||||
final String lockRecordUploadURL = '/lockRecords/fromLock'; //操作上传
|
||||
final String getLockRecordLastUploadDataTimeURL = '/lockRecords/getLastRecordTime'; //查询锁记录最后时间
|
||||
final String getLockRecordLastUploadDataTimeURL =
|
||||
'/lockRecords/getLastRecordTime'; //查询锁记录最后时间
|
||||
|
||||
final String getLockNetTokenURL = '/lock/getLockNetToken'; //获取手机联网token
|
||||
final String updateLockUserNoURL = '/key/updateLockUserNo'; //更新锁用户NO
|
||||
@ -60,12 +61,14 @@ abstract class Api {
|
||||
final String lockGroupAddLockURL = '/keyGroup/addLockGroup'; //锁分组里面添加锁
|
||||
final String lockGroupDeletLockURL = '/keyGroup/deleteLockGroup'; //锁分组里面删除锁
|
||||
|
||||
final String listLockByGroupURL = '/authorizedAdmin/listLockByGroup'; //获取分组下的锁列表
|
||||
final String listLockByGroupURL =
|
||||
'/authorizedAdmin/listLockByGroup'; //获取分组下的锁列表
|
||||
final String setRoomStatusURL = '/lock/updateLockStatus'; //标记房态
|
||||
// final String keyGroupListURL = '/keyGroup/list'; //分组列表
|
||||
// final String lockListByGroupURL = '/room/listByGroup'; //分组下的锁
|
||||
final String getWifiServiceIpURL = '/wifiLock/getWifiServiceIp'; // 获取Wifi锁服务器
|
||||
final String updateLockSettingUrl = '/lockSetting/updateLockSetting'; // 锁设置里面所有的设置
|
||||
final String updateLockSettingUrl =
|
||||
'/lockSetting/updateLockSetting'; // 锁设置里面所有的设置
|
||||
|
||||
final String roomQueryDateUrl = '/room/queryDate'; // 获取网关时间
|
||||
final String lockDiagnoseUrl = '/room/uploadLockInfo'; // 锁诊断
|
||||
@ -76,12 +79,18 @@ abstract class Api {
|
||||
final String setCheckInCreateCompanyURL =
|
||||
'/attendanceCompany/add'; // 设置考勤时创建公司
|
||||
|
||||
final String getAttendanceRecordListByDateURL = '/attendanceRecord/listByDate'; // 获取考勤列表-早到榜日榜
|
||||
final String getAttendanceRecordListByMonthURL = '/attendanceRecord/earlyListByMonth'; // 获取考勤列表-早到榜月榜
|
||||
final String getAttendanceRecordListLateTimesByDateURL = '/attendanceRecord/lateListByDate'; // 获取考勤列表-迟到榜日榜
|
||||
final String getAttendanceRecordListLateTimesByMonthURL = '/attendanceRecord/lateEarlyListByMonth'; // 获取考勤列表-迟到榜月榜
|
||||
final String getAttendanceRecordHardworkingListURL = '/attendanceRecord/listForHardworking'; // 获取考勤列表-
|
||||
final String getAttendanceRecordDtailURL = '/attendanceRecord/listByMonth'; // 获取考勤详情
|
||||
final String getAttendanceRecordListByDateURL =
|
||||
'/attendanceRecord/listByDate'; // 获取考勤列表-早到榜日榜
|
||||
final String getAttendanceRecordListByMonthURL =
|
||||
'/attendanceRecord/earlyListByMonth'; // 获取考勤列表-早到榜月榜
|
||||
final String getAttendanceRecordListLateTimesByDateURL =
|
||||
'/attendanceRecord/lateListByDate'; // 获取考勤列表-迟到榜日榜
|
||||
final String getAttendanceRecordListLateTimesByMonthURL =
|
||||
'/attendanceRecord/lateEarlyListByMonth'; // 获取考勤列表-迟到榜月榜
|
||||
final String getAttendanceRecordHardworkingListURL =
|
||||
'/attendanceRecord/listForHardworking'; // 获取考勤列表-
|
||||
final String getAttendanceRecordDtailURL =
|
||||
'/attendanceRecord/listByMonth'; // 获取考勤详情
|
||||
final String getStaffListURL = '/staff/list'; // 获取员工列表
|
||||
final String addStaffURL = '/staff/add'; // 添加员工
|
||||
final String editStaffURL = '/staff/update'; // 编辑员工
|
||||
@ -96,20 +105,23 @@ abstract class Api {
|
||||
final String addFingerprintURL = '/fingerprint/add'; // 添加指纹
|
||||
final String editFingerprintURL = '/fingerprint/changePeriod'; // 编辑指纹
|
||||
final String deleteFingerprintURL = '/fingerprint/delete'; // 删除指纹
|
||||
final String updateFingerprintUserNoURL = '/fingerprint/updateFingerprintUserNo'; // 更新指纹用户序号
|
||||
final String updateFingerprintUserNoURL =
|
||||
'/fingerprint/updateFingerprintUserNo'; // 更新指纹用户序号
|
||||
|
||||
final String getICCardListURL = '/identityCard/list'; // IC卡列表
|
||||
final String addICCardURL = '/identityCard/add'; // 添加IC卡
|
||||
final String editICCardURL = '/identityCard/update'; // 编辑IC卡
|
||||
final String deleteICCardURL = '/identityCard/delete'; // 删除IC卡
|
||||
final String updateICCardUserNoURL = '/identityCard/updateCardUserNo'; // 更新ic卡用户序号
|
||||
final String updateICCardUserNoURL =
|
||||
'/identityCard/updateCardUserNo'; // 更新ic卡用户序号
|
||||
|
||||
final String transferLockListURL = '/room/listForTransfer'; // 转移锁锁列表
|
||||
final String transferLockConfirmURL = '/room/transferLockConfirm'; // 转移智能锁确认
|
||||
final String transferLockURL = '/room/transfer'; // 转移智能锁
|
||||
|
||||
final String gatewaykListURL = '/plug/list'; // 转网关列表
|
||||
final String transferGatewayConfirmURL = '/plug/transferPlugConfirm'; // 转移网关确认
|
||||
final String transferGatewayConfirmURL =
|
||||
'/plug/transferPlugConfirm'; // 转移网关确认
|
||||
final String transferGatewayURL = '/plug/transfer'; // 转移网关
|
||||
|
||||
final String getKeyDetailURL = '/key/get'; //获取单把钥匙详情信息
|
||||
|
||||
@ -10,8 +10,6 @@ import '../call/callTalk.dart';
|
||||
import 'udp_talkClass.dart';
|
||||
|
||||
class CommandUDPReciverManager {
|
||||
|
||||
|
||||
static void appDataReceive(List<int> data) async {
|
||||
///解析数据
|
||||
if (data.isEmpty) {
|
||||
@ -33,7 +31,6 @@ class CommandUDPReciverManager {
|
||||
if (data[6] == 4) {
|
||||
if (data[7] == 2) {
|
||||
// print("心跳包反馈 在线状态");
|
||||
|
||||
} else if (data[7] == 3) {
|
||||
[Toast.show(msg: "您已在其他设备登录")];
|
||||
}
|
||||
@ -52,7 +49,7 @@ class CommandUDPReciverManager {
|
||||
//被叫
|
||||
// lockId
|
||||
var lockId = data.sublist(9, 29);
|
||||
var lockIdStr = utf8String(lockId);
|
||||
var lockIdStr = utf8String(lockId);
|
||||
UDPManage().lockId = lockIdStr;
|
||||
UDPTalkClass().status = 0;
|
||||
UDPTalkClass().beCallW(data: data);
|
||||
@ -115,10 +112,10 @@ class CommandUDPReciverManager {
|
||||
}
|
||||
UDPTalkClass().status = 0;
|
||||
UDPTalkClass().isBeCall = false;
|
||||
Get.back();
|
||||
UDPTalkClass().stopLocalAudio();
|
||||
CallTalk().stopPcmSound();
|
||||
eventBus.fire(GetUDPStatusRefreshUI(UDPTalkClass().status));
|
||||
Get.back();
|
||||
}
|
||||
break;
|
||||
case 140:
|
||||
@ -164,7 +161,9 @@ class CommandUDPReciverManager {
|
||||
case 8:
|
||||
{
|
||||
//音视频数据
|
||||
//print("音视频数据");
|
||||
// print("音视频数据");
|
||||
CallTalk cllTalk = CallTalk();
|
||||
cllTalk.getAVData(data1, data1.length);
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user