Merge branch 'master' of https://gitee.com/weishaoyang/star_lock
This commit is contained in:
commit
8f00a142ae
@ -4,16 +4,13 @@ class LockMainEntity {
|
|||||||
String? errorMsg;
|
String? errorMsg;
|
||||||
LockInfoEntity? data;
|
LockInfoEntity? data;
|
||||||
|
|
||||||
LockMainEntity(
|
LockMainEntity({this.errorCode, this.description, this.errorMsg, this.data});
|
||||||
{this.errorCode, this.description, this.errorMsg, this.data});
|
|
||||||
|
|
||||||
LockMainEntity.fromJson(Map<String, dynamic> json) {
|
LockMainEntity.fromJson(Map<String, dynamic> json) {
|
||||||
errorCode = json['errorCode'];
|
errorCode = json['errorCode'];
|
||||||
description = json['description'];
|
description = json['description'];
|
||||||
errorMsg = json['errorMsg'];
|
errorMsg = json['errorMsg'];
|
||||||
data = json['data'] != null
|
data = json['data'] != null ? LockInfoEntity.fromJson(json['data']) : null;
|
||||||
? LockInfoEntity.fromJson(json['data'])
|
|
||||||
: null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@ -30,39 +27,39 @@ class LockMainEntity {
|
|||||||
|
|
||||||
class LockInfoEntity {
|
class LockInfoEntity {
|
||||||
UserSettings? userSettings;
|
UserSettings? userSettings;
|
||||||
bool? hasXmeyeLock;
|
int? hasXmeyeLock;
|
||||||
bool? hasMoreService;
|
int? hasMoreService;
|
||||||
int? pages;
|
int? pages;
|
||||||
List<KeyGroups>? keyGroups;
|
List<KeyGroups>? keyGroups;
|
||||||
bool? isReply;
|
int? isReply;
|
||||||
int? paidUserStatus;
|
int? paidUserStatus;
|
||||||
bool? hasAdvert;
|
int? hasAdvert;
|
||||||
bool? hasAlexa;
|
int? hasAlexa;
|
||||||
bool? isUserSettingCompleted;
|
int? isUserSettingCompleted;
|
||||||
List<KeyInfos>? keyInfos;
|
List<KeyInfos>? keyInfos;
|
||||||
bool? hasPaidFeature;
|
int? hasPaidFeature;
|
||||||
bool? hasCameraLock;
|
int? hasCameraLock;
|
||||||
bool? hasGoogleHome;
|
int? hasGoogleHome;
|
||||||
int? pageNo;
|
int? pageNo;
|
||||||
int? lastUpdateDate;
|
int? lastUpdateDate;
|
||||||
|
|
||||||
LockInfoEntity(
|
LockInfoEntity(
|
||||||
{this.userSettings,
|
{this.userSettings,
|
||||||
this.hasXmeyeLock,
|
this.hasXmeyeLock,
|
||||||
this.hasMoreService,
|
this.hasMoreService,
|
||||||
this.pages,
|
this.pages,
|
||||||
this.keyGroups,
|
this.keyGroups,
|
||||||
this.isReply,
|
this.isReply,
|
||||||
this.paidUserStatus,
|
this.paidUserStatus,
|
||||||
this.hasAdvert,
|
this.hasAdvert,
|
||||||
this.hasAlexa,
|
this.hasAlexa,
|
||||||
this.isUserSettingCompleted,
|
this.isUserSettingCompleted,
|
||||||
this.keyInfos,
|
this.keyInfos,
|
||||||
this.hasPaidFeature,
|
this.hasPaidFeature,
|
||||||
this.hasCameraLock,
|
this.hasCameraLock,
|
||||||
this.hasGoogleHome,
|
this.hasGoogleHome,
|
||||||
this.pageNo,
|
this.pageNo,
|
||||||
this.lastUpdateDate});
|
this.lastUpdateDate});
|
||||||
|
|
||||||
LockInfoEntity.fromJson(Map<String, dynamic> json) {
|
LockInfoEntity.fromJson(Map<String, dynamic> json) {
|
||||||
userSettings = json['userSettings'] != null
|
userSettings = json['userSettings'] != null
|
||||||
@ -140,18 +137,18 @@ class UserSettings {
|
|||||||
|
|
||||||
UserSettings(
|
UserSettings(
|
||||||
{this.touchUnlockFlag,
|
{this.touchUnlockFlag,
|
||||||
this.modifyManagePwdFlag,
|
this.modifyManagePwdFlag,
|
||||||
this.gesturePassword,
|
this.gesturePassword,
|
||||||
this.resetFlag,
|
this.resetFlag,
|
||||||
this.delManagerFlag,
|
this.delManagerFlag,
|
||||||
this.hideExpiredAccessFlag,
|
this.hideExpiredAccessFlag,
|
||||||
this.sendKeyFlag,
|
this.sendKeyFlag,
|
||||||
this.viberateFlag,
|
this.viberateFlag,
|
||||||
this.lockScreen,
|
this.lockScreen,
|
||||||
this.authorizeFlag,
|
this.authorizeFlag,
|
||||||
this.sendPwdFlag,
|
this.sendPwdFlag,
|
||||||
this.alertToneFlag,
|
this.alertToneFlag,
|
||||||
this.status});
|
this.status});
|
||||||
|
|
||||||
UserSettings.fromJson(Map<String, dynamic> json) {
|
UserSettings.fromJson(Map<String, dynamic> json) {
|
||||||
touchUnlockFlag = json['touchUnlockFlag'];
|
touchUnlockFlag = json['touchUnlockFlag'];
|
||||||
@ -264,58 +261,58 @@ class KeyInfos {
|
|||||||
int? roomStatus;
|
int? roomStatus;
|
||||||
KeyInfos(
|
KeyInfos(
|
||||||
{this.lightingTime,
|
{this.lightingTime,
|
||||||
this.privacyLock,
|
this.privacyLock,
|
||||||
this.keyGroupId,
|
this.keyGroupId,
|
||||||
this.remarks,
|
this.remarks,
|
||||||
this.autoUnlock,
|
this.autoUnlock,
|
||||||
this.noKeyPwd,
|
this.noKeyPwd,
|
||||||
this.isAttendance,
|
this.isAttendance,
|
||||||
this.keyStatus,
|
this.keyStatus,
|
||||||
this.faceAuthentication,
|
this.faceAuthentication,
|
||||||
this.sensitivity,
|
this.sensitivity,
|
||||||
this.date,
|
this.date,
|
||||||
this.appUnlockMustOnline,
|
this.appUnlockMustOnline,
|
||||||
this.lockKey,
|
this.lockKey,
|
||||||
this.resetButton,
|
this.resetButton,
|
||||||
this.endDate,
|
this.endDate,
|
||||||
this.keyRight,
|
this.keyRight,
|
||||||
this.electricQuantity,
|
this.electricQuantity,
|
||||||
this.lockSound,
|
this.lockSound,
|
||||||
this.volume,
|
this.volume,
|
||||||
this.specialValue,
|
this.specialValue,
|
||||||
this.displayPasscode,
|
this.displayPasscode,
|
||||||
this.lockId,
|
this.lockId,
|
||||||
this.doubleVerification,
|
this.doubleVerification,
|
||||||
this.keyName,
|
this.keyName,
|
||||||
this.lockVersion,
|
this.lockVersion,
|
||||||
this.lockName,
|
this.lockName,
|
||||||
this.monitorFlag,
|
this.monitorFlag,
|
||||||
this.bondPassword,
|
this.bondPassword,
|
||||||
this.lockAlias,
|
this.lockAlias,
|
||||||
this.isFrozen,
|
this.isFrozen,
|
||||||
this.remoteEnable,
|
this.remoteEnable,
|
||||||
this.lockFlagPos,
|
this.lockFlagPos,
|
||||||
this.autoLockTime,
|
this.autoLockTime,
|
||||||
this.unlockDirection,
|
this.unlockDirection,
|
||||||
this.isCameraEnable,
|
this.isCameraEnable,
|
||||||
this.startDate,
|
this.startDate,
|
||||||
this.keyGroupName,
|
this.keyGroupName,
|
||||||
this.aesKeyStr,
|
this.aesKeyStr,
|
||||||
this.uid,
|
this.uid,
|
||||||
this.passageMode,
|
this.passageMode,
|
||||||
this.admin,
|
this.admin,
|
||||||
this.keyId,
|
this.keyId,
|
||||||
this.adminPwd,
|
this.adminPwd,
|
||||||
this.deletePwd,
|
this.deletePwd,
|
||||||
this.timezoneRawOffSet,
|
this.timezoneRawOffSet,
|
||||||
this.userType,
|
this.userType,
|
||||||
this.validPwdNum,
|
this.validPwdNum,
|
||||||
this.featureValue,
|
this.featureValue,
|
||||||
this.adminUid,
|
this.adminUid,
|
||||||
this.lockMac,
|
this.lockMac,
|
||||||
this.wirelessKeypadFeatureValue,
|
this.wirelessKeypadFeatureValue,
|
||||||
this.tamperAlert,
|
this.tamperAlert,
|
||||||
this.roomStatus,
|
this.roomStatus,
|
||||||
this.bluetooth});
|
this.bluetooth});
|
||||||
|
|
||||||
KeyInfos.fromJson(Map<String, dynamic> json) {
|
KeyInfos.fromJson(Map<String, dynamic> json) {
|
||||||
@ -454,12 +451,12 @@ class LockVersion {
|
|||||||
|
|
||||||
LockVersion(
|
LockVersion(
|
||||||
{this.scene,
|
{this.scene,
|
||||||
this.protocolVersion,
|
this.protocolVersion,
|
||||||
this.logoUrl,
|
this.logoUrl,
|
||||||
this.orgId,
|
this.orgId,
|
||||||
this.showAdminKbpwdFlag,
|
this.showAdminKbpwdFlag,
|
||||||
this.protocolType,
|
this.protocolType,
|
||||||
this.groupId});
|
this.groupId});
|
||||||
|
|
||||||
LockVersion.fromJson(Map<String, dynamic> json) {
|
LockVersion.fromJson(Map<String, dynamic> json) {
|
||||||
scene = json['scene'];
|
scene = json['scene'];
|
||||||
@ -493,9 +490,9 @@ class Bluetooth {
|
|||||||
|
|
||||||
Bluetooth(
|
Bluetooth(
|
||||||
{this.bluetoothDeviceId,
|
{this.bluetoothDeviceId,
|
||||||
this.bluetoothDeviceName,
|
this.bluetoothDeviceName,
|
||||||
this.publicKey,
|
this.publicKey,
|
||||||
this.privateKey,
|
this.privateKey,
|
||||||
this.signKey});
|
this.signKey});
|
||||||
|
|
||||||
Bluetooth.fromJson(Map<String, dynamic> json) {
|
Bluetooth.fromJson(Map<String, dynamic> json) {
|
||||||
|
|||||||
@ -22,6 +22,8 @@ class LockGroupListPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _LockGroupListPageState extends State<LockGroupListPage> {
|
class _LockGroupListPageState extends State<LockGroupListPage> {
|
||||||
TextEditingController _changeNameController = TextEditingController();
|
TextEditingController _changeNameController = TextEditingController();
|
||||||
|
List<GroupListItem> itemDataList = [];
|
||||||
|
int lockNum = 0;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@ -60,35 +62,43 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildMainUI() {
|
Widget _buildMainUI() {
|
||||||
|
for (int i = 0; i < itemDataList.length; i++) {
|
||||||
|
GroupListItem itemData = itemDataList[i];
|
||||||
|
lockNum += itemData.lockList!.length;
|
||||||
|
}
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
itemCount: 2,
|
itemCount: itemDataList.length + 1,
|
||||||
itemBuilder: (c, index) {
|
itemBuilder: (c, index) {
|
||||||
if (index == 1) {
|
if (index == itemDataList.length) {
|
||||||
return Center(
|
return Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10.h,
|
height: 20.h,
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 40.h,
|
height: 40.h,
|
||||||
child: const Text(
|
child: Text(
|
||||||
'锁数量:1',
|
'锁数量:${lockNum.toString()}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: AppColors.darkGrayTextColor, fontSize: 14),
|
color: AppColors.darkGrayTextColor, fontSize: 20.sp),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
GroupListItem itemData = itemDataList[index];
|
||||||
|
|
||||||
return CommonItem(
|
return CommonItem(
|
||||||
leftTitel: "未分组(1)",
|
leftTitel:
|
||||||
|
'${itemData.keyGroupName}(${itemData.lockList?.length})',
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
allHeight: 70.h,
|
allHeight: 70.h,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
action: () {
|
action: () {
|
||||||
Navigator.pushNamed(context, Routers.lockItemListPage);
|
Navigator.pushNamed(context, Routers.lockItemListPage,
|
||||||
|
arguments: {'lockList': itemData.lockList});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -98,16 +108,16 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
|
|||||||
Future<List<GroupListItem>> mockNetworkDataRequest() async {
|
Future<List<GroupListItem>> mockNetworkDataRequest() async {
|
||||||
MassSendLockGroupListEntity entity =
|
MassSendLockGroupListEntity entity =
|
||||||
await ApiRepository.to.lockGroupList('1');
|
await ApiRepository.to.lockGroupList('1');
|
||||||
|
List<GroupListItem> dataList = [];
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
if (entity.data != null) {
|
if (entity.data != null) {
|
||||||
return entity.data!.groupList!;
|
dataList = entity.data!.groupList!;
|
||||||
} else {
|
|
||||||
List<GroupListItem> dataList = [];
|
|
||||||
return dataList;
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return [];
|
|
||||||
}
|
}
|
||||||
|
setState(() {
|
||||||
|
itemDataList = dataList;
|
||||||
|
});
|
||||||
|
return dataList;
|
||||||
}
|
}
|
||||||
|
|
||||||
//创建锁分组请求
|
//创建锁分组请求
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
|
||||||
|
|
||||||
import '../../../../../app_settings/app_colors.dart';
|
import '../../../../../app_settings/app_colors.dart';
|
||||||
import '../../../../../tools/commonItem.dart';
|
|
||||||
import '../../../../../tools/titleAppBar.dart';
|
import '../../../../../tools/titleAppBar.dart';
|
||||||
import '../../../../../translations/trans_lib.dart';
|
import '../../../../../translations/trans_lib.dart';
|
||||||
|
|
||||||
@ -15,8 +15,14 @@ class LockItemListPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _LockItemListPageState extends State<LockItemListPage> {
|
class _LockItemListPageState extends State<LockItemListPage> {
|
||||||
|
List<LockListItem> lockList = [];
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
dynamic obj = ModalRoute.of(context)?.settings.arguments;
|
||||||
|
if (obj != null && (obj["lockList"] != null)) {
|
||||||
|
lockList = obj["lockList"];
|
||||||
|
}
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
@ -35,22 +41,25 @@ class _LockItemListPageState extends State<LockItemListPage> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor),
|
||||||
body: ListView.separated(
|
body: lockList.isNotEmpty
|
||||||
itemBuilder: (context, index) {
|
? ListView.separated(
|
||||||
return _listItemView();
|
itemBuilder: (context, index) {
|
||||||
},
|
LockListItem itemData = lockList[index];
|
||||||
itemCount: 2,
|
return _listItemView(itemData);
|
||||||
separatorBuilder: (BuildContext context, int index) {
|
},
|
||||||
return Divider(
|
itemCount: lockList.length,
|
||||||
height: 1.h,
|
separatorBuilder: (BuildContext context, int index) {
|
||||||
color: AppColors.greyLineColor,
|
return Divider(
|
||||||
);
|
height: 1.h,
|
||||||
},
|
color: AppColors.greyLineColor,
|
||||||
),
|
);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
: Container(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _listItemView() {
|
Widget _listItemView(LockListItem itemData) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
child: Container(
|
child: Container(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@ -72,7 +81,7 @@ class _LockItemListPageState extends State<LockItemListPage> {
|
|||||||
width: 10.w,
|
width: 10.w,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'Daisy',
|
itemData.lockAlias ?? '',
|
||||||
style: TextStyle(fontSize: 24.sp),
|
style: TextStyle(fontSize: 24.sp),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
@ -2,6 +2,9 @@ import 'package:flutter/cupertino.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/mine/mineSet/lockUserManage/expireLockList/expireLockListEntity.dart';
|
||||||
|
import 'package:star_lock/network/api_repository.dart';
|
||||||
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
|
|
||||||
import '../../appRouters.dart';
|
import '../../appRouters.dart';
|
||||||
import '../../app_settings/app_colors.dart';
|
import '../../app_settings/app_colors.dart';
|
||||||
@ -18,7 +21,16 @@ class MineSetPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _MineSetPageState extends State<MineSetPage> {
|
class _MineSetPageState extends State<MineSetPage> {
|
||||||
bool _isOn = false;
|
late bool _isPrompTone = false; //提示音
|
||||||
|
late bool _isTouchUnlock = false; //触摸开锁
|
||||||
|
late bool _isPushNotification = false; //消息推送
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
userSettingsInfoRequest();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -39,21 +51,21 @@ class _MineSetPageState extends State<MineSetPage> {
|
|||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: SizedBox(
|
rightWidget: SizedBox(
|
||||||
width: 60.w, height: 50.h, child: _switch())),
|
width: 60.w, height: 50.h, child: _switch(0))),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.touchUnlock!.tr,
|
leftTitel: TranslationLoader.lanKeys!.touchUnlock!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: SizedBox(
|
rightWidget: SizedBox(
|
||||||
width: 60.w, height: 50.h, child: _switch())),
|
width: 60.w, height: 50.h, child: _switch(1))),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel:
|
leftTitel:
|
||||||
TranslationLoader.lanKeys!.pushNotification!.tr,
|
TranslationLoader.lanKeys!.pushNotification!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: SizedBox(
|
rightWidget: SizedBox(
|
||||||
width: 60.w, height: 50.h, child: _switch())),
|
width: 60.w, height: 50.h, child: _switch(2))),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10.h,
|
height: 10.h,
|
||||||
),
|
),
|
||||||
@ -232,15 +244,45 @@ class _MineSetPageState extends State<MineSetPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
CupertinoSwitch _switch() {
|
Future<void> userSettingsInfoRequest() async {
|
||||||
|
ExpireLockListEntity entity = await ApiRepository.to.userSettingsInfo();
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//更新提示音
|
||||||
|
Future<void> updatePrompToneRequest() async {
|
||||||
|
ExpireLockListEntity entity = await ApiRepository.to
|
||||||
|
.setAlertMode('1', _isPrompTone == true ? '1' : '2');
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CupertinoSwitch _switch(int switchIndex) {
|
||||||
|
bool isOn = false;
|
||||||
|
if (switchIndex == 0) {
|
||||||
|
isOn = _isPrompTone;
|
||||||
|
} else if (switchIndex == 1) {
|
||||||
|
isOn = _isTouchUnlock;
|
||||||
|
} else if (switchIndex == 2) {
|
||||||
|
isOn = _isPushNotification;
|
||||||
|
}
|
||||||
return CupertinoSwitch(
|
return CupertinoSwitch(
|
||||||
activeColor: CupertinoColors.activeBlue,
|
activeColor: CupertinoColors.activeBlue,
|
||||||
trackColor: CupertinoColors.systemGrey5,
|
trackColor: CupertinoColors.systemGrey5,
|
||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: _isOn,
|
value: isOn,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_isOn = value;
|
if (switchIndex == 0) {
|
||||||
|
_isPrompTone = !_isPrompTone;
|
||||||
|
} else if (switchIndex == 1) {
|
||||||
|
_isTouchUnlock = !_isTouchUnlock;
|
||||||
|
} else if (switchIndex == 2) {
|
||||||
|
_isPushNotification = !_isPushNotification;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
159
star_lock/lib/mine/mineSet/userSettingInfoEntity.dart
Normal file
159
star_lock/lib/mine/mineSet/userSettingInfoEntity.dart
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
class UserSettingInfoEntity {
|
||||||
|
int? errorCode;
|
||||||
|
String? description;
|
||||||
|
String? errorMsg;
|
||||||
|
UserSettingInfoData? data;
|
||||||
|
|
||||||
|
UserSettingInfoEntity(
|
||||||
|
{this.errorCode, this.description, this.errorMsg, this.data});
|
||||||
|
|
||||||
|
UserSettingInfoEntity.fromJson(Map<String, dynamic> json) {
|
||||||
|
errorCode = json['errorCode'];
|
||||||
|
description = json['description'];
|
||||||
|
errorMsg = json['errorMsg'];
|
||||||
|
data = json['data'] != null
|
||||||
|
? UserSettingInfoData.fromJson(json['data'])
|
||||||
|
: null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
|
data['errorCode'] = errorCode;
|
||||||
|
data['description'] = description;
|
||||||
|
data['errorMsg'] = errorMsg;
|
||||||
|
if (this.data != null) {
|
||||||
|
data['data'] = this.data!.toJson();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class UserSettingInfoData {
|
||||||
|
UserSettings? userSettings;
|
||||||
|
Null? hasXmeyeLock;
|
||||||
|
Null? hasMoreService;
|
||||||
|
Null? isReply;
|
||||||
|
Null? paidUserStatus;
|
||||||
|
Null? hasAdvert;
|
||||||
|
Null? hasAlexa;
|
||||||
|
Null? isUserSettingCompleted;
|
||||||
|
Null? hasPaidFeature;
|
||||||
|
Null? hasCameraLock;
|
||||||
|
Null? hasGoogleHome;
|
||||||
|
Null? alertMode;
|
||||||
|
|
||||||
|
UserSettingInfoData(
|
||||||
|
{this.userSettings,
|
||||||
|
this.hasXmeyeLock,
|
||||||
|
this.hasMoreService,
|
||||||
|
this.isReply,
|
||||||
|
this.paidUserStatus,
|
||||||
|
this.hasAdvert,
|
||||||
|
this.hasAlexa,
|
||||||
|
this.isUserSettingCompleted,
|
||||||
|
this.hasPaidFeature,
|
||||||
|
this.hasCameraLock,
|
||||||
|
this.hasGoogleHome,
|
||||||
|
this.alertMode});
|
||||||
|
|
||||||
|
UserSettingInfoData.fromJson(Map<String, dynamic> json) {
|
||||||
|
userSettings = json['userSettings'] != null
|
||||||
|
? UserSettings.fromJson(json['userSettings'])
|
||||||
|
: null;
|
||||||
|
hasXmeyeLock = json['hasXmeyeLock'];
|
||||||
|
hasMoreService = json['hasMoreService'];
|
||||||
|
isReply = json['isReply'];
|
||||||
|
paidUserStatus = json['paidUserStatus'];
|
||||||
|
hasAdvert = json['hasAdvert'];
|
||||||
|
hasAlexa = json['hasAlexa'];
|
||||||
|
isUserSettingCompleted = json['isUserSettingCompleted'];
|
||||||
|
hasPaidFeature = json['hasPaidFeature'];
|
||||||
|
hasCameraLock = json['hasCameraLock'];
|
||||||
|
hasGoogleHome = json['hasGoogleHome'];
|
||||||
|
alertMode = json['alertMode'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
|
if (userSettings != null) {
|
||||||
|
data['userSettings'] = userSettings!.toJson();
|
||||||
|
}
|
||||||
|
data['hasXmeyeLock'] = hasXmeyeLock;
|
||||||
|
data['hasMoreService'] = hasMoreService;
|
||||||
|
data['isReply'] = isReply;
|
||||||
|
data['paidUserStatus'] = paidUserStatus;
|
||||||
|
data['hasAdvert'] = hasAdvert;
|
||||||
|
data['hasAlexa'] = hasAlexa;
|
||||||
|
data['isUserSettingCompleted'] = isUserSettingCompleted;
|
||||||
|
data['hasPaidFeature'] = hasPaidFeature;
|
||||||
|
data['hasCameraLock'] = hasCameraLock;
|
||||||
|
data['hasGoogleHome'] = hasGoogleHome;
|
||||||
|
data['alertMode'] = alertMode;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class UserSettings {
|
||||||
|
Null? touchUnlockFlag;
|
||||||
|
Null? modifyManagePwdFlag;
|
||||||
|
Null? gesturePassword;
|
||||||
|
Null? resetFlag;
|
||||||
|
Null? delManagerFlag;
|
||||||
|
Null? hideExpiredAccessFlag;
|
||||||
|
Null? sendKeyFlag;
|
||||||
|
Null? viberateFlag;
|
||||||
|
Null? lockScreen;
|
||||||
|
Null? authorizeFlag;
|
||||||
|
Null? sendPwdFlag;
|
||||||
|
Null? alertToneFlag;
|
||||||
|
Null? status;
|
||||||
|
|
||||||
|
UserSettings(
|
||||||
|
{this.touchUnlockFlag,
|
||||||
|
this.modifyManagePwdFlag,
|
||||||
|
this.gesturePassword,
|
||||||
|
this.resetFlag,
|
||||||
|
this.delManagerFlag,
|
||||||
|
this.hideExpiredAccessFlag,
|
||||||
|
this.sendKeyFlag,
|
||||||
|
this.viberateFlag,
|
||||||
|
this.lockScreen,
|
||||||
|
this.authorizeFlag,
|
||||||
|
this.sendPwdFlag,
|
||||||
|
this.alertToneFlag,
|
||||||
|
this.status});
|
||||||
|
|
||||||
|
UserSettings.fromJson(Map<String, dynamic> json) {
|
||||||
|
touchUnlockFlag = json['touchUnlockFlag'];
|
||||||
|
modifyManagePwdFlag = json['modifyManagePwdFlag'];
|
||||||
|
gesturePassword = json['gesturePassword'];
|
||||||
|
resetFlag = json['resetFlag'];
|
||||||
|
delManagerFlag = json['delManagerFlag'];
|
||||||
|
hideExpiredAccessFlag = json['hideExpiredAccessFlag'];
|
||||||
|
sendKeyFlag = json['sendKeyFlag'];
|
||||||
|
viberateFlag = json['viberateFlag'];
|
||||||
|
lockScreen = json['lockScreen'];
|
||||||
|
authorizeFlag = json['authorizeFlag'];
|
||||||
|
sendPwdFlag = json['sendPwdFlag'];
|
||||||
|
alertToneFlag = json['alertToneFlag'];
|
||||||
|
status = json['status'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
|
data['touchUnlockFlag'] = touchUnlockFlag;
|
||||||
|
data['modifyManagePwdFlag'] = modifyManagePwdFlag;
|
||||||
|
data['gesturePassword'] = gesturePassword;
|
||||||
|
data['resetFlag'] = resetFlag;
|
||||||
|
data['delManagerFlag'] = delManagerFlag;
|
||||||
|
data['hideExpiredAccessFlag'] = hideExpiredAccessFlag;
|
||||||
|
data['sendKeyFlag'] = sendKeyFlag;
|
||||||
|
data['viberateFlag'] = viberateFlag;
|
||||||
|
data['lockScreen'] = lockScreen;
|
||||||
|
data['authorizeFlag'] = authorizeFlag;
|
||||||
|
data['sendPwdFlag'] = sendPwdFlag;
|
||||||
|
data['alertToneFlag'] = alertToneFlag;
|
||||||
|
data['status'] = status;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -100,4 +100,6 @@ abstract class Api {
|
|||||||
final String updateAdministratorURL =
|
final String updateAdministratorURL =
|
||||||
'/authorizedAdmin/update'; //管理员姓名/有效期/远程开锁修改
|
'/authorizedAdmin/update'; //管理员姓名/有效期/远程开锁修改
|
||||||
final String expireLockListURL = '/keyUser/listExpireUser'; //即将到期的锁列表
|
final String expireLockListURL = '/keyUser/listExpireUser'; //即将到期的锁列表
|
||||||
|
final String setAlertModeURL = '/user/setAlertMode'; //提示音
|
||||||
|
final String userSettingsInfoURL = '/user/userSettingsInfo'; //个人设置信息
|
||||||
}
|
}
|
||||||
|
|||||||
@ -566,8 +566,7 @@ class ApiProvider extends BaseProvider {
|
|||||||
jsonEncode({
|
jsonEncode({
|
||||||
'lockId': lockId,
|
'lockId': lockId,
|
||||||
}),
|
}),
|
||||||
isUnShowLoading: true
|
isUnShowLoading: true);
|
||||||
);
|
|
||||||
|
|
||||||
// 设置考勤时创建公司
|
// 设置考勤时创建公司
|
||||||
Future<Response> setCheckInCreateCompanyData(
|
Future<Response> setCheckInCreateCompanyData(
|
||||||
@ -630,13 +629,13 @@ class ApiProvider extends BaseProvider {
|
|||||||
|
|
||||||
// 编辑员工 addHolidaysData
|
// 编辑员工 addHolidaysData
|
||||||
Future<Response> editStaffData(
|
Future<Response> editStaffData(
|
||||||
String attendanceType,
|
String attendanceType,
|
||||||
String attendanceWay,
|
String attendanceWay,
|
||||||
String staffId,
|
String staffId,
|
||||||
String have,
|
String have,
|
||||||
String staffName,
|
String staffName,
|
||||||
String countryCode,
|
String countryCode,
|
||||||
String usernameType) =>
|
String usernameType) =>
|
||||||
post(
|
post(
|
||||||
editStaffURL.toUrl,
|
editStaffURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -650,23 +649,20 @@ class ApiProvider extends BaseProvider {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// 添加员工选择钥匙
|
// 添加员工选择钥匙
|
||||||
Future<Response> addStaffSeletKeyData(
|
Future<Response> addStaffSeletKeyData(String companyId, String type) => post(
|
||||||
String companyId,
|
addStaffSeletKeyURL.toUrl,
|
||||||
String type) =>
|
jsonEncode({
|
||||||
post(
|
'companyId': companyId,
|
||||||
addStaffSeletKeyURL.toUrl,
|
'type': type,
|
||||||
jsonEncode({
|
}));
|
||||||
'companyId': companyId,
|
|
||||||
'type': type,
|
|
||||||
}));
|
|
||||||
|
|
||||||
// 添加假期
|
// 添加假期
|
||||||
Future<Response> addHolidaysData(
|
Future<Response> addHolidaysData(
|
||||||
String companyId,
|
String companyId,
|
||||||
String fillClassDate,
|
String fillClassDate,
|
||||||
String vacationEndDate,
|
String vacationEndDate,
|
||||||
String vacationName,
|
String vacationName,
|
||||||
String vacationStartDate) =>
|
String vacationStartDate) =>
|
||||||
post(
|
post(
|
||||||
addHolidaysURL.toUrl,
|
addHolidaysURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -678,9 +674,7 @@ class ApiProvider extends BaseProvider {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// 假期列表
|
// 假期列表
|
||||||
Future<Response> holidaysListData(
|
Future<Response> holidaysListData(String companyId, String vacationYear) =>
|
||||||
String companyId,
|
|
||||||
String vacationYear) =>
|
|
||||||
post(
|
post(
|
||||||
holidaysListURL.toUrl,
|
holidaysListURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -689,32 +683,28 @@ class ApiProvider extends BaseProvider {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// 删除假期
|
// 删除假期
|
||||||
Future<Response> deletHolidaysData(
|
Future<Response> deletHolidaysData(String vacationId) => post(
|
||||||
String vacationId) =>
|
holidaysDeleteURL.toUrl,
|
||||||
post(
|
jsonEncode({
|
||||||
holidaysDeleteURL.toUrl,
|
'vacationId': vacationId,
|
||||||
jsonEncode({
|
}));
|
||||||
'vacationId': vacationId,
|
|
||||||
}));
|
|
||||||
|
|
||||||
// 获取考勤设置信息
|
// 获取考勤设置信息
|
||||||
Future<Response> getCheckInSetInfoData(
|
Future<Response> getCheckInSetInfoData(String companyId) => post(
|
||||||
String companyId) =>
|
getCheckInSetInfoURL.toUrl,
|
||||||
post(
|
jsonEncode({
|
||||||
getCheckInSetInfoURL.toUrl,
|
'companyId': companyId,
|
||||||
jsonEncode({
|
}));
|
||||||
'companyId': companyId,
|
|
||||||
}));
|
|
||||||
|
|
||||||
// 修改考勤设置信息
|
// 修改考勤设置信息
|
||||||
Future<Response> editCheckInSetInfoData(
|
Future<Response> editCheckInSetInfoData(
|
||||||
String attendanceType,
|
String attendanceType,
|
||||||
String companyId,
|
String companyId,
|
||||||
String type,
|
String type,
|
||||||
String companyName,
|
String companyName,
|
||||||
String workEndTime,
|
String workEndTime,
|
||||||
String workStartTime,
|
String workStartTime,
|
||||||
List<int> workDay) =>
|
List<int> workDay) =>
|
||||||
post(
|
post(
|
||||||
editCheckInSetInfoURL.toUrl,
|
editCheckInSetInfoURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -728,7 +718,8 @@ class ApiProvider extends BaseProvider {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// 获取考勤列表 -- 早到榜日榜
|
// 获取考勤列表 -- 早到榜日榜
|
||||||
Future<Response> getCheckInListEarlyArrivalWithDateData(String companyId, String attendanceDate) =>
|
Future<Response> getCheckInListEarlyArrivalWithDateData(
|
||||||
|
String companyId, String attendanceDate) =>
|
||||||
post(
|
post(
|
||||||
getAttendanceRecordListByDateURL.toUrl,
|
getAttendanceRecordListByDateURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -737,7 +728,8 @@ class ApiProvider extends BaseProvider {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// 获取考勤列表 -- 早到榜月榜
|
// 获取考勤列表 -- 早到榜月榜
|
||||||
Future<Response> getCheckInListEarlyArrivalWithMonthData(String companyId, String attendanceDate) =>
|
Future<Response> getCheckInListEarlyArrivalWithMonthData(
|
||||||
|
String companyId, String attendanceDate) =>
|
||||||
post(
|
post(
|
||||||
getAttendanceRecordListByMonthURL.toUrl,
|
getAttendanceRecordListByMonthURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -746,7 +738,8 @@ class ApiProvider extends BaseProvider {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// 获取考勤列表 -- 迟到榜日榜
|
// 获取考勤列表 -- 迟到榜日榜
|
||||||
Future<Response> getCheckInListLateTimesWithDateData(String companyId, String attendanceDate) =>
|
Future<Response> getCheckInListLateTimesWithDateData(
|
||||||
|
String companyId, String attendanceDate) =>
|
||||||
post(
|
post(
|
||||||
getAttendanceRecordListLateTimesByDateURL.toUrl,
|
getAttendanceRecordListLateTimesByDateURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -755,7 +748,8 @@ class ApiProvider extends BaseProvider {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// 获取考勤列表 -- 迟到榜月榜
|
// 获取考勤列表 -- 迟到榜月榜
|
||||||
Future<Response> getCheckInListLateTimesWithMonthData(String companyId, String attendanceDate) =>
|
Future<Response> getCheckInListLateTimesWithMonthData(
|
||||||
|
String companyId, String attendanceDate) =>
|
||||||
post(
|
post(
|
||||||
getAttendanceRecordListLateTimesByMonthURL.toUrl,
|
getAttendanceRecordListLateTimesByMonthURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -764,7 +758,8 @@ class ApiProvider extends BaseProvider {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// 获取考勤列表 -- 勤奋榜
|
// 获取考勤列表 -- 勤奋榜
|
||||||
Future<Response> getCheckInListHardworkingData(String companyId, String attendanceDate, String type) =>
|
Future<Response> getCheckInListHardworkingData(
|
||||||
|
String companyId, String attendanceDate, String type) =>
|
||||||
post(
|
post(
|
||||||
getAttendanceRecordHardworkingListURL.toUrl,
|
getAttendanceRecordHardworkingListURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -774,7 +769,8 @@ class ApiProvider extends BaseProvider {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// 获取考勤详情
|
// 获取考勤详情
|
||||||
Future<Response> getCheckInDetailData(String companyId, String attendanceDate, String staffId) =>
|
Future<Response> getCheckInDetailData(
|
||||||
|
String companyId, String attendanceDate, String staffId) =>
|
||||||
post(
|
post(
|
||||||
getAttendanceRecordDtailURL.toUrl,
|
getAttendanceRecordDtailURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -784,7 +780,8 @@ class ApiProvider extends BaseProvider {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// 获取指纹列表
|
// 获取指纹列表
|
||||||
Future<Response> getFingerprintsListData(String lockId, String pageNo, String pageSize, String searchStr) =>
|
Future<Response> getFingerprintsListData(
|
||||||
|
String lockId, String pageNo, String pageSize, String searchStr) =>
|
||||||
post(
|
post(
|
||||||
getFingerprintListURL.toUrl,
|
getFingerprintListURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -796,15 +793,16 @@ class ApiProvider extends BaseProvider {
|
|||||||
|
|
||||||
// 添加指纹
|
// 添加指纹
|
||||||
Future<Response> addFingerprintsData(
|
Future<Response> addFingerprintsData(
|
||||||
String lockId,
|
String lockId,
|
||||||
String endDate,
|
String endDate,
|
||||||
String addType,
|
String addType,
|
||||||
String fingerprintName,
|
String fingerprintName,
|
||||||
String fingerprintNumber,
|
String fingerprintNumber,
|
||||||
String fingerprintType,
|
String fingerprintType,
|
||||||
String isCoerced,
|
String isCoerced,
|
||||||
String startDate,
|
String startDate,
|
||||||
List weekDay,) =>
|
List weekDay,
|
||||||
|
) =>
|
||||||
post(
|
post(
|
||||||
addFingerprintURL.toUrl,
|
addFingerprintURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -821,13 +819,13 @@ class ApiProvider extends BaseProvider {
|
|||||||
|
|
||||||
// 编辑指纹
|
// 编辑指纹
|
||||||
Future<Response> editFingerprintsData(
|
Future<Response> editFingerprintsData(
|
||||||
String fingerprintId,
|
String fingerprintId,
|
||||||
String lockId,
|
String lockId,
|
||||||
List weekDay,
|
List weekDay,
|
||||||
String startDate,
|
String startDate,
|
||||||
String endDate,
|
String endDate,
|
||||||
String isCoerced,
|
String isCoerced,
|
||||||
String fingerprintName) =>
|
String fingerprintName) =>
|
||||||
post(
|
post(
|
||||||
editFingerprintURL.toUrl,
|
editFingerprintURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -838,15 +836,11 @@ class ApiProvider extends BaseProvider {
|
|||||||
'endDate': endDate,
|
'endDate': endDate,
|
||||||
'isCoerced': isCoerced,
|
'isCoerced': isCoerced,
|
||||||
'fingerprintName': fingerprintName
|
'fingerprintName': fingerprintName
|
||||||
})
|
}));
|
||||||
);
|
|
||||||
|
|
||||||
// 删除指纹
|
// 删除指纹
|
||||||
Future<Response> deletFingerprintsData(
|
Future<Response> deletFingerprintsData(String fingerprintId, String lockId,
|
||||||
String fingerprintId,
|
String type, String deleteType) =>
|
||||||
String lockId,
|
|
||||||
String type,
|
|
||||||
String deleteType) =>
|
|
||||||
post(
|
post(
|
||||||
deleteFingerprintURL.toUrl,
|
deleteFingerprintURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -854,25 +848,22 @@ class ApiProvider extends BaseProvider {
|
|||||||
'lockId': lockId,
|
'lockId': lockId,
|
||||||
'type': type,
|
'type': type,
|
||||||
'deleteType': deleteType
|
'deleteType': deleteType
|
||||||
})
|
}));
|
||||||
);
|
|
||||||
|
|
||||||
// 更新指纹用户序号
|
// 更新指纹用户序号
|
||||||
Future<Response> updateFingerprintUserNoLoadData(
|
Future<Response> updateFingerprintUserNoLoadData(
|
||||||
String fingerprintId,
|
String fingerprintId, String lockId, String fingerprintUserNo) =>
|
||||||
String lockId,
|
|
||||||
String fingerprintUserNo) =>
|
|
||||||
post(
|
post(
|
||||||
updateFingerprintUserNoURL.toUrl,
|
updateFingerprintUserNoURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
'fingerprintId': fingerprintId,
|
'fingerprintId': fingerprintId,
|
||||||
'lockId': lockId,
|
'lockId': lockId,
|
||||||
'fingerprintUserNo': fingerprintUserNo
|
'fingerprintUserNo': fingerprintUserNo
|
||||||
})
|
}));
|
||||||
);
|
|
||||||
|
|
||||||
// 获取IC卡列表
|
// 获取IC卡列表
|
||||||
Future<Response> getICCardListData(String lockId, String pageNo, String pageSize, String searchStr) =>
|
Future<Response> getICCardListData(
|
||||||
|
String lockId, String pageNo, String pageSize, String searchStr) =>
|
||||||
post(
|
post(
|
||||||
getICCardListURL.toUrl,
|
getICCardListURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -884,15 +875,16 @@ class ApiProvider extends BaseProvider {
|
|||||||
|
|
||||||
// 添加卡
|
// 添加卡
|
||||||
Future<Response> addICCardData(
|
Future<Response> addICCardData(
|
||||||
String lockId,
|
String lockId,
|
||||||
String endDate,
|
String endDate,
|
||||||
String cardName,
|
String cardName,
|
||||||
String cardNumber,
|
String cardNumber,
|
||||||
String cardType,
|
String cardType,
|
||||||
String addType,
|
String addType,
|
||||||
String startDate,
|
String startDate,
|
||||||
String isCoerced,
|
String isCoerced,
|
||||||
List weekDay,) =>
|
List weekDay,
|
||||||
|
) =>
|
||||||
post(
|
post(
|
||||||
addICCardURL.toUrl,
|
addICCardURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -908,14 +900,8 @@ class ApiProvider extends BaseProvider {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// 编辑ICCard
|
// 编辑ICCard
|
||||||
Future<Response> editICCardData(
|
Future<Response> editICCardData(String lockId, String cardId, String cardName,
|
||||||
String lockId,
|
String startDate, String endDate, String isCoerced, List weekDay) =>
|
||||||
String cardId,
|
|
||||||
String cardName,
|
|
||||||
String startDate,
|
|
||||||
String endDate,
|
|
||||||
String isCoerced,
|
|
||||||
List weekDay) =>
|
|
||||||
post(
|
post(
|
||||||
editICCardURL.toUrl,
|
editICCardURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -926,15 +912,11 @@ class ApiProvider extends BaseProvider {
|
|||||||
'endDate': endDate,
|
'endDate': endDate,
|
||||||
'isCoerced': isCoerced,
|
'isCoerced': isCoerced,
|
||||||
'weekDay': weekDay
|
'weekDay': weekDay
|
||||||
})
|
}));
|
||||||
);
|
|
||||||
|
|
||||||
// 删除卡
|
// 删除卡
|
||||||
Future<Response> deletIcCardData(
|
Future<Response> deletIcCardData(
|
||||||
String cardId,
|
String cardId, String lockId, String type, String deleteType) =>
|
||||||
String lockId,
|
|
||||||
String type,
|
|
||||||
String deleteType) =>
|
|
||||||
post(
|
post(
|
||||||
deleteICCardURL.toUrl,
|
deleteICCardURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -942,8 +924,7 @@ class ApiProvider extends BaseProvider {
|
|||||||
'lockId': lockId,
|
'lockId': lockId,
|
||||||
'type': type,
|
'type': type,
|
||||||
'deleteType': deleteType
|
'deleteType': deleteType
|
||||||
})
|
}));
|
||||||
);
|
|
||||||
|
|
||||||
// 更新ICCard序号
|
// 更新ICCard序号
|
||||||
Future<Response> updateIdCardUserNoLoadData(
|
Future<Response> updateIdCardUserNoLoadData(
|
||||||
@ -970,8 +951,11 @@ class ApiProvider extends BaseProvider {
|
|||||||
String pageNo, String pageSize, String searchStr) =>
|
String pageNo, String pageSize, String searchStr) =>
|
||||||
post(
|
post(
|
||||||
lockUserListURL.toUrl,
|
lockUserListURL.toUrl,
|
||||||
jsonEncode(
|
jsonEncode({
|
||||||
{'pageNo': pageNo, 'pageSize': pageSize, 'searchStr': searchStr}));
|
'pageNo': pageNo,
|
||||||
|
'pageSize': pageSize,
|
||||||
|
'searchStr': searchStr
|
||||||
|
}));
|
||||||
|
|
||||||
Future<Response> keyListByUser(String pageNo, String pageSize, String uid) =>
|
Future<Response> keyListByUser(String pageNo, String pageSize, String uid) =>
|
||||||
post(keyListByUserURL.toUrl,
|
post(keyListByUserURL.toUrl,
|
||||||
@ -981,6 +965,13 @@ class ApiProvider extends BaseProvider {
|
|||||||
authorizedAdminListURL.toUrl,
|
authorizedAdminListURL.toUrl,
|
||||||
jsonEncode({'pageNo': pageNo, 'pageSize': pageSize}));
|
jsonEncode({'pageNo': pageNo, 'pageSize': pageSize}));
|
||||||
|
|
||||||
|
Future<Response> setAlertMode(String alertMode, String isOn) => post(
|
||||||
|
setAlertModeURL.toUrl,
|
||||||
|
jsonEncode({'alertMode': alertMode, 'isOn': isOn}));
|
||||||
|
|
||||||
|
Future<Response> userSettingsInfo() =>
|
||||||
|
post(userSettingsInfoURL.toUrl, jsonEncode({}));
|
||||||
|
|
||||||
Future<Response> canSendKey(
|
Future<Response> canSendKey(
|
||||||
String endDate, List keyGroupIdList, List lockIdList) =>
|
String endDate, List keyGroupIdList, List lockIdList) =>
|
||||||
post(
|
post(
|
||||||
|
|||||||
@ -649,6 +649,19 @@ class ApiRepository {
|
|||||||
return AuthorizedAdminListEntity.fromJson(res.body);
|
return AuthorizedAdminListEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//提示音
|
||||||
|
Future<ExpireLockListEntity> setAlertMode(
|
||||||
|
String alertMode, String isOn) async {
|
||||||
|
final res = await apiProvider.setAlertMode(alertMode, isOn);
|
||||||
|
return ExpireLockListEntity.fromJson(res.body);
|
||||||
|
}
|
||||||
|
|
||||||
|
//个人设置信息
|
||||||
|
Future<ExpireLockListEntity> userSettingsInfo() async {
|
||||||
|
final res = await apiProvider.userSettingsInfo();
|
||||||
|
return ExpireLockListEntity.fromJson(res.body);
|
||||||
|
}
|
||||||
|
|
||||||
// 开启考勤 获取考勤信息
|
// 开启考勤 获取考勤信息
|
||||||
Future<CheckingInInfoDataEntity> openCheckingInData(
|
Future<CheckingInInfoDataEntity> openCheckingInData(
|
||||||
{required String lockId}) async {
|
{required String lockId}) async {
|
||||||
@ -681,81 +694,73 @@ class ApiRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取考勤列表 - 早到榜日榜
|
// 获取考勤列表 - 早到榜日榜
|
||||||
Future<CheckingInListDayEntity> getCheckInListEarlyArrivalWithDateData(
|
Future<CheckingInListDayEntity> getCheckInListEarlyArrivalWithDateData({
|
||||||
{
|
required String companyId,
|
||||||
required String companyId,
|
required String attendanceDate,
|
||||||
required String attendanceDate,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.getCheckInListEarlyArrivalWithDateData(
|
||||||
final res =
|
companyId, attendanceDate);
|
||||||
await apiProvider.getCheckInListEarlyArrivalWithDateData(companyId, attendanceDate);
|
|
||||||
return CheckingInListDayEntity.fromJson(res.body);
|
return CheckingInListDayEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取考勤列表 - 早到榜月榜
|
// 获取考勤列表 - 早到榜月榜
|
||||||
Future<CheckingInListMonthEntity> getCheckInListEarlyArrivalWithMonthData(
|
Future<CheckingInListMonthEntity> getCheckInListEarlyArrivalWithMonthData({
|
||||||
{
|
required String companyId,
|
||||||
required String companyId,
|
required String attendanceDate,
|
||||||
required String attendanceDate,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.getCheckInListEarlyArrivalWithMonthData(
|
||||||
final res =
|
companyId, attendanceDate);
|
||||||
await apiProvider.getCheckInListEarlyArrivalWithMonthData(companyId, attendanceDate);
|
|
||||||
return CheckingInListMonthEntity.fromJson(res.body);
|
return CheckingInListMonthEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取考勤列表 - 迟到榜日榜
|
// 获取考勤列表 - 迟到榜日榜
|
||||||
Future<CheckingInListDayEntity> getCheckInListLateTimesWithDateData(
|
Future<CheckingInListDayEntity> getCheckInListLateTimesWithDateData({
|
||||||
{
|
required String companyId,
|
||||||
required String companyId,
|
required String attendanceDate,
|
||||||
required String attendanceDate,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.getCheckInListLateTimesWithDateData(
|
||||||
final res =
|
companyId, attendanceDate);
|
||||||
await apiProvider.getCheckInListLateTimesWithDateData(companyId, attendanceDate);
|
|
||||||
return CheckingInListDayEntity.fromJson(res.body);
|
return CheckingInListDayEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取考勤列表 - 迟到榜月榜
|
// 获取考勤列表 - 迟到榜月榜
|
||||||
Future<CheckingInListMonthEntity> getCheckInListLateTimesWithMonthData(
|
Future<CheckingInListMonthEntity> getCheckInListLateTimesWithMonthData({
|
||||||
{
|
required String companyId,
|
||||||
required String companyId,
|
required String attendanceDate,
|
||||||
required String attendanceDate,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.getCheckInListLateTimesWithMonthData(
|
||||||
final res =
|
companyId, attendanceDate);
|
||||||
await apiProvider.getCheckInListLateTimesWithMonthData(companyId, attendanceDate);
|
|
||||||
return CheckingInListMonthEntity.fromJson(res.body);
|
return CheckingInListMonthEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取考勤列表 - 勤奋榜
|
// 获取考勤列表 - 勤奋榜
|
||||||
Future<CheckingInListMonthEntity> getCheckInListHardworkingData(
|
Future<CheckingInListMonthEntity> getCheckInListHardworkingData({
|
||||||
{
|
required String companyId,
|
||||||
required String companyId,
|
required String attendanceDate,
|
||||||
required String attendanceDate,
|
required String type,
|
||||||
required String type,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.getCheckInListHardworkingData(
|
||||||
final res =
|
companyId, attendanceDate, type);
|
||||||
await apiProvider.getCheckInListHardworkingData(companyId, attendanceDate, type);
|
|
||||||
return CheckingInListMonthEntity.fromJson(res.body);
|
return CheckingInListMonthEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取考勤详情
|
// 获取考勤详情
|
||||||
Future<CheckingInDetailEntity> getCheckInDetailData(
|
Future<CheckingInDetailEntity> getCheckInDetailData({
|
||||||
{
|
required String companyId,
|
||||||
required String companyId,
|
required String attendanceDate,
|
||||||
required String attendanceDate,
|
required String staffId,
|
||||||
required String staffId,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.getCheckInDetailData(
|
||||||
final res =
|
companyId, attendanceDate, staffId);
|
||||||
await apiProvider.getCheckInDetailData(companyId, attendanceDate, staffId);
|
|
||||||
return CheckingInDetailEntity.fromJson(res.body);
|
return CheckingInDetailEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取员工列表
|
// 获取员工列表
|
||||||
Future<CheckingInAddStaffListEntity> getStaffListData(
|
Future<CheckingInAddStaffListEntity> getStaffListData({
|
||||||
{
|
required String companyId,
|
||||||
required String companyId,
|
required String lockId,
|
||||||
required String lockId,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.getStaffListData(companyId, lockId);
|
||||||
final res =
|
|
||||||
await apiProvider.getStaffListData(companyId, lockId);
|
|
||||||
return CheckingInAddStaffListEntity.fromJson(res.body);
|
return CheckingInAddStaffListEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -775,222 +780,203 @@ class ApiRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 编辑员工
|
// 编辑员工
|
||||||
Future<LoginEntity> editStaffData(
|
Future<LoginEntity> editStaffData({
|
||||||
{
|
required String attendanceType,
|
||||||
required String attendanceType,
|
required String attendanceWay,
|
||||||
required String attendanceWay,
|
required String staffId,
|
||||||
required String staffId,
|
required String have,
|
||||||
required String have,
|
required String staffName,
|
||||||
required String staffName,
|
required String countryCode,
|
||||||
required String countryCode,
|
required String usernameType,
|
||||||
required String usernameType,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.editStaffData(attendanceType, attendanceWay,
|
||||||
final res =
|
staffId, have, staffName, countryCode, usernameType);
|
||||||
await apiProvider.editStaffData(attendanceType, attendanceWay, staffId, have, staffName, countryCode, usernameType);
|
|
||||||
return LoginEntity.fromJson(res.body);
|
return LoginEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加员工选择钥匙
|
// 添加员工选择钥匙
|
||||||
Future<CheckingInAddStaffSeletKeyEntity> addStaffSeletKeyData(
|
Future<CheckingInAddStaffSeletKeyEntity> addStaffSeletKeyData({
|
||||||
{
|
required String companyId,
|
||||||
required String companyId,
|
required String type,
|
||||||
required String type,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.addStaffSeletKeyData(companyId, type);
|
||||||
final res =
|
|
||||||
await apiProvider.addStaffSeletKeyData(companyId, type);
|
|
||||||
return CheckingInAddStaffSeletKeyEntity.fromJson(res.body);
|
return CheckingInAddStaffSeletKeyEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加假期
|
// 添加假期
|
||||||
Future<LoginEntity> addHolidaysData(
|
Future<LoginEntity> addHolidaysData({
|
||||||
{
|
required String companyId,
|
||||||
required String companyId,
|
required String fillClassDate,
|
||||||
required String fillClassDate,
|
required String vacationEndDate,
|
||||||
required String vacationEndDate,
|
required String vacationName,
|
||||||
required String vacationName,
|
required String vacationStartDate,
|
||||||
required String vacationStartDate,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.addHolidaysData(companyId, fillClassDate,
|
||||||
final res =
|
vacationEndDate, vacationName, vacationStartDate);
|
||||||
await apiProvider.addHolidaysData(companyId, fillClassDate, vacationEndDate, vacationName, vacationStartDate);
|
|
||||||
return LoginEntity.fromJson(res.body);
|
return LoginEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 假期列表
|
// 假期列表
|
||||||
Future<CheckingInSetHolidaysInfoDataEntity> holidaysListData(
|
Future<CheckingInSetHolidaysInfoDataEntity> holidaysListData({
|
||||||
{
|
required String companyId,
|
||||||
required String companyId,
|
required String vacationYear,
|
||||||
required String vacationYear,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.holidaysListData(companyId, vacationYear);
|
||||||
final res =
|
|
||||||
await apiProvider.holidaysListData(companyId, vacationYear);
|
|
||||||
return CheckingInSetHolidaysInfoDataEntity.fromJson(res.body);
|
return CheckingInSetHolidaysInfoDataEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除假期
|
// 删除假期
|
||||||
Future<LoginEntity> deletHolidaysData(
|
Future<LoginEntity> deletHolidaysData({required String vacationId}) async {
|
||||||
{
|
final res = await apiProvider.deletHolidaysData(vacationId);
|
||||||
required String vacationId
|
|
||||||
}) async {
|
|
||||||
final res =
|
|
||||||
await apiProvider.deletHolidaysData(vacationId);
|
|
||||||
return LoginEntity.fromJson(res.body);
|
return LoginEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取考勤设置信息
|
// 获取考勤设置信息
|
||||||
Future<CheckingInSetEntity> getCheckInSetInfoData(
|
Future<CheckingInSetEntity> getCheckInSetInfoData({
|
||||||
{
|
required String companyId,
|
||||||
required String companyId,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.getCheckInSetInfoData(companyId);
|
||||||
final res =
|
|
||||||
await apiProvider.getCheckInSetInfoData(companyId);
|
|
||||||
return CheckingInSetEntity.fromJson(res.body);
|
return CheckingInSetEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改考勤设置信息
|
// 修改考勤设置信息
|
||||||
Future<CheckingInSetEntity> editCheckInSetInfoData(
|
Future<CheckingInSetEntity> editCheckInSetInfoData({
|
||||||
{
|
required String attendanceType,
|
||||||
required String attendanceType,
|
required String companyId,
|
||||||
required String companyId,
|
required String type,
|
||||||
required String type,
|
required String companyName,
|
||||||
required String companyName,
|
required String workEndTime,
|
||||||
required String workEndTime,
|
required String workStartTime,
|
||||||
required String workStartTime,
|
required List<int> workDay,
|
||||||
required List<int> workDay,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.editCheckInSetInfoData(attendanceType,
|
||||||
final res =
|
companyId, type, companyName, workEndTime, workStartTime, workDay);
|
||||||
await apiProvider.editCheckInSetInfoData(attendanceType, companyId, type, companyName, workEndTime, workStartTime, workDay);
|
|
||||||
return CheckingInSetEntity.fromJson(res.body);
|
return CheckingInSetEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取指纹列表
|
// 获取指纹列表
|
||||||
Future<FingerprintListDataEntity> getFingerprintsListData(
|
Future<FingerprintListDataEntity> getFingerprintsListData({
|
||||||
{
|
required String lockId,
|
||||||
required String lockId,
|
required String pageNo,
|
||||||
required String pageNo,
|
required String pageSize,
|
||||||
required String pageSize,
|
required String searchStr,
|
||||||
required String searchStr,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.getFingerprintsListData(
|
||||||
final res =
|
lockId, pageNo, pageSize, searchStr);
|
||||||
await apiProvider.getFingerprintsListData(lockId, pageNo, pageSize, searchStr);
|
|
||||||
return FingerprintListDataEntity.fromJson(res.body);
|
return FingerprintListDataEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加指纹
|
// 添加指纹
|
||||||
Future<CheckingInListMonthEntity> addFingerprintsData(
|
Future<CheckingInListMonthEntity> addFingerprintsData({
|
||||||
{
|
required String lockId,
|
||||||
required String lockId,
|
required String endDate,
|
||||||
required String endDate,
|
required String addType,
|
||||||
required String addType,
|
required String fingerprintName,
|
||||||
required String fingerprintName,
|
required String fingerprintNumber,
|
||||||
required String fingerprintNumber,
|
required String fingerprintType,
|
||||||
required String fingerprintType,
|
required String isCoerced,
|
||||||
required String isCoerced,
|
required String startDate,
|
||||||
required String startDate,
|
required List weekDay,
|
||||||
required List weekDay,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.addFingerprintsData(
|
||||||
final res =
|
lockId,
|
||||||
await apiProvider.addFingerprintsData(lockId, endDate, addType, fingerprintName, fingerprintNumber, fingerprintType, isCoerced, startDate, weekDay);
|
endDate,
|
||||||
|
addType,
|
||||||
|
fingerprintName,
|
||||||
|
fingerprintNumber,
|
||||||
|
fingerprintType,
|
||||||
|
isCoerced,
|
||||||
|
startDate,
|
||||||
|
weekDay);
|
||||||
return CheckingInListMonthEntity.fromJson(res.body);
|
return CheckingInListMonthEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 编辑指纹
|
// 编辑指纹
|
||||||
Future<LoginEntity> editFingerprintsData(
|
Future<LoginEntity> editFingerprintsData(
|
||||||
{
|
{required String fingerprintId,
|
||||||
required String fingerprintId,
|
required String lockId,
|
||||||
required String lockId,
|
required List weekDay,
|
||||||
required List weekDay,
|
required String startDate,
|
||||||
required String startDate,
|
required String endDate,
|
||||||
required String endDate,
|
required String isCoerced,
|
||||||
required String isCoerced,
|
required String fingerprintName}) async {
|
||||||
required String fingerprintName
|
final res = await apiProvider.editFingerprintsData(fingerprintId, lockId,
|
||||||
}) async {
|
weekDay, startDate, endDate, isCoerced, fingerprintName);
|
||||||
final res =
|
|
||||||
await apiProvider.editFingerprintsData(fingerprintId, lockId, weekDay, startDate, endDate, isCoerced, fingerprintName);
|
|
||||||
return LoginEntity.fromJson(res.body);
|
return LoginEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除指纹
|
// 删除指纹
|
||||||
Future<LoginEntity> deletFingerprintsData(
|
Future<LoginEntity> deletFingerprintsData(
|
||||||
{
|
{required String fingerprintId,
|
||||||
required String fingerprintId,
|
required String lockId,
|
||||||
required String lockId,
|
required String type,
|
||||||
required String type,
|
required String deleteType}) async {
|
||||||
required String deleteType
|
final res = await apiProvider.deletFingerprintsData(
|
||||||
}) async {
|
fingerprintId, lockId, type, deleteType);
|
||||||
final res =
|
|
||||||
await apiProvider.deletFingerprintsData(fingerprintId, lockId, type, deleteType);
|
|
||||||
return LoginEntity.fromJson(res.body);
|
return LoginEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新指纹用户序号
|
// 更新指纹用户序号
|
||||||
Future<LoginEntity> updateFingerprintUserNoLoadData(
|
Future<LoginEntity> updateFingerprintUserNoLoadData(
|
||||||
{
|
{required String fingerprintId,
|
||||||
required String fingerprintId,
|
required String lockId,
|
||||||
required String lockId,
|
required String fingerprintUserNo}) async {
|
||||||
required String fingerprintUserNo
|
final res = await apiProvider.updateFingerprintUserNoLoadData(
|
||||||
}) async {
|
fingerprintId, lockId, fingerprintUserNo);
|
||||||
final res =
|
|
||||||
await apiProvider.updateFingerprintUserNoLoadData(fingerprintId, lockId, fingerprintUserNo);
|
|
||||||
return LoginEntity.fromJson(res.body);
|
return LoginEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取Ic卡列表
|
// 获取Ic卡列表
|
||||||
Future<FingerprintListDataEntity> getICCardListData(
|
Future<FingerprintListDataEntity> getICCardListData({
|
||||||
{
|
required String lockId,
|
||||||
required String lockId,
|
required String pageNo,
|
||||||
required String pageNo,
|
required String pageSize,
|
||||||
required String pageSize,
|
required String searchStr,
|
||||||
required String searchStr,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.getICCardListData(
|
||||||
final res =
|
lockId, pageNo, pageSize, searchStr);
|
||||||
await apiProvider.getICCardListData(lockId, pageNo, pageSize, searchStr);
|
|
||||||
return FingerprintListDataEntity.fromJson(res.body);
|
return FingerprintListDataEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加ID卡
|
// 添加ID卡
|
||||||
Future<CheckingInListMonthEntity> addICCardData(
|
Future<CheckingInListMonthEntity> addICCardData({
|
||||||
{
|
required String lockId,
|
||||||
required String lockId,
|
required String endDate,
|
||||||
required String endDate,
|
required String cardName,
|
||||||
required String cardName,
|
required String cardNumber,
|
||||||
required String cardNumber,
|
required String cardType,
|
||||||
required String cardType,
|
required String addType,
|
||||||
required String addType,
|
required String startDate,
|
||||||
required String startDate,
|
required String isCoerced,
|
||||||
required String isCoerced,
|
required List weekDay,
|
||||||
required List weekDay,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.addICCardData(lockId, endDate, cardName,
|
||||||
final res =
|
cardNumber, cardType, addType, startDate, isCoerced, weekDay);
|
||||||
await apiProvider.addICCardData(lockId, endDate, cardName, cardNumber, cardType, addType, startDate, isCoerced, weekDay);
|
|
||||||
return CheckingInListMonthEntity.fromJson(res.body);
|
return CheckingInListMonthEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 编辑IC卡
|
// 编辑IC卡
|
||||||
Future<LoginEntity> editICCardData(
|
Future<LoginEntity> editICCardData(
|
||||||
{
|
{required String lockId,
|
||||||
required String lockId,
|
required String cardId,
|
||||||
required String cardId,
|
required String cardName,
|
||||||
required String cardName,
|
required String startDate,
|
||||||
required String startDate,
|
required String endDate,
|
||||||
required String endDate,
|
required String isCoerced,
|
||||||
required String isCoerced,
|
required List weekDay}) async {
|
||||||
required List weekDay
|
final res = await apiProvider.editICCardData(
|
||||||
}) async {
|
lockId, cardId, cardName, startDate, endDate, isCoerced, weekDay);
|
||||||
final res =
|
|
||||||
await apiProvider.editICCardData(lockId, cardId, cardName, startDate, endDate, isCoerced, weekDay);
|
|
||||||
return LoginEntity.fromJson(res.body);
|
return LoginEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除ic卡
|
// 删除ic卡
|
||||||
Future<LoginEntity> deletIcCardData(
|
Future<LoginEntity> deletIcCardData(
|
||||||
{
|
{required String cardId,
|
||||||
required String cardId,
|
required String lockId,
|
||||||
required String lockId,
|
required String type,
|
||||||
required String type,
|
required String deleteType}) async {
|
||||||
required String deleteType
|
|
||||||
}) async {
|
|
||||||
final res =
|
final res =
|
||||||
await apiProvider.deletIcCardData(cardId, lockId, type, deleteType);
|
await apiProvider.deletIcCardData(cardId, lockId, type, deleteType);
|
||||||
return LoginEntity.fromJson(res.body);
|
return LoginEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user