完善门锁日志相关逻辑
This commit is contained in:
parent
bfbe9e0e14
commit
1e8cbfb578
@ -459,7 +459,7 @@
|
|||||||
97C146E61CF9000F007C117D /* Project object */ = {
|
97C146E61CF9000F007C117D /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 1300;
|
LastUpgradeCheck = 1430;
|
||||||
ORGANIZATIONNAME = "";
|
ORGANIZATIONNAME = "";
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
97C146ED1CF9000F007C117D = {
|
97C146ED1CF9000F007C117D = {
|
||||||
@ -695,8 +695,11 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = D28DFC3BEA6D46B5F5B5E55F /* Pods-Runner.debug-dev.xcconfig */;
|
baseConfigurationReference = D28DFC3BEA6D46B5F5B5E55F /* Pods-Runner.debug-dev.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
DEVELOPMENT_TEAM = SF86QP26TZ;
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
DEVELOPMENT_TEAM = 7D53BZAN75;
|
||||||
PRODUCT_NAME = Runner;
|
PRODUCT_NAME = Runner;
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
@ -708,7 +711,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 6285D102821F3D2FB7B09E43 /* Pods-Runner.profile-dev.xcconfig */;
|
baseConfigurationReference = 6285D102821F3D2FB7B09E43 /* Pods-Runner.profile-dev.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
DEVELOPMENT_TEAM = SF86QP26TZ;
|
DEVELOPMENT_TEAM = 7D53BZAN75;
|
||||||
PRODUCT_NAME = Runner;
|
PRODUCT_NAME = Runner;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
@ -721,6 +724,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 295A8AFEEC4806105FAA13B5 /* Pods-Runner.release-dev.xcconfig */;
|
baseConfigurationReference = 295A8AFEEC4806105FAA13B5 /* Pods-Runner.release-dev.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
DEVELOPMENT_TEAM = 7D53BZAN75;
|
||||||
PRODUCT_NAME = Runner;
|
PRODUCT_NAME = Runner;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
@ -733,6 +737,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 51086737647B9B5E510020C6 /* Pods-Runner.debug-pre.xcconfig */;
|
baseConfigurationReference = 51086737647B9B5E510020C6 /* Pods-Runner.debug-pre.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
DEVELOPMENT_TEAM = 7D53BZAN75;
|
||||||
PRODUCT_NAME = Runner;
|
PRODUCT_NAME = Runner;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
@ -745,7 +750,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = D001CDA3D7BF065A0C6E3B64 /* Pods-Runner.profile-pre.xcconfig */;
|
baseConfigurationReference = D001CDA3D7BF065A0C6E3B64 /* Pods-Runner.profile-pre.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
DEVELOPMENT_TEAM = SF86QP26TZ;
|
DEVELOPMENT_TEAM = 7D53BZAN75;
|
||||||
PRODUCT_NAME = Runner;
|
PRODUCT_NAME = Runner;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
@ -758,6 +763,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 68C41ACED6A779BAAA0A51A7 /* Pods-Runner.release-pre.xcconfig */;
|
baseConfigurationReference = 68C41ACED6A779BAAA0A51A7 /* Pods-Runner.release-pre.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
DEVELOPMENT_TEAM = 7D53BZAN75;
|
||||||
PRODUCT_NAME = Runner;
|
PRODUCT_NAME = Runner;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
@ -770,6 +776,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 4A63B2C308CB401731950EC8 /* Pods-Runner.debug-sky.xcconfig */;
|
baseConfigurationReference = 4A63B2C308CB401731950EC8 /* Pods-Runner.debug-sky.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
DEVELOPMENT_TEAM = 7D53BZAN75;
|
||||||
PRODUCT_NAME = Runner;
|
PRODUCT_NAME = Runner;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
@ -782,6 +789,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 8CD96970DEA44F6CC71DEECE /* Pods-Runner.profile-sky.xcconfig */;
|
baseConfigurationReference = 8CD96970DEA44F6CC71DEECE /* Pods-Runner.profile-sky.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
DEVELOPMENT_TEAM = 7D53BZAN75;
|
||||||
PRODUCT_NAME = Runner;
|
PRODUCT_NAME = Runner;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
@ -794,6 +802,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 16A83D21DFB231D8453DC681 /* Pods-Runner.release-sky.xcconfig */;
|
baseConfigurationReference = 16A83D21DFB231D8453DC681 /* Pods-Runner.release-sky.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
DEVELOPMENT_TEAM = 7D53BZAN75;
|
||||||
PRODUCT_NAME = Runner;
|
PRODUCT_NAME = Runner;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
@ -806,6 +815,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 22D858E988707FF26E068457 /* Pods-Runner.debug-xhj.xcconfig */;
|
baseConfigurationReference = 22D858E988707FF26E068457 /* Pods-Runner.debug-xhj.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
DEVELOPMENT_TEAM = 7D53BZAN75;
|
||||||
PRODUCT_NAME = Runner;
|
PRODUCT_NAME = Runner;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
@ -818,6 +828,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = D62237D2D011BDC27FB2BC28 /* Pods-Runner.profile-xhj.xcconfig */;
|
baseConfigurationReference = D62237D2D011BDC27FB2BC28 /* Pods-Runner.profile-xhj.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
DEVELOPMENT_TEAM = 7D53BZAN75;
|
||||||
PRODUCT_NAME = Runner;
|
PRODUCT_NAME = Runner;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
@ -830,6 +841,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = CDC2B8ED804B514A774F187D /* Pods-Runner.release-xhj.xcconfig */;
|
baseConfigurationReference = CDC2B8ED804B514A774F187D /* Pods-Runner.release-xhj.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
DEVELOPMENT_TEAM = 7D53BZAN75;
|
||||||
PRODUCT_NAME = Runner;
|
PRODUCT_NAME = Runner;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import 'package:flutter_easyloading/flutter_easyloading.dart';
|
|||||||
import 'package:flutter_reactive_ble/flutter_reactive_ble.dart';
|
import 'package:flutter_reactive_ble/flutter_reactive_ble.dart';
|
||||||
import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_state.dart';
|
import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_state.dart';
|
||||||
import 'package:star_lock/main/lockDetail/lockOperatingRecord/lockOperatingRecordGetLastRecordTime_entity.dart';
|
import 'package:star_lock/main/lockDetail/lockOperatingRecord/lockOperatingRecordGetLastRecordTime_entity.dart';
|
||||||
|
import 'package:star_lock/tools/eventBusEventManage.dart';
|
||||||
|
|
||||||
import '../../../blue/blue_manage.dart';
|
import '../../../blue/blue_manage.dart';
|
||||||
import '../../../blue/io_protocol/io_referEventRecordTime.dart';
|
import '../../../blue/io_protocol/io_referEventRecordTime.dart';
|
||||||
@ -100,7 +101,7 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
uploadList.add(indexMap);
|
uploadList.add(indexMap);
|
||||||
}
|
}
|
||||||
lockRecordUploadData(uploadList);
|
lockRecordUploadData(uploadList);
|
||||||
// print("reply.data:${reply.data} getList:$getList}");
|
print("reply.data:${reply.data} getList:$getList}");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0x06:
|
case 0x06:
|
||||||
@ -198,6 +199,28 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
} else {}
|
} else {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 刷新门锁日志列表
|
||||||
|
StreamSubscription? _getDoorLockLogListRefreshUIEvent;
|
||||||
|
void _getDoorLockLogListRefreshUIAction() {
|
||||||
|
_getDoorLockLogListRefreshUIEvent =
|
||||||
|
eventBus.on<DoorLockLogListRefreshUI>().listen((event) {
|
||||||
|
// 设置startDate为当天的0点
|
||||||
|
state.startDate.value = DateTime(event.getDoorLockLogTime.year,
|
||||||
|
event.getDoorLockLogTime.month, event.getDoorLockLogTime.day)
|
||||||
|
.millisecondsSinceEpoch;
|
||||||
|
// 设置endDate为下一天的0点,然后减去1毫秒
|
||||||
|
state.endDate.value = (DateTime(
|
||||||
|
event.getDoorLockLogTime.year,
|
||||||
|
event.getDoorLockLogTime.month,
|
||||||
|
event.getDoorLockLogTime.day + 1)
|
||||||
|
.subtract(const Duration(milliseconds: 1)))
|
||||||
|
.millisecondsSinceEpoch;
|
||||||
|
|
||||||
|
pageNo = 1;
|
||||||
|
mockNetworkDataRequest();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 查询锁记录最后时间
|
// 查询锁记录最后时间
|
||||||
void getLockRecordLastUploadDataTime() async {
|
void getLockRecordLastUploadDataTime() async {
|
||||||
LockOperatingRecordGetLastRecordTimeEntity entity = await ApiRepository.to
|
LockOperatingRecordGetLastRecordTimeEntity entity = await ApiRepository.to
|
||||||
@ -236,12 +259,11 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
// 获取是否是演示模式 演示模式不获取接口
|
// 获取是否是演示模式 演示模式不获取接口
|
||||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
// _initReplySubscription();
|
_initReplySubscription();
|
||||||
|
|
||||||
// mockNetworkDataRequest();
|
mockNetworkDataRequest();
|
||||||
|
_getDoorLockLogListRefreshUIAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
mockNetworkDataRequest();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -257,6 +279,15 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
// senderReferEventRecordTime();
|
// senderReferEventRecordTime();
|
||||||
// senderReferEventRecordNumber();
|
// senderReferEventRecordNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DateTime now = DateTime.now();
|
||||||
|
// 设置startDate为当天的0点
|
||||||
|
state.startDate.value =
|
||||||
|
DateTime(now.year, now.month, now.day).millisecondsSinceEpoch;
|
||||||
|
// 设置endDate为下一天的0点,然后减去1毫秒
|
||||||
|
state.endDate.value = (DateTime(now.year, now.month, now.day + 1)
|
||||||
|
.subtract(const Duration(milliseconds: 1)))
|
||||||
|
.millisecondsSinceEpoch;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -264,10 +295,11 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
// TODO: implement onClose
|
// TODO: implement onClose
|
||||||
super.onClose();
|
super.onClose();
|
||||||
|
|
||||||
// 获取是否是演示模式 演示模式不获取接口
|
//获取是否是演示模式 演示模式不获取接口
|
||||||
// var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
// if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
// _replySubscription.cancel();
|
_replySubscription.cancel();
|
||||||
// }
|
_getDoorLockLogListRefreshUIEvent?.cancel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,17 +66,15 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
|
|||||||
endIndent: 30.w,
|
endIndent: 30.w,
|
||||||
),
|
),
|
||||||
eventDropDownWidget(),
|
eventDropDownWidget(),
|
||||||
Expanded(child: timeLineView())
|
// Expanded(child: timeLineView())
|
||||||
// Expanded(
|
Expanded(
|
||||||
// // 添加 Expanded 来让 ListView 占据剩余的空间
|
child: ListView.builder(
|
||||||
// child: ListView.builder(
|
itemBuilder: (context, index) {
|
||||||
// itemBuilder: (context, index) {
|
return timeLineView();
|
||||||
// // 返回你想要在 ListView 中显示的小部件
|
},
|
||||||
// return timeLineView();
|
itemCount: state.lockOperatingRecordListData.value.length,
|
||||||
// },
|
),
|
||||||
// itemCount: 5, // 替换成你的列表项数量
|
),
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -135,6 +133,7 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
|
|||||||
valueChanged: (value) {
|
valueChanged: (value) {
|
||||||
print('dropdownValue选中了$value');
|
print('dropdownValue选中了$value');
|
||||||
state.dropdownValue.value = int.parse(value);
|
state.dropdownValue.value = int.parse(value);
|
||||||
|
logic.mockNetworkDataRequest();
|
||||||
})),
|
})),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@ -28,6 +28,9 @@ class WeekDays extends StatelessWidget {
|
|||||||
children: List.generate(weekNames.length, (index) {
|
children: List.generate(weekNames.length, (index) {
|
||||||
return DateBox(
|
return DateBox(
|
||||||
child: Text(weekNames[index]),
|
child: Text(weekNames[index]),
|
||||||
|
onPressed: () {
|
||||||
|
print('****Week day $index pressed');
|
||||||
|
},
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:intl/date_symbol_data_local.dart';
|
import 'package:intl/date_symbol_data_local.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:star_lock/tools/eventBusEventManage.dart';
|
||||||
|
|
||||||
import 'controller.dart';
|
import 'controller.dart';
|
||||||
import 'datetime_util.dart';
|
import 'datetime_util.dart';
|
||||||
@ -231,6 +232,8 @@ class _AdvancedCalendarState extends State<AdvancedCalendar>
|
|||||||
child: ValueListenableBuilder<DateTime>(
|
child: ValueListenableBuilder<DateTime>(
|
||||||
valueListenable: _controller,
|
valueListenable: _controller,
|
||||||
builder: (_, selectedDate, __) {
|
builder: (_, selectedDate, __) {
|
||||||
|
print('****selectedDate: $selectedDate');
|
||||||
|
eventBus.fire(DoorLockLogListRefreshUI(selectedDate));
|
||||||
return Stack(
|
return Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -94,3 +94,9 @@ class ReadMessageRefreshUI {
|
|||||||
class ElectronicKeyListRefreshUI {
|
class ElectronicKeyListRefreshUI {
|
||||||
ElectronicKeyListRefreshUI();
|
ElectronicKeyListRefreshUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 刷新门锁日志列表
|
||||||
|
class DoorLockLogListRefreshUI {
|
||||||
|
DateTime getDoorLockLogTime;
|
||||||
|
DoorLockLogListRefreshUI(this.getDoorLockLogTime);
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user