Merge branch 'optimized_startup_wei' into develop
This commit is contained in:
commit
e80d27ff17
@ -50,7 +50,7 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
|||||||
ShowTipView().showTFViewAlertDialog(
|
ShowTipView().showTFViewAlertDialog(
|
||||||
state.changeNameController,
|
state.changeNameController,
|
||||||
'请输入姓名'.tr,
|
'请输入姓名'.tr,
|
||||||
'', () {
|
'请输入姓名'.tr, () {
|
||||||
if (state.changeNameController.text.isEmpty) {
|
if (state.changeNameController.text.isEmpty) {
|
||||||
logic.showToast('请输入姓名'.tr);
|
logic.showToast('请输入姓名'.tr);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -25,7 +25,6 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 获取解析后的数据
|
// 获取解析后的数据
|
||||||
late StreamSubscription<Reply> _replySubscription;
|
late StreamSubscription<Reply> _replySubscription;
|
||||||
|
|
||||||
void _initReplySubscription() {
|
void _initReplySubscription() {
|
||||||
_replySubscription =
|
_replySubscription =
|
||||||
EventBusManager().eventBus!.on<Reply>().listen((Reply reply) {
|
EventBusManager().eventBus!.on<Reply>().listen((Reply reply) {
|
||||||
@ -77,8 +76,10 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
(0xff & indexList[5]) << 8 |
|
(0xff & indexList[5]) << 8 |
|
||||||
(0xFF & indexList[6]);
|
(0xFF & indexList[6]);
|
||||||
final operateDate = time * 1000;
|
final operateDate = time * 1000;
|
||||||
|
final serverTime = state.currentDate;
|
||||||
if (DateTime.fromMillisecondsSinceEpoch(operateDate).isAfter(
|
if (DateTime.fromMillisecondsSinceEpoch(operateDate).isAfter(
|
||||||
DateTime.fromMillisecondsSinceEpoch(state.currentDate))) {
|
DateTime.fromMillisecondsSinceEpoch(serverTime*1000))) {
|
||||||
|
// AppLog.log('operateDate:$operateDate state.currentDate:${state.currentDate}');
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
indexMap['date'] = '$operateDate';
|
indexMap['date'] = '$operateDate';
|
||||||
@ -213,6 +214,7 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 操作记录上传
|
// 操作记录上传
|
||||||
Future<void> lockRecordUploadData(List list) async {
|
Future<void> lockRecordUploadData(List list) async {
|
||||||
|
AppLog.log('上传数据:$list');
|
||||||
// 无数据时不上传
|
// 无数据时不上传
|
||||||
if(list.isEmpty){
|
if(list.isEmpty){
|
||||||
return;
|
return;
|
||||||
@ -251,7 +253,7 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
// _initReplySubscription();
|
// _initReplySubscription();
|
||||||
|
|
||||||
mockNetworkDataRequest(isRefresh: true);
|
// mockNetworkDataRequest(isRefresh: true);
|
||||||
_getDoorLockLogListRefreshUIAction();
|
_getDoorLockLogListRefreshUIAction();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,7 +50,7 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
|||||||
ShowTipView().showTFViewAlertDialog(
|
ShowTipView().showTFViewAlertDialog(
|
||||||
state.changeNameController,
|
state.changeNameController,
|
||||||
'修改姓名'.tr,
|
'修改姓名'.tr,
|
||||||
'', () {
|
'修改姓名'.tr, () {
|
||||||
if (state.changeNameController.text.isEmpty) {
|
if (state.changeNameController.text.isEmpty) {
|
||||||
logic.showToast('请输入姓名'.tr);
|
logic.showToast('请输入姓名'.tr);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -50,7 +50,7 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage>
|
|||||||
ShowTipView().showTFViewAlertDialog(
|
ShowTipView().showTFViewAlertDialog(
|
||||||
state.changeNameController,
|
state.changeNameController,
|
||||||
'修改姓名'.tr,
|
'修改姓名'.tr,
|
||||||
'', () {
|
'修改姓名'.tr, () {
|
||||||
if (state.changeNameController.text.isEmpty) {
|
if (state.changeNameController.text.isEmpty) {
|
||||||
logic.showToast('请输入姓名'.tr);
|
logic.showToast('请输入姓名'.tr);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -489,6 +489,9 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 操作记录上传
|
// 操作记录上传
|
||||||
Future<void> lockRecordUploadData(List list) async {
|
Future<void> lockRecordUploadData(List list) async {
|
||||||
|
if(list.isEmpty){
|
||||||
|
return;
|
||||||
|
}
|
||||||
final KeyOperationRecordEntity entity = await ApiRepository.to
|
final KeyOperationRecordEntity entity = await ApiRepository.to
|
||||||
.lockRecordUploadData(
|
.lockRecordUploadData(
|
||||||
lockId: state.keyInfos.value.lockId.toString(), records: list);
|
lockId: state.keyInfos.value.lockId.toString(), records: list);
|
||||||
|
|||||||
@ -74,8 +74,9 @@ class LockOperatingRecordLogic extends BaseGetXController {
|
|||||||
(0xff & indexList[5]) << 8 |
|
(0xff & indexList[5]) << 8 |
|
||||||
(0xFF & indexList[6]);
|
(0xFF & indexList[6]);
|
||||||
final operateDate = time * 1000;
|
final operateDate = time * 1000;
|
||||||
|
final serverTime = state.currentDate;
|
||||||
if (DateTime.fromMillisecondsSinceEpoch(operateDate).isAfter(
|
if (DateTime.fromMillisecondsSinceEpoch(operateDate).isAfter(
|
||||||
DateTime.fromMillisecondsSinceEpoch(state.currentDate))) {
|
DateTime.fromMillisecondsSinceEpoch(serverTime*1000))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
indexMap['date'] = '$operateDate';
|
indexMap['date'] = '$operateDate';
|
||||||
@ -192,6 +193,9 @@ class LockOperatingRecordLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 操作记录上传
|
// 操作记录上传
|
||||||
Future<void> lockRecordUploadData(List list) async {
|
Future<void> lockRecordUploadData(List list) async {
|
||||||
|
if(list.isEmpty){
|
||||||
|
return;
|
||||||
|
}
|
||||||
final KeyOperationRecordEntity entity = await ApiRepository.to
|
final KeyOperationRecordEntity entity = await ApiRepository.to
|
||||||
.lockRecordUploadData(
|
.lockRecordUploadData(
|
||||||
lockId: CommonDataManage().currentKeyInfo.lockId.toString(),
|
lockId: CommonDataManage().currentKeyInfo.lockId.toString(),
|
||||||
|
|||||||
@ -46,7 +46,10 @@ class _LockSelectGroupingPageState extends State<LockSelectGroupingPage> {
|
|||||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||||
onClick: () {
|
onClick: () {
|
||||||
// showCupertinoAlertDialog(context);
|
// showCupertinoAlertDialog(context);
|
||||||
ShowTipView().showTFViewAlertDialog(state.changeNameController, TranslationLoader.lanKeys!.createNewGroup!.tr, '请输入分组名称'.tr, (){
|
ShowTipView().showTFViewAlertDialog(
|
||||||
|
state.changeNameController,
|
||||||
|
TranslationLoader.lanKeys!.createNewGroup!.tr,
|
||||||
|
'请输入分组名称'.tr, (){
|
||||||
logic.addLockGroupRequest();
|
logic.addLockGroupRequest();
|
||||||
Get.back();
|
Get.back();
|
||||||
}, isShowSuffixIcon:true, inputFormatters: <TextInputFormatter>[
|
}, isShowSuffixIcon:true, inputFormatters: <TextInputFormatter>[
|
||||||
|
|||||||
@ -46,7 +46,7 @@ class _RemoteControlDetailPageState extends State<RemoteControlDetailPage> with
|
|||||||
isHaveDirection: false,
|
isHaveDirection: false,
|
||||||
isHaveLine: true)),
|
isHaveLine: true)),
|
||||||
Obx(() => lockDataListItem('姓名'.tr, state.typeName.value, () {
|
Obx(() => lockDataListItem('姓名'.tr, state.typeName.value, () {
|
||||||
ShowTipView().showTFViewAlertDialog(state.changeNameController, '修改姓名'.tr, '', () {
|
ShowTipView().showTFViewAlertDialog(state.changeNameController, '修改姓名'.tr, '修改姓名'.tr, () {
|
||||||
if (state.changeNameController.text.isEmpty) {
|
if (state.changeNameController.text.isEmpty) {
|
||||||
logic.showToast('请输入姓名'.tr);
|
logic.showToast('请输入姓名'.tr);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user