修改卡指纹人脸电子钥匙循环当天结束时间改为晚上12点
This commit is contained in:
parent
76347a27ee
commit
19b2352ea9
@ -49,7 +49,7 @@ class SenderCustomPasswordsCommand extends SenderProtocol {
|
||||
@override
|
||||
String toString() {
|
||||
return 'SenderCustomPasswordsCommand{keyID: $keyID, userID: $userID, '
|
||||
'pwdNo: $pwdNo, pwd: $pwd, useCountLimit: $useCountLimit, '
|
||||
'pwdNo: $pwdNo, pwd: $pwd, useCountLimit: $useCountLimit, operate: $operate, isAdmin: $isAdmin,'
|
||||
'token: $token, '
|
||||
'startTime: ${DateTool().dateIntToYMDHNString(startTime)}, '
|
||||
'endTime: ${DateTool().dateIntToYMDHNString(endTime)}, '
|
||||
|
||||
@ -1,16 +1,12 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_cleanUpUsers.dart';
|
||||
import 'package:star_lock/blue/sender_manage.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/main/lockMian/entity/lockListInfo_entity.dart';
|
||||
import 'package:star_lock/network/api_provider.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
import 'package:star_lock/tools/eventBusEventManage.dart';
|
||||
|
||||
import '../app_settings/app_settings.dart';
|
||||
import '../main/lockDetail/lockDetail/lockNetToken_entity.dart';
|
||||
import '../network/api_repository.dart';
|
||||
import '../tools/commonDataManage.dart';
|
||||
@ -43,12 +39,12 @@ class SenderBeforeDataManage {
|
||||
|
||||
// 监听设备返回的数据
|
||||
StreamSubscription<Reply>? _replySubscription;
|
||||
|
||||
bool isBeforeAddUser = true;
|
||||
// 启动订阅
|
||||
void _initReplySubscription() {
|
||||
_replySubscription ??= EventBusManager().eventBus!.on<Reply>().listen((reply) async {
|
||||
// 添加用户
|
||||
if (reply is AddUserReply) {
|
||||
if (reply is AddUserReply && isBeforeAddUser == false) {
|
||||
_replyAddUserKey(reply);
|
||||
}
|
||||
|
||||
@ -160,21 +156,26 @@ class SenderBeforeDataManage {
|
||||
}
|
||||
|
||||
LockListInfoItemEntity currentKeyInfo = CommonDataManage().currentKeyInfo;
|
||||
DateTime startTime =
|
||||
DateTime.fromMillisecondsSinceEpoch(currentKeyInfo.startDate! ~/ 1000);
|
||||
DateTime endTime =
|
||||
DateTime.fromMillisecondsSinceEpoch(currentKeyInfo.endDate! ~/ 1000);
|
||||
bool isRound = currentKeyInfo.keyType == 2;
|
||||
DateTime startTime = DateTime.fromMillisecondsSinceEpoch(currentKeyInfo.startDate! ~/ 1000);
|
||||
DateTime endTime = DateTime.fromMillisecondsSinceEpoch(currentKeyInfo.endDate! ~/ 1000);
|
||||
bool isRound = currentKeyInfo.keyType == XSConstantMacro.keyTypeLoop;
|
||||
|
||||
var startDateTime = currentKeyInfo.startDate! ~/ 1000;
|
||||
var endDateTime = currentKeyInfo.endDate! ~/ 1000;
|
||||
if (isRound) {
|
||||
// 循环钥匙
|
||||
startDateTime = DateTool().dateToTimestamp(DateTool().dateToYMDString(currentKeyInfo.startDate!.toString()), 1) ~/ 1000;
|
||||
endDateTime = (DateTool().dateToTimestamp(DateTool().dateToYMDString(currentKeyInfo.endDate!.toString()), 1) + CommonDataManage().dayLatestTime) ~/ 1000;
|
||||
}
|
||||
var addUserData = AddUserCommand(
|
||||
lockID: BlueManage().connectDeviceName,
|
||||
authUserID: currentKeyInfo.senderUserId!.toString(),
|
||||
keyID: currentKeyInfo.keyId.toString(),
|
||||
userID: await Storage.getUid(),
|
||||
openMode: 1,
|
||||
keyType: currentKeyInfo.keyType,
|
||||
startDate: currentKeyInfo.startDate! ~/ 1000,
|
||||
expireDate: currentKeyInfo.endDate! ~/ 1000,
|
||||
keyType: 0,
|
||||
startDate: startDateTime,
|
||||
expireDate: endDateTime,
|
||||
useCountLimit: 0xFFFF,
|
||||
isRound: isRound ? 1 : 0,
|
||||
weekRound: isRound
|
||||
|
||||
@ -55,6 +55,7 @@ class CommandSenderManager {
|
||||
return;
|
||||
}
|
||||
|
||||
SenderBeforeDataManage().isBeforeAddUser = isBeforeAddUser;
|
||||
List<int> value = command.packageData();
|
||||
if (isBeforeAddUser == true) {
|
||||
// 如果是添加用户之前调用协议 直接发送
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../../tools/commonDataManage.dart';
|
||||
|
||||
class AddICCardState{
|
||||
var ifConnectScuess = false.obs;
|
||||
var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||
@ -25,7 +27,7 @@ class AddICCardState{
|
||||
AddICCardState() {
|
||||
Map map = Get.arguments;
|
||||
lockId.value = map["lockId"];
|
||||
endDate.value = map["endDate"];
|
||||
endDate.value = "${int.parse(map["endDate"]) + CommonDataManage().dayLatestTime}";
|
||||
addType.value = map["addType"];
|
||||
cardName.value = map["cardName"];
|
||||
cardNumber.value = map["cardNumber"];
|
||||
|
||||
@ -6,6 +6,7 @@ import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
||||
import 'package:star_lock/tools/pickers/time_picker/model/pduration.dart';
|
||||
|
||||
import '../../../../app_settings/app_colors.dart';
|
||||
import '../../../../tools/commonDataManage.dart';
|
||||
import '../../../../tools/commonItem.dart';
|
||||
import '../../../../tools/dateTool.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
@ -49,13 +50,13 @@ class _OtherTypeKeyChangeValidityDatePageState
|
||||
state.starDateTimestamp.value =
|
||||
DateTool().dateToTimestamp(state.starDate.value, 1);
|
||||
state.endDateTimestamp.value =
|
||||
DateTool().dateToTimestamp(state.endDate.value, 1);
|
||||
DateTool().dateToTimestamp(state.endDate.value, 1) + CommonDataManage().dayLatestTime;
|
||||
state.starTimeTimestamp.value =
|
||||
DateTool().dateToTimestamp(state.starTime.value, 0);
|
||||
state.endTimeTimestamp.value =
|
||||
DateTool().dateToTimestamp(state.endTime.value, 0);
|
||||
|
||||
if (state.starDateTimestamp.value >=
|
||||
if (state.starDateTimestamp.value >
|
||||
state.endDateTimestamp.value) {
|
||||
logic.showToast("失效日期要大于生效日期".tr);
|
||||
return;
|
||||
@ -111,8 +112,7 @@ class _OtherTypeKeyChangeValidityDatePageState
|
||||
Pickers.showDatePicker(context,
|
||||
selectDate: selectDate,
|
||||
mode: DateMode.YMD, onConfirm: (p) {
|
||||
state.starDate.value =
|
||||
DateTool().getYMDHNDateString(p, 2);
|
||||
state.starDate.value = DateTool().getYMDHNDateString(p, 2);
|
||||
});
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../../tools/commonDataManage.dart';
|
||||
|
||||
class AddFaceState {
|
||||
var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||
var ifAddState = false.obs;// 是否是添加状态,如果是添加状态,返回上级界面发送取消添加指令
|
||||
@ -31,7 +33,7 @@ class AddFaceState {
|
||||
AddFaceState() {
|
||||
Map map = Get.arguments;
|
||||
lockId.value = map["lockId"];
|
||||
endDate.value = map["endDate"];
|
||||
endDate.value = "${int.parse(map["endDate"]) + CommonDataManage().dayLatestTime}";
|
||||
addType.value = map["addType"];
|
||||
faceName.value = map["faceName"];
|
||||
faceType.value = map["faceType"];
|
||||
|
||||
@ -270,7 +270,7 @@ class _AddFaceTypePageState extends State<AddFaceTypePage>
|
||||
isTipsImg: false,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: SizedBox(
|
||||
width: 60.w, height: 50.h, child: Obx(() => _isAdmin()))))),
|
||||
width: 60.w, height: 50.h, child: _isAdmin())))),
|
||||
SizedBox(height: 30.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.next!.tr,
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/tools/commonDataManage.dart';
|
||||
|
||||
class AddFingerprintState{
|
||||
var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||
@ -28,7 +29,7 @@ class AddFingerprintState{
|
||||
AddFingerprintState() {
|
||||
Map map = Get.arguments;
|
||||
lockId.value = map["lockId"];
|
||||
endDate.value = map["endDate"];
|
||||
endDate.value = "${int.parse(map["endDate"]) + CommonDataManage().dayLatestTime}";
|
||||
addType.value = map["addType"];
|
||||
fingerprintName.value = map["fingerprintName"];
|
||||
fingerprintType.value = map["fingerprintType"];
|
||||
|
||||
@ -111,7 +111,7 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage>
|
||||
state.endDate.value = data["endDate"];
|
||||
state.startDate.value = data["starTime"];
|
||||
state.endTime.value = data["endTime"];
|
||||
state.weekDay.value = data["weekDay"];
|
||||
state.weekDay.value = data["validityValue"];
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -137,7 +137,7 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage>
|
||||
state.endDate.value = data["endDate"];
|
||||
state.startDate.value = data["starTime"];
|
||||
state.endTime.value = data["endTime"];
|
||||
state.weekDay.value = data["weekDay"];
|
||||
state.weekDay.value = data["validityValue"];
|
||||
});
|
||||
}
|
||||
})))),
|
||||
@ -153,8 +153,7 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage>
|
||||
Routers.otherTypeKeyChangeValidityDatePage,
|
||||
arguments: {
|
||||
"pushType": 1,
|
||||
"fingerprintItemData":
|
||||
state.fingerprintItemData.value,
|
||||
"fingerprintItemData": state.fingerprintItemData.value,
|
||||
});
|
||||
if (data != null) {
|
||||
setState(() {
|
||||
|
||||
@ -24,7 +24,7 @@ class PasswordKeyDetailLogic extends BaseGetXController {
|
||||
void _initReplySubscription() {
|
||||
_replySubscription = EventBusManager().eventBus!.on<Reply>().listen((reply) async {
|
||||
// 设置自定义密码
|
||||
if ((reply is SenderCustomPasswordsReply) && (state.ifCurrentScreen.value == true)) {
|
||||
if (reply is SenderCustomPasswordsReply) {
|
||||
int status = reply.data[2];
|
||||
switch (status) {
|
||||
case 0x00:
|
||||
@ -54,7 +54,7 @@ class PasswordKeyDetailLogic extends BaseGetXController {
|
||||
keyID:state.itemData.value.keyboardPwdId!.toString(),
|
||||
userID:await Storage.getUid(),
|
||||
pwdNo: state.itemData.value.pwdUserNo!,
|
||||
pwd: state.isDeletPasswordKey.value == true ? "0" : state.inputPwdController.text,
|
||||
pwd: state.inputPwdController.text,
|
||||
useCountLimit: 0xffff,
|
||||
operate: state.isDeletPasswordKey.value == true ? 2 : 1,
|
||||
isAdmin: state.isAdministrator.value == true ? 1 : 0,
|
||||
@ -156,7 +156,7 @@ class PasswordKeyDetailLogic extends BaseGetXController {
|
||||
keyID:state.itemData.value.keyboardPwdId!.toString(),
|
||||
userID:await Storage.getUid(),
|
||||
pwdNo: state.itemData.value.pwdUserNo!,
|
||||
pwd: state.itemData.value.isCustom == 1 ? state.inputPwdController.text :state.isDeletPasswordKey.value == true ? "0" : state.inputPwdController.text,
|
||||
pwd: state.inputPwdController.text,
|
||||
useCountLimit: 0xffff,
|
||||
operate: state.itemData.value.isCustom == 1 ? state.isDeletPasswordKey.value == true ? 2 : 1 : 3,
|
||||
isAdmin: state.isAdministrator.value == true ? 1 : 0,
|
||||
|
||||
@ -571,10 +571,13 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
child: TextField(
|
||||
//输入框一行
|
||||
maxLines: 1,
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
inputFormatters: editController == state.pwdController ? <TextInputFormatter>[
|
||||
FilteringTextInputFormatter.deny('\n'),
|
||||
LengthLimitingTextInputFormatter(
|
||||
editController == state.nameController ? 50 : 9),
|
||||
LengthLimitingTextInputFormatter(9),
|
||||
FilteringTextInputFormatter.allow(RegExp(r'[0-9]')),
|
||||
]:<TextInputFormatter>[
|
||||
FilteringTextInputFormatter.deny('\n'),
|
||||
LengthLimitingTextInputFormatter(50),
|
||||
],
|
||||
keyboardType: editController == state.nameController
|
||||
? TextInputType.text
|
||||
|
||||
@ -32,6 +32,8 @@ class CommonDataManage {
|
||||
// get getCurrentLockUserNo => _currentLockUserNo;
|
||||
|
||||
LockSetInfoData currentLockSetInfoData = LockSetInfoData();
|
||||
|
||||
int dayLatestTime = (86400-1)*1000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -77,8 +77,7 @@ class _SeletKeyCyclicDatePageState extends State<SeletKeyCyclicDatePage> {
|
||||
Pickers.showDatePicker(context,
|
||||
selectDate: selectDate,
|
||||
mode: DateMode.YMD, onConfirm: (p) {
|
||||
state.starDate.value =
|
||||
DateTool().getYMDHNDateString(p, 2);
|
||||
state.starDate.value = DateTool().getYMDHNDateString(p, 2);
|
||||
});
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
|
||||
@ -40,8 +40,9 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
# 1.0.30+2024043001 打包鑫锁提审ios
|
||||
# 1.0.31+2024050301 打包鑫锁提审华为
|
||||
# 1.0.32+2024051001:打包给欧阳回归测试
|
||||
# 1.0.33+2024051401:打包给欧阳回归测试
|
||||
|
||||
version: 1.0.32+2024051001
|
||||
version: 1.0.33+2024051401
|
||||
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user