2680 lines
90 KiB
Dart
Executable File
2680 lines
90 KiB
Dart
Executable File
import 'package:get/get.dart';
|
||
import 'package:star_lock/blue/entity/lock_user_no_list_entity.dart';
|
||
import 'package:star_lock/login/login/app_get_version.dart';
|
||
import 'package:star_lock/login/selectCountryRegion/common/countryRegionEntity.dart';
|
||
import 'package:star_lock/main/lockDetail/authorizedAdmin/authorizedAdmin/notice_template_entity.dart';
|
||
import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_entity.dart';
|
||
import 'package:star_lock/main/lockDetail/doorLockLog/exportRecordDialog/exportRecord_entity.dart';
|
||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyEntity.dart';
|
||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart';
|
||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_entity.dart';
|
||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
|
||
import 'package:star_lock/main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_entity.dart';
|
||
import 'package:star_lock/main/lockDetail/face/addFace/addFace_entity.dart';
|
||
import 'package:star_lock/main/lockDetail/fingerprint/fingerprintList/fingerprint_entity.dart';
|
||
import 'package:star_lock/main/lockDetail/lockSet/basicInformation/basicInformation/KeyDetailEntity.dart';
|
||
import 'package:star_lock/main/lockDetail/lockSet/lockEscalation/updateLockInfo_entity.dart';
|
||
import 'package:star_lock/main/lockDetail/lockSet/lockEscalation/version_entity.dart';
|
||
import 'package:star_lock/main/lockDetail/messageWarn/lockUser/lockUser_entity.dart';
|
||
import 'package:star_lock/main/lockDetail/messageWarn/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_entity.dart';
|
||
import 'package:star_lock/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_entity.dart';
|
||
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyListEntity.dart';
|
||
import 'package:star_lock/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKeyEntity.dart';
|
||
import 'package:star_lock/main/lockDetail/videoLog/videoLog/videoLog_entity.dart';
|
||
import 'package:star_lock/mine/mall/lockMall_entity.dart';
|
||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccount/mineUnbindPhoneOrEmail_entity.dart';
|
||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_entity.dart';
|
||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_entity.dart';
|
||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoViewSafetyProblem/minePersonInfoViewSafetyProblem_entity.dart';
|
||
import 'package:star_lock/mine/mineSet/appUnlockNeedMobileNetworkingLock/selectLockListEntity.dart';
|
||
import 'package:star_lock/mine/mineSet/authorizedAdministrator/administratorAssociationLock/administratorAssociationLock_entity.dart';
|
||
import 'package:star_lock/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetailEntity.dart';
|
||
import 'package:star_lock/mine/mineSet/authorizedAdministrator/authorizedAdministrator/authorizedAdminListEntity.dart';
|
||
import 'package:star_lock/mine/mineSet/lockUserManage/expireLockList/expireElectronicKey/expireLockList_entity.dart';
|
||
import 'package:star_lock/mine/mineSet/lockUserManage/expireLockList/expireFingerprint/expireFingerprint_entity.dart';
|
||
import 'package:star_lock/mine/mineSet/lockUserManage/lockUserManageList/keyListByUserEntity.dart';
|
||
import 'package:star_lock/mine/mineSet/mineSet/userSettingInfoEntity.dart';
|
||
import 'package:star_lock/mine/mineSet/mineSet/weChatQRCodeEntity.dart';
|
||
import 'package:star_lock/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_entity.dart';
|
||
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_entity.dart';
|
||
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRealName/face_authentication_entity.dart';
|
||
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/use_record_list_entity.dart';
|
||
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/newSMSTemplate_entity.dart';
|
||
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesListSMSTemplate/customSMSTemplateList_entity.dart';
|
||
import 'package:star_lock/tools/aliyunRealNameAuth/realNameVertify_entity.dart';
|
||
import 'package:star_lock/tools/aliyunRealNameAuth/serviceAuthResult_entity.dart';
|
||
|
||
import '../common/safetyVerification/entity/CheckSafetyVerificationEntity.dart';
|
||
import '../common/safetyVerification/entity/SafetyVerificationEntity.dart';
|
||
import '../login/login/entity/LoginEntity.dart';
|
||
import '../login/register/entity/SendValidationCodeEntity.dart';
|
||
import '../login/register/entity/checkIP_entity.dart';
|
||
import '../main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_entity.dart';
|
||
import '../main/lockDetail/card/addICCard/addICCard_entity.dart';
|
||
import '../main/lockDetail/checkingIn/checkingInDetail/checkingInDetail_entity.dart';
|
||
import '../main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_entity.dart';
|
||
import '../main/lockDetail/checkingIn/checkingInList/checkingInListDay_entity.dart';
|
||
import '../main/lockDetail/checkingIn/checkingInList/checkingInListMonth_entity.dart';
|
||
import '../main/lockDetail/checkingIn/checkingInSet/checkingInSet_entity.dart';
|
||
import '../main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaffSelectKey_entity.dart';
|
||
import '../main/lockDetail/checkingIn/checkingInStaff/checkingInSetStaffList/checkingInStaffList_entity.dart';
|
||
import '../main/lockDetail/fingerprint/addFingerprint/addFingerprint_entity.dart';
|
||
import '../main/lockDetail/fingerprint/fingerprintList/fingerprintListData_entity.dart';
|
||
import '../main/lockDetail/lockDetail/lockNetToken_entity.dart';
|
||
import '../main/lockDetail/lockOperatingRecord/keyOperationRecord_entity.dart';
|
||
import '../main/lockDetail/lockOperatingRecord/lockOperatingRecordGetLastRecordTime_entity.dart';
|
||
import '../main/lockDetail/lockSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_entity.dart';
|
||
import '../main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifiEntity.dart';
|
||
import '../main/lockDetail/lockSet/lockSet/checkingInInfoData_entity.dart';
|
||
import '../main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart';
|
||
import '../main/lockDetail/lockSet/lockTime/getServerDatetime_entity.dart';
|
||
import '../main/lockDetail/messageWarn/msgNotification/openDoorNotify/openDoorNotify_entity.dart';
|
||
import '../main/lockDetail/palm/addPalm/addPalm_entity.dart';
|
||
import '../main/lockDetail/remoteControl/addRemoteControl/addRemoteControl_entity.dart';
|
||
import '../main/lockMian/entity/lockListInfo_entity.dart';
|
||
import '../mine/addLock/saveLock/entity/SaveLockEntity.dart';
|
||
import '../mine/gateway/addGateway/gatewayConfigurationWifi/getGatewayConfiguration_entity.dart';
|
||
import '../mine/gateway/gatewayConnectionLock/gatewayConnectionLockList_entity.dart';
|
||
import '../mine/message/messageList/messageList_entity.dart';
|
||
import '../mine/minePersonInfo/minePersonInfoPage/minePersonGetUploadFileInfo_entity.dart';
|
||
import '../mine/mineSet/lockUserManage/expireLockList/expireCard/expireCard_entity.dart';
|
||
import '../mine/mineSet/lockUserManage/expireLockList/expireFace/expireFace_entity.dart';
|
||
import '../mine/mineSet/lockUserManage/expireLockList/expirePassword/expirePassword_entity.dart';
|
||
import '../mine/mineSet/transferGateway/selectGetewayList_entity.dart';
|
||
import '../mine/mineSet/transferSmartLock/recipientInformation/recipientInformation_entity.dart';
|
||
import '../mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_entity.dart';
|
||
import '../versionUndate/versionUndate_entity.dart';
|
||
import 'api_provider.dart';
|
||
|
||
class ApiRepository {
|
||
final ApiProvider apiProvider;
|
||
|
||
static ApiRepository get to => Get.find<ApiRepository>();
|
||
|
||
ApiRepository(this.apiProvider);
|
||
|
||
// 发送验证码(登陆之前使用) 1注册,2找回密码
|
||
Future<SendValidationCodeEntity> sendValidationCodeUnLogin(
|
||
{required String countryCode,
|
||
required String account,
|
||
required String channel,
|
||
required String codeType,
|
||
required String xWidth}) async {
|
||
final res = await apiProvider.sendValidationCode(
|
||
countryCode, account, channel, codeType, xWidth);
|
||
return SendValidationCodeEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 注册
|
||
Future<LoginEntity> register(
|
||
{required int receiverType,
|
||
required int countryCode,
|
||
required String account,
|
||
required String password,
|
||
required String verificationCode,
|
||
required Map deviceInfo}) async {
|
||
final res = await apiProvider.register(receiverType, countryCode, account,
|
||
password, verificationCode, deviceInfo);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取图片验证码
|
||
Future<SafetyVerificationEntity> getSliderVerifyImg(
|
||
String countryCode, String account) async {
|
||
final res = await apiProvider.getSliderVerifyImg(countryCode, account);
|
||
return SafetyVerificationEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 检验图片验证码
|
||
Future<CheckSafetyVerificationEntity> checkSliderVerifyImg(
|
||
String countryCode, String account, String xWidth) async {
|
||
final res =
|
||
await apiProvider.checkSliderVerifyImg(countryCode, account, xWidth);
|
||
return CheckSafetyVerificationEntity.fromJson(res.body);
|
||
}
|
||
|
||
//登录
|
||
Future<LoginEntity> login(
|
||
{required String loginType,
|
||
required String password,
|
||
required String countryCode,
|
||
required String username,
|
||
required Map deviceInfo}) async {
|
||
final res = await apiProvider.login(
|
||
loginType, password, countryCode, username, deviceInfo);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
//重置密码
|
||
Future<LoginEntity> resetPassword(
|
||
String countryCode,
|
||
String account,
|
||
String date,
|
||
String newPassword,
|
||
String uniqueid,
|
||
String verificationCode) async {
|
||
final res = await apiProvider.resetPassword(
|
||
countryCode, account, date, newPassword, uniqueid, verificationCode);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
//获取国家或地区 json文件
|
||
Future<CountryRegionEntity> getCountryRegion(String type) async {
|
||
final res = await apiProvider.getCountryRegion(type);
|
||
return CountryRegionEntity.fromJson(res.body);
|
||
}
|
||
|
||
//电子钥匙列表
|
||
Future<ElectronicKeyListEntity> electronicKeyList({
|
||
required String endDate,
|
||
required String keyId,
|
||
required String keyStatus,
|
||
required String keyRight,
|
||
required String lockId,
|
||
required String pageNo,
|
||
required String pageSize,
|
||
required String startDate,
|
||
required String searchStr,
|
||
}) async {
|
||
final res = await apiProvider.electronicKeyList(endDate, keyId, keyStatus,
|
||
keyRight, lockId, pageNo, pageSize, startDate, searchStr);
|
||
return ElectronicKeyListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//获取电子钥匙
|
||
Future<ElectronicKeyEntity> electronicKey(
|
||
{required int lockId, required int keyId}) async {
|
||
final res = await apiProvider.electronicKey(lockId, keyId);
|
||
return ElectronicKeyEntity.fromJson(res.body);
|
||
}
|
||
|
||
//发送电子钥匙
|
||
Future<AuthorizedAdminSendEntity> sendElectronicKey(
|
||
{required int createUser,
|
||
required String countryCode,
|
||
required String usernameType,
|
||
required int endDate,
|
||
required String faceAuthentication,
|
||
required String isCameraEnable,
|
||
required String isRemoteUnlock,
|
||
required String keyNameForAdmin,
|
||
required String keyRight,
|
||
required String keyType,
|
||
required String lockId,
|
||
required String operatorUid,
|
||
required String receiverUsername,
|
||
required String remarks,
|
||
required int startDate,
|
||
required List weekDays,
|
||
required int startTime,
|
||
required int endTime,
|
||
required int isOnlyManageSelf,
|
||
required String realName,
|
||
required String idCardNumber}) async {
|
||
final res = await apiProvider.sendElectronicKey(
|
||
createUser,
|
||
countryCode,
|
||
usernameType,
|
||
endDate,
|
||
faceAuthentication,
|
||
isCameraEnable,
|
||
isRemoteUnlock,
|
||
keyNameForAdmin,
|
||
keyRight,
|
||
keyType,
|
||
lockId,
|
||
operatorUid,
|
||
receiverUsername,
|
||
remarks,
|
||
startDate,
|
||
weekDays,
|
||
startTime,
|
||
endTime,
|
||
isOnlyManageSelf,
|
||
realName,
|
||
idCardNumber);
|
||
return AuthorizedAdminSendEntity.fromJson(res.body);
|
||
}
|
||
|
||
//重置电子钥匙
|
||
Future<ElectronicKeyListEntity> resetElectronicKey(
|
||
String lockId, String operatorUid) async {
|
||
final res = await apiProvider.resetElectronicKey(lockId, operatorUid);
|
||
return ElectronicKeyListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//钥匙详情-操作记录
|
||
Future<KeyOperationRecordEntity> lockRecordList({
|
||
required String lockId,
|
||
required String pageNo,
|
||
required String recordType,
|
||
required String searchStr,
|
||
required String startDate,
|
||
required String endDate,
|
||
required String keyboardPwdId,
|
||
required String cardId,
|
||
required String fingerprintId,
|
||
required String keyId,
|
||
required String faceId,
|
||
required String remoteId,
|
||
required String palmVeinId,
|
||
required String pageSize,
|
||
}) async {
|
||
final res = await apiProvider.lockRecordList(
|
||
lockId: lockId,
|
||
pageNo: pageNo,
|
||
recordType: recordType,
|
||
searchStr: searchStr,
|
||
startDate: startDate,
|
||
endDate: endDate,
|
||
keyboardPwdId: keyboardPwdId,
|
||
cardId: cardId,
|
||
fingerprintId: fingerprintId,
|
||
keyId: keyId,
|
||
faceId: faceId,
|
||
remoteId: remoteId,
|
||
palmVeinId: palmVeinId,
|
||
pageSize: pageSize,
|
||
);
|
||
return KeyOperationRecordEntity.fromJson(res.body);
|
||
}
|
||
|
||
//门锁事件日志
|
||
Future<DoorLockLogEntity> lockEventList({
|
||
required int lockId,
|
||
required int lockEventType,
|
||
required int pageNo,
|
||
required int pageSize,
|
||
required int startDate,
|
||
required int endDate,
|
||
}) async {
|
||
final res = await apiProvider.lockEventList(
|
||
lockId,
|
||
lockEventType,
|
||
pageNo,
|
||
pageSize,
|
||
startDate,
|
||
endDate,
|
||
);
|
||
return DoorLockLogEntity.fromJson(res.body);
|
||
}
|
||
|
||
//操作记录上传
|
||
Future<KeyOperationRecordEntity> lockRecordUploadData(
|
||
{required String lockId, required List records}) async {
|
||
final res = await apiProvider.lockRecordUploadData(lockId, records);
|
||
return KeyOperationRecordEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 查询锁记录最后时间
|
||
Future<LockOperatingRecordGetLastRecordTimeEntity>
|
||
getLockRecordLastUploadDataTime({required String lockId}) async {
|
||
final res = await apiProvider.getLockRecordLastUploadDataTime(lockId);
|
||
return LockOperatingRecordGetLastRecordTimeEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 电子钥匙开锁成功上报
|
||
Future<KeyOperationRecordEntity> lockReportLockSuccessfullyUploadData(
|
||
{required int lockId, required int keyId}) async {
|
||
final res =
|
||
await apiProvider.lockReportLockSuccessfullyUploadData(lockId, keyId);
|
||
return KeyOperationRecordEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取手机联网token
|
||
Future<LockNetTokenEntity> getLockNetToken({required String lockId}) async {
|
||
final res = await apiProvider.getLockNetToken(lockId);
|
||
return LockNetTokenEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 更新锁用户NO
|
||
Future<LockNetTokenEntity> updateLockUserNo(
|
||
{required String keyId, required String lockUserNo}) async {
|
||
final res = await apiProvider.updateLockUserNo(keyId, lockUserNo);
|
||
return LockNetTokenEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 更新锁用户 InitUserNo
|
||
Future<LockNetTokenEntity> updateLockInitUserNo(
|
||
{required int lockId, required int initUserNo}) async {
|
||
final res = await apiProvider.updateLockInitUserNo(lockId, initUserNo);
|
||
return LockNetTokenEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 绑定蓝牙管理员
|
||
Future<SaveLockEntity> bindingBlueAdmin(
|
||
{required String lockAlias,
|
||
required Map position,
|
||
required Map bluetooth,
|
||
required Map lockInfo,
|
||
required String lockUserNo,
|
||
required String pwdTimestamp,
|
||
required String featureValue,
|
||
required String featureSettingValue,
|
||
required List featureSettingParams}) async {
|
||
final res = await apiProvider.bindingBlueAdmin(
|
||
lockAlias,
|
||
position,
|
||
bluetooth,
|
||
lockInfo,
|
||
lockUserNo,
|
||
pwdTimestamp,
|
||
featureValue,
|
||
featureSettingValue,
|
||
featureSettingParams);
|
||
return SaveLockEntity.fromJson(res.body);
|
||
}
|
||
|
||
//锁电量更新
|
||
Future<UploadElectricQuantityEntity> uploadElectricQuantity(
|
||
{required String? electricQuantity,
|
||
required String? electricQuantityStandby,
|
||
required String? lockId,
|
||
required bool? isUnShowLoading}) async {
|
||
final res = await apiProvider.uploadElectricQuantity(
|
||
electricQuantity!, electricQuantityStandby!, lockId!, isUnShowLoading!);
|
||
return UploadElectricQuantityEntity.fromJson(res.body);
|
||
}
|
||
|
||
//锁名称修改
|
||
Future<KeyOperationRecordEntity> modifyKeyName(
|
||
{required String keyId,
|
||
required String lockId,
|
||
required String keyName}) async {
|
||
final res = await apiProvider.modifyKeyName(keyId, lockId, keyName);
|
||
return KeyOperationRecordEntity.fromJson(res.body);
|
||
}
|
||
|
||
//修改锁名(新)
|
||
Future<LoginEntity> updateLockName(
|
||
{required String lockId, required String lockName}) async {
|
||
final res = await apiProvider.updateLockName(lockId, lockName);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
//编辑电子钥匙名字
|
||
Future<KeyOperationRecordEntity> modifyKeyNameForAdmin(
|
||
String keyId,
|
||
String keyNameForAdmin,
|
||
String operatorUid,
|
||
) async {
|
||
final res = await apiProvider.modifyKeyNameForAdmin(
|
||
keyId, keyNameForAdmin, operatorUid);
|
||
return KeyOperationRecordEntity.fromJson(res.body);
|
||
}
|
||
|
||
//编辑电子钥匙有效期
|
||
Future<KeyOperationRecordEntity> updateKeyDate(
|
||
{required String keyId,
|
||
required String lockId,
|
||
required String endDate,
|
||
required String startDate,
|
||
required List weekDays,
|
||
required int keyType,
|
||
required int startTime,
|
||
required int endTime,
|
||
required int isOnlyManageSelf,
|
||
required int remoteEnable}) async {
|
||
final res = await apiProvider.updateKeyDate(
|
||
keyId,
|
||
lockId,
|
||
endDate,
|
||
startDate,
|
||
weekDays,
|
||
keyType,
|
||
startTime,
|
||
endTime,
|
||
isOnlyManageSelf,
|
||
remoteEnable);
|
||
return KeyOperationRecordEntity.fromJson(res.body);
|
||
}
|
||
|
||
//更新钥匙实名认证信息
|
||
Future<KeyOperationRecordEntity> updateRealNameInfo(
|
||
{required int lockId,
|
||
required int keyId,
|
||
required int uid,
|
||
required int faceAuthentication,
|
||
required String realName,
|
||
required String idCardNumber}) async {
|
||
final res = await apiProvider.updateRealNameInfo(
|
||
lockId, keyId, uid, faceAuthentication, realName, idCardNumber);
|
||
return KeyOperationRecordEntity.fromJson(res.body);
|
||
}
|
||
|
||
//密码列表
|
||
Future<PasswordKeyListEntity> passwordKeyList(String keyStatus, String lockId,
|
||
String pageNo, String pageSize, String searchStr) async {
|
||
final res = await apiProvider.passwordKeyList(
|
||
keyStatus, lockId, pageNo, pageSize, searchStr);
|
||
return PasswordKeyListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//密码获取
|
||
Future<PasswordKeyEntity> passwordKey(int lockId, int keyboardPwdId) async {
|
||
final res = await apiProvider.passwordKey(lockId, keyboardPwdId);
|
||
return PasswordKeyEntity.fromJson(res.body);
|
||
}
|
||
|
||
//重置密码钥匙
|
||
Future<PasswordKeyListEntity> resetPasswordKey(
|
||
String lockId, String operatorUid) async {
|
||
final res = await apiProvider.resetPasswordKey(lockId, operatorUid);
|
||
return PasswordKeyListEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取锁信息
|
||
// Future<LockMainEntity> getLockInfo(
|
||
// {required String lastUpdateDate, required String pageNo}) async {
|
||
// final res = await apiProvider.getLockInfo(lastUpdateDate, pageNo);
|
||
// return LockMainEntity.fromJson(res.body);
|
||
// }
|
||
|
||
// 获取锁信息列表
|
||
Future<LockListInfoEntity> getStarLockListInfo(
|
||
{required int pageNo,
|
||
required int pageSize,
|
||
required bool isUnShowLoading}) async {
|
||
final res = await apiProvider.getStarLockListInfo(pageNo, pageSize,
|
||
isUnShowLoading: isUnShowLoading);
|
||
return LockListInfoEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取锁信息列表
|
||
Future<LockListInfoEntity> getStarLockInfo({required int keyId}) async {
|
||
final res = await apiProvider.getStarLockListInfo(1, 20,
|
||
isUnShowLoading: true, keyId: keyId);
|
||
return LockListInfoEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取所有锁设置信息
|
||
Future<LockSetInfoEntity> getLockSettingInfoData(
|
||
{required String lockId}) async {
|
||
final res = await apiProvider.getLockSettingInfoData(lockId);
|
||
return LockSetInfoEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 删除锁
|
||
Future<LockListInfoEntity> deletOwnerLockData({required int lockId}) async {
|
||
final res = await apiProvider.deletLockInfo(lockId);
|
||
return LockListInfoEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 删除钥匙
|
||
Future<LockListInfoEntity> deletOwnerKeyData(
|
||
{required String lockId,
|
||
required String keyId,
|
||
required int includeUnderlings}) async {
|
||
final res =
|
||
await apiProvider.deletOwnerKeyInfo(lockId, keyId, includeUnderlings);
|
||
return LockListInfoEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 检查账户密码
|
||
Future<LockListInfoEntity> checkLoginPassword(
|
||
{required String password}) async {
|
||
final res = await apiProvider.checkLoginPassword(password);
|
||
return LockListInfoEntity.fromJson(res.body);
|
||
}
|
||
|
||
//获取密码
|
||
Future<PasswordKeyEntity> getPasswordKey(
|
||
{required String endDate,
|
||
required String keyboardPwdName,
|
||
required String keyboardPwdType,
|
||
required int lockId,
|
||
required String startDate,
|
||
required int startHours,
|
||
required int endHours,
|
||
required int isCoerced}) async {
|
||
final res = await apiProvider.getKeyboardPwd(endDate, keyboardPwdName,
|
||
keyboardPwdType, lockId, startDate, startHours, endHours, isCoerced);
|
||
return PasswordKeyEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 更新锁用户序号
|
||
Future<PasswordKeyEntity> updatePWDNumber(
|
||
{required String lockId,
|
||
required String keyboardPwdId,
|
||
required String pwdUserNo}) async {
|
||
final res =
|
||
await apiProvider.updatePWDNumber(lockId, keyboardPwdId, pwdUserNo);
|
||
return PasswordKeyEntity.fromJson(res.body);
|
||
}
|
||
|
||
//自定义密码
|
||
Future<PasswordKeyEntity> addPasswordKey({
|
||
required String lockId,
|
||
required String keyboardPwdName,
|
||
required String keyboardPwd,
|
||
required String keyboardPwdType,
|
||
required String startDate,
|
||
required String endDate,
|
||
required String addType,
|
||
required int pwdRight,
|
||
}) async {
|
||
final res = await apiProvider.addKeyboardPwd(lockId, keyboardPwdName,
|
||
keyboardPwd, keyboardPwdType, startDate, endDate, addType, pwdRight);
|
||
return PasswordKeyEntity.fromJson(res.body);
|
||
}
|
||
|
||
//自定义密码校验密码名称或密码是否已存在
|
||
Future<PasswordKeyEntity> checkKeyboardpwdName(
|
||
{required String lockId,
|
||
required String keyboardPwdName,
|
||
required String keyboardPwd}) async {
|
||
final res = await apiProvider.checkKeyboardpwdName(
|
||
lockId, keyboardPwdName, keyboardPwd);
|
||
return PasswordKeyEntity.fromJson(res.body);
|
||
}
|
||
|
||
//修改密码
|
||
Future<PasswordKeyEntity> updatePasswordKey(
|
||
{required int lockId,
|
||
required String keyboardPwdId,
|
||
required String keyboardPwdName,
|
||
required String newKeyboardPwd,
|
||
required int startDate,
|
||
required int endDate,
|
||
required String changeType,
|
||
required String isCoerced,
|
||
required int hoursStart,
|
||
required int hoursEnd,
|
||
required int keyboardPwdType,
|
||
required int pwdRight}) async {
|
||
final res = await apiProvider.updateKeyboardPwd(
|
||
lockId,
|
||
keyboardPwdId,
|
||
keyboardPwdName,
|
||
newKeyboardPwd,
|
||
startDate,
|
||
endDate,
|
||
changeType,
|
||
isCoerced,
|
||
hoursStart,
|
||
hoursEnd,
|
||
keyboardPwdType,
|
||
pwdRight);
|
||
return PasswordKeyEntity.fromJson(res.body);
|
||
}
|
||
|
||
//清空操作记录
|
||
Future<KeyOperationRecordEntity> clearOperationRecord(String lockId) async {
|
||
final res = await apiProvider.clearOperationRecord(lockId);
|
||
return KeyOperationRecordEntity.fromJson(res.body);
|
||
}
|
||
|
||
//创建锁分组
|
||
Future<MassSendLockGroupListEntity> addLockGroup(
|
||
String groupName, String operatorUid) async {
|
||
final res = await apiProvider.addLockGroup(groupName, operatorUid);
|
||
return MassSendLockGroupListEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 编辑锁名字
|
||
Future<MassSendLockGroupListEntity> editLockGroupRequest(
|
||
{required int groupId, required String groupName}) async {
|
||
final res = await apiProvider.editLockGroupRequest(groupId, groupName);
|
||
return MassSendLockGroupListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//设置锁分组
|
||
Future<MassSendLockGroupListEntity> setLockGroup(
|
||
String lockId, String groupId) async {
|
||
final res = await apiProvider.setLockGroup(lockId, groupId);
|
||
return MassSendLockGroupListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//锁分组列表
|
||
Future<MassSendLockGroupListEntity> lockGroupList(String type) async {
|
||
final res = await apiProvider.lockGroupList(type);
|
||
return MassSendLockGroupListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//删除锁分组
|
||
Future<MassSendLockGroupListEntity> deleteGroup(int groupId) async {
|
||
final res = await apiProvider.deleteGroup(groupId);
|
||
return MassSendLockGroupListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//锁分组里面添加锁
|
||
Future<MassSendLockGroupListEntity> lockGroupAddLock(
|
||
{required List lockIds, required int groupId}) async {
|
||
final res = await apiProvider.lockGroupAddLock(lockIds, groupId);
|
||
return MassSendLockGroupListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//锁分组里面删除锁
|
||
Future<MassSendLockGroupListEntity> lockGroupDeletLock(
|
||
{required List lockIds}) async {
|
||
final res = await apiProvider.lockGroupDeletLock(lockIds);
|
||
return MassSendLockGroupListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//选择锁列表
|
||
Future<SelectLockListEntity> selectLockList({String? searchStr}) async {
|
||
final res = await apiProvider.selectLockList(searchStr ?? '');
|
||
return SelectLockListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//APP开锁时需手机联网的锁
|
||
Future<SelectLockListEntity> setAppUnlockMustOnline(List lockIdList) async {
|
||
final res = await apiProvider.setAppUnlockMustOnline(lockIdList);
|
||
return SelectLockListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//删除电子钥匙
|
||
Future<ElectronicKeyListEntity> deleteElectronicKey(
|
||
{required String keyId, required int includeUnderlings}) async {
|
||
final res = await apiProvider.deleteElectronicKey(keyId, includeUnderlings);
|
||
return ElectronicKeyListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//删除授权管理员
|
||
Future<ElectronicKeyListEntity> deleteAdministrator(
|
||
String uid, String includeUnderlings) async {
|
||
final res = await apiProvider.deleteAdministrator(uid, includeUnderlings);
|
||
return ElectronicKeyListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//更新授权管理员
|
||
Future<AdministratorDetailEntity> updateAdministrator({
|
||
required String uid,
|
||
required String keyName,
|
||
required String endDate,
|
||
required String startDate,
|
||
required int isOnlyManageSelf,
|
||
required int keyType,
|
||
}) async {
|
||
final res = await apiProvider.updateAdministrator(
|
||
uid, keyName, endDate, startDate, isOnlyManageSelf, keyType);
|
||
return AdministratorDetailEntity.fromJson(res.body);
|
||
}
|
||
|
||
//设置授权管理员
|
||
Future<ElectronicKeyListEntity> setAdministrator(
|
||
{required String keyId}) async {
|
||
final res = await apiProvider.setAdministrator(keyId);
|
||
return ElectronicKeyListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//取消授权管理员
|
||
Future<ElectronicKeyListEntity> cancelAdministrator(
|
||
{required String keyId}) async {
|
||
final res = await apiProvider.cancelAdministrator(keyId);
|
||
return ElectronicKeyListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//冻结
|
||
Future<ElectronicKeyListEntity> freezeKey(
|
||
{required String keyId, required int includeUnderlings}) async {
|
||
final res = await apiProvider.freezeKey(keyId, includeUnderlings);
|
||
return ElectronicKeyListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//解除冻结
|
||
Future<ElectronicKeyListEntity> cancelFreeze({
|
||
required String keyId,
|
||
required int includeUnderlings,
|
||
}) async {
|
||
final res = await apiProvider.cancelFreeze(keyId, includeUnderlings);
|
||
return ElectronicKeyListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//即将到期的电子钥匙列表
|
||
Future<ExpireLockListEntity> expireLockList(
|
||
String pageNo, String pageSize) async {
|
||
final res = await apiProvider.expireLockList(pageNo, pageSize);
|
||
return ExpireLockListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//即将到期的密码列表
|
||
Future<ExpirePasswordEntity> expirePasswordList(
|
||
String pageNo, String pageSize) async {
|
||
final res = await apiProvider.expirePasswordList(pageNo, pageSize);
|
||
return ExpirePasswordEntity.fromJson(res.body);
|
||
}
|
||
|
||
//即将到期的卡列表
|
||
Future<ExpireCardEntity> expireCardList(
|
||
String pageNo, String pageSize) async {
|
||
final res = await apiProvider.expireCardList(pageNo, pageSize);
|
||
return ExpireCardEntity.fromJson(res.body);
|
||
}
|
||
|
||
//即将到期的指纹列表
|
||
Future<ExpireFingerprintEntity> expireFingerprintList(
|
||
String pageNo, String pageSize) async {
|
||
final res = await apiProvider.expireFingerprintList(pageNo, pageSize);
|
||
return ExpireFingerprintEntity.fromJson(res.body);
|
||
}
|
||
|
||
//即将到期的人脸列表
|
||
Future<ExpireFaceEntity> expireFaceList(
|
||
String pageNo, String pageSize) async {
|
||
final res = await apiProvider.expireFaceList(pageNo, pageSize);
|
||
return ExpireFaceEntity.fromJson(res.body);
|
||
}
|
||
|
||
//删除密码
|
||
Future<PasswordKeyEntity> deleteKeyboardPwd(
|
||
{required String lockId,
|
||
required String keyboardPwdId,
|
||
required int deleteType}) async {
|
||
final res =
|
||
await apiProvider.deleteKeyboardPwd(lockId, keyboardPwdId, deleteType);
|
||
return PasswordKeyEntity.fromJson(res.body);
|
||
}
|
||
|
||
// //分组列表
|
||
// Future<PasswordKeyEntity> keyGroupList111(String type) async {
|
||
// final res = await apiProvider.keyGroupList(type);
|
||
// return PasswordKeyEntity.fromJson(res.body);
|
||
// }
|
||
//
|
||
// //分组下的锁
|
||
// Future<PasswordKeyEntity> lockListByGroup111(
|
||
// String type, String keyGroupId) async {
|
||
// final res = await apiProvider.lockListByGroup(type, keyGroupId);
|
||
// return PasswordKeyEntity.fromJson(res.body);
|
||
// }
|
||
|
||
// 获取Wifi锁服务器
|
||
Future<ConfiguringWifiEntity> getWifiLockServiceIpAndPort() async {
|
||
final res = await apiProvider.getWifiLockServiceIpAndPort();
|
||
return ConfiguringWifiEntity.fromJson(res.body);
|
||
}
|
||
|
||
/// 锁设置模块
|
||
// 自动闭锁
|
||
Future<LoginEntity> setAutoUnlock({
|
||
required int lockId,
|
||
required int autoLock,
|
||
required int autoLockSecond,
|
||
}) async {
|
||
final res = await apiProvider.setAutoUnlockLoadData(
|
||
lockId, autoLock, autoLockSecond);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 更新网络信息 配网之后把网络信息提交到服务器保存
|
||
Future<LoginEntity> updateNetworkInfo({
|
||
required int lockId,
|
||
required String network,
|
||
}) async {
|
||
final res = await apiProvider.updateNetworkInfo(lockId, network);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 锁声音
|
||
Future<LoginEntity> setLockSound({
|
||
required int lockId,
|
||
required int lockSound,
|
||
required int lockSoundVolume,
|
||
}) async {
|
||
final res =
|
||
await apiProvider.setLockSoundData(lockId, lockSound, lockSoundVolume);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 防撬报警
|
||
Future<LoginEntity> setBurglarAlarmData({
|
||
required int lockId,
|
||
required int antiPrySwitch,
|
||
}) async {
|
||
final res = await apiProvider.setBurglarAlarmData(lockId, antiPrySwitch);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 远程开锁开/关
|
||
Future<LoginEntity> remoteUnlockingOpenOrClose({
|
||
required int lockId,
|
||
required int remoteUnlock,
|
||
}) async {
|
||
final res = await apiProvider.remoteUnlockingOpenOrCloseLoadData(
|
||
lockId, remoteUnlock);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 重置键
|
||
Future<LoginEntity> setResetButtonData({
|
||
required int lockId,
|
||
required int resetSwitch,
|
||
}) async {
|
||
final res = await apiProvider.setResetButtonData(lockId, resetSwitch);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置考勤
|
||
Future<LoginEntity> setCheckInData({
|
||
required int lockId,
|
||
required int attendance,
|
||
}) async {
|
||
final res = await apiProvider.setCheckInData(lockId, attendance);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置开锁时是否需联网
|
||
Future<LoginEntity> setOpenLockNeedOnlineData({
|
||
required int lockId,
|
||
required int appUnlockOnline,
|
||
}) async {
|
||
final res =
|
||
await apiProvider.setOpenLockNeedOnlineData(lockId, appUnlockOnline);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置开门方向
|
||
Future<LoginEntity> setOpenDoorDirectionData({
|
||
required int lockId,
|
||
required int openDirectionValue,
|
||
}) async {
|
||
final res =
|
||
await apiProvider.setOpenDoorDirectionData(lockId, openDirectionValue);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置房态
|
||
Future<LoginEntity> setRoomStatusData({
|
||
required int lockId,
|
||
required int roomStatus,
|
||
}) async {
|
||
final res = await apiProvider.setRoomStatusData(lockId, roomStatus);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 配置锁的常开模式
|
||
Future<LoginEntity> setNormallyModeData({
|
||
required int lockId,
|
||
required int passageMode,
|
||
required List passageModeConfig,
|
||
}) async {
|
||
final res = await apiProvider.setNormallyModeData(
|
||
lockId, passageMode, passageModeConfig);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 配置锁的常规设置
|
||
// Future<LoginEntity> setLockSetGeneralSettingData({
|
||
// required String lockId,
|
||
// required String changeType,
|
||
// required String isOn,
|
||
// required String type,
|
||
// }) async {
|
||
// final res = await apiProvider.setLockSetGeneralSetting(
|
||
// lockId, changeType, isOn, type);
|
||
// return LoginEntity.fromJson(res.body);
|
||
// }
|
||
|
||
// 获取锁时间 通过网关
|
||
Future<GetServerDatetimeEntity> getLockTimeFromGateway({
|
||
required String lockId,
|
||
}) async {
|
||
final res = await apiProvider.getLockTimeFromGatewayLoadData(lockId);
|
||
return GetServerDatetimeEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置管理员密码
|
||
Future<GetServerDatetimeEntity> setAdminPasswordData({
|
||
required int lockId,
|
||
required String adminPwd,
|
||
}) async {
|
||
final res = await apiProvider.setAdminPasswordData(lockId, adminPwd);
|
||
return GetServerDatetimeEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取服务器当前时间
|
||
Future<GetServerDatetimeEntity> getServerDatetimeData(
|
||
{bool? isUnShowLoading}) async {
|
||
final res =
|
||
await apiProvider.getServerDatetimeLoadData(isUnShowLoading ?? true);
|
||
return GetServerDatetimeEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 锁诊断上传数据
|
||
Future<LoginEntity> setLockDiagnoseData({
|
||
required String lockId,
|
||
required String electricQuantity,
|
||
required String firmwareRevision,
|
||
required String hardwareRevision,
|
||
required String lockDate,
|
||
required String modelNum,
|
||
required String pwdInfo,
|
||
required String timestamp,
|
||
}) async {
|
||
final res = await apiProvider.setLockDiagnoseData(
|
||
lockId,
|
||
electricQuantity,
|
||
firmwareRevision,
|
||
hardwareRevision,
|
||
lockDate,
|
||
modelNum,
|
||
pwdInfo,
|
||
timestamp);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取锁版本信息
|
||
Future<GetServerDatetimeEntity> getLockVersionInfoData({
|
||
required String lockId,
|
||
}) async {
|
||
final res = await apiProvider.getLockVersionInfoLoadData(lockId);
|
||
return GetServerDatetimeEntity.fromJson(res.body);
|
||
}
|
||
|
||
//分组下的锁列表
|
||
Future<MassSendLockGroupListEntity> listLockByGroup(
|
||
String type, String keyGroupId) async {
|
||
final res = await apiProvider.listLockByGroup(type, keyGroupId);
|
||
return MassSendLockGroupListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//获取单把钥匙详情信息
|
||
Future<KeyDetailEntity> getKeyDetail(String lockId) async {
|
||
final res = await apiProvider.getKeyDetail(lockId);
|
||
return KeyDetailEntity.fromJson(res.body);
|
||
}
|
||
|
||
//锁用户列表
|
||
Future<LockUserListEntity> lockUserList(
|
||
String pageNo, String pageSize, String searchStr) async {
|
||
final res = await apiProvider.lockUserList(pageNo, pageSize, searchStr);
|
||
return LockUserListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//锁用户列表
|
||
Future<LoginEntity> deletLockUser(int uid) async {
|
||
final res = await apiProvider.deletLockUser(uid);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
//用户拥有的钥匙
|
||
Future<KeyListByUserEntity> keyListByUser(
|
||
String pageNo, String pageSize, String uid) async {
|
||
final res = await apiProvider.keyListByUser(pageNo, pageSize, uid);
|
||
return KeyListByUserEntity.fromJson(res.body);
|
||
}
|
||
|
||
//群发电子钥匙检查
|
||
Future<KeyDetailEntity> canSendKey(String endDate, List lockIdList) async {
|
||
final res = await apiProvider.canSendKey(endDate, lockIdList);
|
||
return KeyDetailEntity.fromJson(res.body);
|
||
}
|
||
|
||
//群发电子钥匙
|
||
Future<KeyDetailEntity> batchSendKey(
|
||
{required List lockIds,
|
||
required int createUser,
|
||
required String countryCode,
|
||
required String receiverUsername,
|
||
required String keyName,
|
||
required int keyType,
|
||
required List weekDays,
|
||
required int startDate,
|
||
required int endDate,
|
||
required int startTime,
|
||
required int endTime,
|
||
required int remoteUnlockSwitch,
|
||
required int keyRight,
|
||
required bool isShowNetworkErrorMsg}) async {
|
||
final res = await apiProvider.batchSendKey(
|
||
lockIds,
|
||
createUser,
|
||
countryCode,
|
||
receiverUsername,
|
||
keyName,
|
||
keyType,
|
||
weekDays,
|
||
startDate,
|
||
endDate,
|
||
startTime,
|
||
endTime,
|
||
remoteUnlockSwitch,
|
||
keyRight,
|
||
isShowNetworkErrorMsg);
|
||
return KeyDetailEntity.fromJson(res.body);
|
||
}
|
||
|
||
//增加授权管理员
|
||
Future<KeyDetailEntity> addAuthorizedAdmin(
|
||
{required String createUser,
|
||
required String endDate,
|
||
required String isRemoteUnlock,
|
||
required List keyGroupIdList,
|
||
required List lockIdList,
|
||
required String name,
|
||
required String startDate,
|
||
required String userid,
|
||
required String countryCode,
|
||
required String usernameType,
|
||
required int isOnlyManageSelf}) async {
|
||
final res = await apiProvider.addAuthorizedAdmin(
|
||
createUser,
|
||
endDate,
|
||
isRemoteUnlock,
|
||
keyGroupIdList,
|
||
lockIdList,
|
||
name,
|
||
startDate,
|
||
userid,
|
||
countryCode,
|
||
usernameType,
|
||
isOnlyManageSelf);
|
||
return KeyDetailEntity.fromJson(res.body);
|
||
}
|
||
|
||
//授权管理员列表
|
||
Future<AuthorizedAdminListEntity> authorizedAdminList(
|
||
String pageNo, String pageSize) async {
|
||
final res = await apiProvider.authorizedAdminList(pageNo, pageSize);
|
||
return AuthorizedAdminListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//授权管理员详情
|
||
Future<AdministratorDetailEntity> authorizedAdminDetail(int uid) async {
|
||
final res = await apiProvider.authorizedAdminDetail(uid);
|
||
return AdministratorDetailEntity.fromJson(res.body);
|
||
}
|
||
|
||
//获取授权管理员下锁列表
|
||
Future<AdministratorAssociationLockEntity> administratorOwnLockList(
|
||
{required int uid}) async {
|
||
final res = await apiProvider.administratorOwnLockList(uid);
|
||
return AdministratorAssociationLockEntity.fromJson(res.body);
|
||
}
|
||
|
||
//删除授权管理员
|
||
Future<AuthorizedAdminListEntity> deleteAuthorizedAdmin(
|
||
String uid, String includeUnderlings) async {
|
||
final res = await apiProvider.deleteAuthorizedAdmin(uid, includeUnderlings);
|
||
return AuthorizedAdminListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//更新授权管理员
|
||
Future<AuthorizedAdminListEntity> updateAuthorizedAdmin(
|
||
String uid,
|
||
String name,
|
||
String endDate,
|
||
String startDate,
|
||
String isRemoteUnlock) async {
|
||
final res = await apiProvider.updateAuthorizedAdmin(
|
||
uid, name, endDate, startDate, isRemoteUnlock);
|
||
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> setTouchUnlockFlag(String isOn) async {
|
||
final res = await apiProvider.setTouchUnlockFlag(isOn);
|
||
return ExpireLockListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//触摸开锁
|
||
Future<ExpireLockListEntity> changeSettings(String isOn, String type) async {
|
||
final res = await apiProvider.changeSettings(isOn, type);
|
||
return ExpireLockListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//个人设置信息
|
||
Future<UserSettingInfoEntity> userSettingsInfo() async {
|
||
final res = await apiProvider.userSettingsInfo();
|
||
return UserSettingInfoEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 开启考勤 获取考勤信息
|
||
Future<CheckingInInfoDataEntity> openCheckingInData(
|
||
{required String lockId}) async {
|
||
final res = await apiProvider.openCheckingInGetData(lockId);
|
||
return CheckingInInfoDataEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置考勤时创建公司
|
||
Future<LoginEntity> setCheckInCreateCompanyData(
|
||
{required String lockId,
|
||
required String attendanceType,
|
||
required String companyName,
|
||
required List workDay,
|
||
required String workEndTime,
|
||
required String workStartTime}) async {
|
||
final res = await apiProvider.setCheckInCreateCompanyData(lockId,
|
||
attendanceType, companyName, workDay, workEndTime, workStartTime);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 删除公司
|
||
Future<CheckingInInfoDataEntity> deletCompanyData(
|
||
{required int companyId}) async {
|
||
final res = await apiProvider.deletCompanyData(companyId);
|
||
return CheckingInInfoDataEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置锁开锁提醒
|
||
Future<LoginEntity> setLockPickingReminderData({
|
||
required int lockId,
|
||
required int unlockReminder,
|
||
}) async {
|
||
final res =
|
||
await apiProvider.setLockPickingReminderData(lockId, unlockReminder);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取考勤列表 - 早到榜日榜
|
||
Future<CheckingInListDayEntity> getCheckInListEarlyArrivalWithDateData({
|
||
required String companyId,
|
||
required String attendanceDate,
|
||
}) async {
|
||
final res = await apiProvider.getCheckInListEarlyArrivalWithDateData(
|
||
companyId, attendanceDate);
|
||
return CheckingInListDayEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取考勤列表 - 早到榜月榜
|
||
Future<CheckingInListMonthEntity> getCheckInListEarlyArrivalWithMonthData({
|
||
required String companyId,
|
||
required String attendanceDate,
|
||
}) async {
|
||
final res = await apiProvider.getCheckInListEarlyArrivalWithMonthData(
|
||
companyId, attendanceDate);
|
||
return CheckingInListMonthEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取考勤列表 - 迟到榜日榜
|
||
Future<CheckingInListDayEntity> getCheckInListLateTimesWithDateData({
|
||
required String companyId,
|
||
required String attendanceDate,
|
||
}) async {
|
||
final res = await apiProvider.getCheckInListLateTimesWithDateData(
|
||
companyId, attendanceDate);
|
||
return CheckingInListDayEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取考勤列表 - 迟到榜月榜
|
||
Future<CheckingInListMonthEntity> getCheckInListLateTimesWithMonthData({
|
||
required String companyId,
|
||
required String attendanceDate,
|
||
}) async {
|
||
final res = await apiProvider.getCheckInListLateTimesWithMonthData(
|
||
companyId, attendanceDate);
|
||
return CheckingInListMonthEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取考勤列表 - 勤奋榜
|
||
Future<CheckingInListMonthEntity> getCheckInListHardworkingData({
|
||
required String companyId,
|
||
required String attendanceDate,
|
||
required String type,
|
||
}) async {
|
||
final res = await apiProvider.getCheckInListHardworkingData(
|
||
companyId, attendanceDate, type);
|
||
return CheckingInListMonthEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取考勤详情
|
||
Future<CheckingInDetailEntity> getCheckInDetailData({
|
||
required String companyId,
|
||
required String attendanceDate,
|
||
required String staffId,
|
||
}) async {
|
||
final res = await apiProvider.getCheckInDetailData(
|
||
companyId, attendanceDate, staffId);
|
||
return CheckingInDetailEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取员工列表
|
||
Future<CheckingInAddStaffListEntity> getStaffListData({
|
||
required String companyId,
|
||
required String lockId,
|
||
}) async {
|
||
final res = await apiProvider.getStaffListData(companyId, lockId);
|
||
return CheckingInAddStaffListEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 删除员工
|
||
Future<LoginEntity> deletStaffData(
|
||
{required int lockId,
|
||
required int staffId,
|
||
required int deleteKey}) async {
|
||
final res = await apiProvider.deletStaffData(lockId, staffId, deleteKey);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 添加员工
|
||
Future<LoginEntity> addStaffData({
|
||
required String attendanceType,
|
||
required String attendanceWay,
|
||
required String companyId,
|
||
required String have,
|
||
required String staffName,
|
||
required String countryCode,
|
||
required String usernameType,
|
||
}) async {
|
||
final res = await apiProvider.addStaffData(attendanceType, attendanceWay,
|
||
companyId, have, staffName, countryCode, usernameType);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 编辑员工
|
||
Future<LoginEntity> editStaffData({
|
||
required String attendanceType,
|
||
required String attendanceWay,
|
||
required String staffId,
|
||
required String have,
|
||
required String staffName,
|
||
required String countryCode,
|
||
required String usernameType,
|
||
}) async {
|
||
final res = await apiProvider.editStaffData(attendanceType, attendanceWay,
|
||
staffId, have, staffName, countryCode, usernameType);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 添加员工选择钥匙
|
||
Future<CheckingInAddStaffSelectKeyEntity> addStaffSelectKeyData({
|
||
required String companyId,
|
||
required String type,
|
||
}) async {
|
||
final res = await apiProvider.addStaffSelectKeyData(companyId, type);
|
||
return CheckingInAddStaffSelectKeyEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 添加假期
|
||
Future<LoginEntity> addHolidaysData({
|
||
required String companyId,
|
||
required String fillClassDate,
|
||
required String vacationEndDate,
|
||
required String vacationName,
|
||
required String vacationStartDate,
|
||
}) async {
|
||
final res = await apiProvider.addHolidaysData(companyId, fillClassDate,
|
||
vacationEndDate, vacationName, vacationStartDate);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 假期列表
|
||
Future<CheckingInSetHolidaysInfoDataEntity> holidaysListData({
|
||
required String companyId,
|
||
required String vacationYear,
|
||
}) async {
|
||
final res = await apiProvider.holidaysListData(companyId, vacationYear);
|
||
return CheckingInSetHolidaysInfoDataEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 删除假期
|
||
Future<LoginEntity> deletHolidaysData({required String vacationId}) async {
|
||
final res = await apiProvider.deletHolidaysData(vacationId);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取考勤设置信息
|
||
Future<CheckingInSetEntity> getCheckInSetInfoData({
|
||
required String companyId,
|
||
}) async {
|
||
final res = await apiProvider.getCheckInSetInfoData(companyId);
|
||
return CheckingInSetEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 修改考勤设置信息
|
||
Future<LoginEntity> editCheckInSetInfoData({
|
||
required String attendanceType,
|
||
required String companyId,
|
||
required String type,
|
||
required String companyName,
|
||
required String workEndTime,
|
||
required String workStartTime,
|
||
required List<int> workDay,
|
||
}) async {
|
||
final res = await apiProvider.editCheckInSetInfoData(attendanceType,
|
||
companyId, type, companyName, workEndTime, workStartTime, workDay);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取指纹列表
|
||
Future<FingerprintListDataEntity> getFingerprintsListData({
|
||
required String lockId,
|
||
required String pageNo,
|
||
required String pageSize,
|
||
required String searchStr,
|
||
}) async {
|
||
final res = await apiProvider.getFingerprintsListData(
|
||
lockId, pageNo, pageSize, searchStr);
|
||
return FingerprintListDataEntity.fromJson(res.body);
|
||
}
|
||
|
||
//指纹获取
|
||
Future<FingerprintEntity> getFingerprintsData(int fingerprintId) async {
|
||
final res = await apiProvider.getFingerprintsData(fingerprintId);
|
||
return FingerprintEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 添加指纹
|
||
Future<AddFingerprintEntity> addFingerprintsData({
|
||
required String lockId,
|
||
required String endDate,
|
||
required String addType,
|
||
required String fingerprintName,
|
||
required String fingerprintNumber,
|
||
required String fingerprintType,
|
||
required String isCoerced,
|
||
required String startDate,
|
||
required List weekDay,
|
||
required int fingerRight,
|
||
required int startTime,
|
||
required int endTime,
|
||
}) async {
|
||
final res = await apiProvider.addFingerprintsData(
|
||
lockId,
|
||
endDate,
|
||
addType,
|
||
fingerprintName,
|
||
fingerprintNumber,
|
||
fingerprintType,
|
||
isCoerced,
|
||
startDate,
|
||
weekDay,
|
||
fingerRight,
|
||
startTime,
|
||
endTime);
|
||
return AddFingerprintEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 编辑指纹
|
||
Future<LoginEntity> editFingerprintsData(
|
||
{required String fingerprintId,
|
||
required String lockId,
|
||
required List weekDay,
|
||
required String startDate,
|
||
required String endDate,
|
||
required String isCoerced,
|
||
required String fingerprintName,
|
||
required String changeType,
|
||
required int startTime,
|
||
required int endTime,
|
||
required int fingerprintType,
|
||
required int fingerRight}) async {
|
||
final res = await apiProvider.editFingerprintsData(
|
||
fingerprintId,
|
||
lockId,
|
||
weekDay,
|
||
startDate,
|
||
endDate,
|
||
isCoerced,
|
||
fingerprintName,
|
||
changeType,
|
||
startTime,
|
||
endTime,
|
||
fingerprintType,
|
||
fingerRight);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 删除指纹
|
||
Future<LoginEntity> deletFingerprintsData(
|
||
{required String fingerprintId,
|
||
required String lockId,
|
||
required String type,
|
||
required String deleteType}) async {
|
||
final res = await apiProvider.deletFingerprintsData(
|
||
fingerprintId, lockId, type, deleteType);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 更新指纹用户序号
|
||
Future<LoginEntity> updateFingerprintUserNoLoadData(
|
||
{required String fingerprintId,
|
||
required String lockId,
|
||
required String fingerprintUserNo}) async {
|
||
final res = await apiProvider.updateFingerprintUserNoLoadData(
|
||
fingerprintId, lockId, fingerprintUserNo);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 校验指纹名字是否重复
|
||
Future<LoginEntity> checkFingerprintNameDuplicatedData(
|
||
{required String lockId, required String fingerprintName}) async {
|
||
final res = await apiProvider.checkFingerprintNameDuplicatedData(
|
||
lockId, fingerprintName);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取人脸列表
|
||
Future<FingerprintListDataEntity> getFaceListData({
|
||
required String lockId,
|
||
required String pageNo,
|
||
required String pageSize,
|
||
required String searchStr,
|
||
}) async {
|
||
final res =
|
||
await apiProvider.getFaceListData(lockId, pageNo, pageSize, searchStr);
|
||
return FingerprintListDataEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 添加人脸
|
||
Future<AddFaceEntity> addFaceData(
|
||
{required int lockId,
|
||
required String faceName,
|
||
required String faceNumber,
|
||
required int faceType,
|
||
required int startDate,
|
||
required int endDate,
|
||
required String featureData,
|
||
required String addType,
|
||
required List weekDay,
|
||
required int startTime,
|
||
required int endTime,
|
||
required int faceRight}) async {
|
||
final res = await apiProvider.addFaceData(
|
||
lockId,
|
||
faceName,
|
||
faceNumber,
|
||
faceType,
|
||
startDate,
|
||
endDate,
|
||
featureData,
|
||
addType,
|
||
weekDay,
|
||
startTime,
|
||
endTime,
|
||
faceRight);
|
||
return AddFaceEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 校验人脸名字是否重复
|
||
Future<LoginEntity> checkFaceNameDuplicatedData(
|
||
{required String lockId, required String faceName}) async {
|
||
final res = await apiProvider.checkFaceNameDuplicatedData(lockId, faceName);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 更新人脸用户序号
|
||
Future<LoginEntity> updateFaceUserNo(
|
||
{required int faceId,
|
||
required int lockId,
|
||
required String faceUserNo}) async {
|
||
final res = await apiProvider.updateFaceUserNo(faceId, lockId, faceUserNo);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 更新人脸用户信息--人脸名称
|
||
Future<LoginEntity> updateFaceName(
|
||
{required int faceId,
|
||
required int lockId,
|
||
required String faceName}) async {
|
||
final res = await apiProvider.updateFaceName(faceId, lockId, faceName);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 更新人脸用户信息--有效期
|
||
Future<LoginEntity> updateFaceValidity(
|
||
{required int faceId,
|
||
required int lockId,
|
||
required int startDate,
|
||
required int endDate,
|
||
required int startTime,
|
||
required int endTime,
|
||
required int faceType,
|
||
required List weekDay,
|
||
required String faceName,
|
||
required String addType,
|
||
required int isCoerced,
|
||
required int faceRight}) async {
|
||
final res = await apiProvider.updateFaceValidity(
|
||
faceId,
|
||
lockId,
|
||
startDate,
|
||
endDate,
|
||
startTime,
|
||
endTime,
|
||
faceType,
|
||
weekDay,
|
||
faceName,
|
||
addType,
|
||
isCoerced,
|
||
faceRight);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 删除人脸
|
||
Future<LoginEntity> deleteFaceData({
|
||
required int faceId,
|
||
required int lockId,
|
||
}) async {
|
||
final res = await apiProvider.deleteFaceData(faceId, lockId);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 清空人脸
|
||
Future<LoginEntity> clearFaceData({
|
||
required int lockId,
|
||
}) async {
|
||
final res = await apiProvider.clearFaceData(lockId);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取商城跳转地址
|
||
Future<LockMallDataEntity> getMallURLData() async {
|
||
final res = await apiProvider.getMallURLData();
|
||
return LockMallDataEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取Ic卡列表
|
||
Future<FingerprintListDataEntity> getICCardListData({
|
||
required String lockId,
|
||
required String pageNo,
|
||
required String pageSize,
|
||
required String searchStr,
|
||
}) async {
|
||
final res = await apiProvider.getICCardListData(
|
||
lockId, pageNo, pageSize, searchStr);
|
||
return FingerprintListDataEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 添加ID卡
|
||
Future<AddICCardEntity> addICCardData({
|
||
required String lockId,
|
||
required String endDate,
|
||
required String cardName,
|
||
required String cardNumber,
|
||
required int cardType,
|
||
required String addType,
|
||
required String startDate,
|
||
required String isCoerced,
|
||
required List weekDay,
|
||
required int startTime,
|
||
required int endTime,
|
||
required int cardRight,
|
||
}) async {
|
||
final res = await apiProvider.addICCardData(
|
||
lockId,
|
||
endDate,
|
||
cardName,
|
||
cardNumber,
|
||
cardType,
|
||
addType,
|
||
startDate,
|
||
isCoerced,
|
||
weekDay,
|
||
startTime,
|
||
endTime,
|
||
cardRight);
|
||
return AddICCardEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 编辑IC卡
|
||
Future<LoginEntity> editICCardData({
|
||
required String lockId,
|
||
required String cardId,
|
||
required String cardName,
|
||
required String startDate,
|
||
required String endDate,
|
||
required String isCoerced,
|
||
required List weekDay,
|
||
required String changeType,
|
||
required int startTime,
|
||
required int endTime,
|
||
required int cardType,
|
||
required int cardRight,
|
||
}) async {
|
||
final res = await apiProvider.editICCardData(
|
||
lockId,
|
||
cardId,
|
||
cardName,
|
||
startDate,
|
||
endDate,
|
||
isCoerced,
|
||
weekDay,
|
||
changeType,
|
||
startTime,
|
||
endTime,
|
||
cardType,
|
||
cardRight);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 删除ic卡
|
||
Future<LoginEntity> deletIcCardData(
|
||
{required String cardId,
|
||
required String lockId,
|
||
required String type,
|
||
required String deleteType}) async {
|
||
final res =
|
||
await apiProvider.deletIcCardData(cardId, lockId, type, deleteType);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 更新ICCard用户序号
|
||
Future<LoginEntity> updateIdCardUserNoLoadData(
|
||
{required String lockId,
|
||
required String cardId,
|
||
required String cardUserNo}) async {
|
||
final res = await apiProvider.updateIdCardUserNoLoadData(
|
||
lockId, cardId, cardUserNo);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 校验卡名字是否重复
|
||
Future<LoginEntity> checkCardNameDuplicatedData(
|
||
{required String lockId, required String cardName}) async {
|
||
final res = await apiProvider.checkCardNameDuplicatedData(lockId, cardName);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取遥控列表
|
||
Future<FingerprintListDataEntity> getRemoteControlListData({
|
||
required String lockId,
|
||
required String pageNo,
|
||
required String pageSize,
|
||
required String searchStr,
|
||
}) async {
|
||
final res = await apiProvider.getRemoteControlListData(
|
||
lockId, pageNo, pageSize, searchStr);
|
||
return FingerprintListDataEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 添加遥控
|
||
Future<AddRemoteControlEntity> addRemoteControlData({
|
||
required String lockId,
|
||
required String remoteName,
|
||
required String remoteNumber,
|
||
required int remoteType,
|
||
required int startDate,
|
||
required int endDate,
|
||
required int addType,
|
||
required List weekDay,
|
||
required int startTime,
|
||
required int endTime,
|
||
required int remoteRight,
|
||
}) async {
|
||
final res = await apiProvider.addRemoteControlData(
|
||
lockId,
|
||
remoteName,
|
||
remoteNumber,
|
||
remoteType,
|
||
startDate,
|
||
endDate,
|
||
addType,
|
||
weekDay,
|
||
startTime,
|
||
endTime,
|
||
remoteRight);
|
||
return AddRemoteControlEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 更新ICCard用户序号
|
||
Future<LoginEntity> updateRemoteUserNoLoadData(
|
||
{required int lockId,
|
||
required int remoteId,
|
||
required String remoteUserNo}) async {
|
||
final res = await apiProvider.updateRemoteUserNoLoadData(
|
||
lockId, remoteId, remoteUserNo);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 编辑遥控
|
||
Future<LoginEntity> editRemoteControlData({
|
||
required int lockId,
|
||
required int remoteId,
|
||
required int startDate,
|
||
required int endDate,
|
||
required int startTime,
|
||
required int endTime,
|
||
required int remoteType,
|
||
required List weekDay,
|
||
required String remoteName,
|
||
required int addType,
|
||
required int isCoerced,
|
||
required int remoteRight,
|
||
}) async {
|
||
final res = await apiProvider.editRemoteControlData(
|
||
lockId,
|
||
remoteId,
|
||
startDate,
|
||
endDate,
|
||
startTime,
|
||
endTime,
|
||
remoteType,
|
||
weekDay,
|
||
remoteName,
|
||
addType,
|
||
isCoerced,
|
||
remoteRight);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 删除遥控
|
||
Future<LoginEntity> deletRemoteControlData({required int remoteId}) async {
|
||
final res = await apiProvider.deletRemoteControlData(remoteId);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 重置遥控
|
||
Future<LoginEntity> resetRemoteControlData({required int lockId}) async {
|
||
final res = await apiProvider.resetRemoteControlData(lockId);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 校验遥控名字是否重复
|
||
Future<LoginEntity> checkRemoteControlNameDuplicatedData(
|
||
{required String lockId, required String remoteName}) async {
|
||
final res = await apiProvider.checkRemoteControlNameDuplicatedData(
|
||
lockId, remoteName);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取掌静脉列表
|
||
Future<FingerprintListDataEntity> getPalmListData({
|
||
required String lockId,
|
||
required String pageNo,
|
||
required String pageSize,
|
||
required String searchStr,
|
||
}) async {
|
||
final res =
|
||
await apiProvider.getPalmListData(lockId, pageNo, pageSize, searchStr);
|
||
return FingerprintListDataEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 添加掌静脉
|
||
Future<AddPalmEntity> addPalmData({
|
||
required String lockId,
|
||
required String palmVeinName,
|
||
required String palmVeinNumber,
|
||
required int palmVeinType,
|
||
required int startDate,
|
||
required int endDate,
|
||
required int addType,
|
||
required List weekDay,
|
||
required int startTime,
|
||
required int endTime,
|
||
required int palmVeinRight,
|
||
}) async {
|
||
final res = await apiProvider.addPalmData(
|
||
lockId,
|
||
palmVeinName,
|
||
palmVeinNumber,
|
||
palmVeinType,
|
||
startDate,
|
||
endDate,
|
||
addType,
|
||
weekDay,
|
||
startTime,
|
||
endTime,
|
||
palmVeinRight);
|
||
return AddPalmEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 更新掌静脉用户序号
|
||
Future<LoginEntity> updatePalmUserNoLoadData(
|
||
{required int lockId,
|
||
required int palmVeinId,
|
||
required String palmVeinUserNo}) async {
|
||
final res = await apiProvider.updatePalmUserNoLoadData(
|
||
lockId, palmVeinId, palmVeinUserNo);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 编辑掌静脉
|
||
Future<LoginEntity> editPalmData({
|
||
required int lockId,
|
||
required int palmVeinId,
|
||
required int startDate,
|
||
required int endDate,
|
||
required int startTime,
|
||
required int endTime,
|
||
required int palmVeinType,
|
||
required List weekDay,
|
||
required String palmVeinName,
|
||
required int addType,
|
||
required int isCoerced,
|
||
required int palmVeinRight,
|
||
}) async {
|
||
final res = await apiProvider.editPalmData(
|
||
lockId,
|
||
palmVeinId,
|
||
startDate,
|
||
endDate,
|
||
startTime,
|
||
endTime,
|
||
palmVeinType,
|
||
weekDay,
|
||
palmVeinName,
|
||
addType,
|
||
isCoerced,
|
||
palmVeinRight);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 删除掌静脉
|
||
Future<LoginEntity> deletPalmData({required int palmVeinId}) async {
|
||
final res = await apiProvider.deletPalmData(palmVeinId);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 重置掌静脉
|
||
Future<LoginEntity> resetPalmData({required int lockId}) async {
|
||
final res = await apiProvider.resetPalmData(lockId);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 校验掌静脉名字是否重复
|
||
Future<LoginEntity> checkPalmNameDuplicatedData(
|
||
{required String lockId, required String palmVeinName}) async {
|
||
final res =
|
||
await apiProvider.checkPalmNameDuplicatedData(lockId, palmVeinName);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 退出登录
|
||
Future<LoginEntity> userLogout({required String deviceld}) async {
|
||
final res = await apiProvider.userLogout(deviceld);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取转移锁锁列表
|
||
Future<TransferSmartLockEntity> getTransferLockListData(
|
||
{required String searchStr}) async {
|
||
final res = await apiProvider.getTransferLockListData(searchStr);
|
||
return TransferSmartLockEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 转移智能锁确认
|
||
Future<RecipientInformationEntity> transferLockConfirmInfoData(
|
||
{required String receiverUsername,
|
||
required String type,
|
||
required String countryCode}) async {
|
||
final res = await apiProvider.transferLockConfirmInfoData(
|
||
receiverUsername, type, countryCode);
|
||
return RecipientInformationEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 转移智能锁
|
||
Future<RecipientInformationEntity> transferLockInfoData(
|
||
{required String receiverUsername,
|
||
required List lockIdList,
|
||
required String countryCode}) async {
|
||
final res = await apiProvider.transferLockInfoData(
|
||
receiverUsername, lockIdList, countryCode);
|
||
return RecipientInformationEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取网关列表
|
||
Future<GetewayDataEntity> getGatewayListData(
|
||
{required String pageNo, required String pageSize}) async {
|
||
final res = await apiProvider.getGatewayListData(pageNo, pageSize);
|
||
return GetewayDataEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 添加网关
|
||
Future<LoginEntity> gatewayDistributionNetwork({
|
||
required String gatewayName,
|
||
required String gatewayMac,
|
||
required String serialNumber,
|
||
required int gatewayType,
|
||
required String networkName,
|
||
required String networkMac,
|
||
required String version,
|
||
required Map gatewayJson,
|
||
}) async {
|
||
final res = await apiProvider.addGatewayNetwork(
|
||
gatewayName,
|
||
gatewayMac,
|
||
serialNumber,
|
||
gatewayType,
|
||
networkName,
|
||
networkMac,
|
||
version,
|
||
gatewayJson);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 删除网关
|
||
Future<LoginEntity> gatewayDelet({
|
||
required int gatewayId,
|
||
}) async {
|
||
final res = await apiProvider.deletGateway(gatewayId);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 网关更新
|
||
Future<LoginEntity> gatewayUpdate({
|
||
required int gatewayId,
|
||
required String gatewayName,
|
||
}) async {
|
||
final res = await apiProvider.gatewayUpdate(gatewayId, gatewayName);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 转移网关确认
|
||
Future<RecipientInformationEntity> transferGatewayConfirmInfoData(
|
||
{required String receiverUsername,
|
||
required String type,
|
||
required String countryCode}) async {
|
||
final res = await apiProvider.transferGatewayConfirmInfoData(
|
||
receiverUsername, type, countryCode);
|
||
return RecipientInformationEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 网关-附近的锁
|
||
Future<GatewayConnectionLockListEntity> gatewayConnectionLockLoadData(
|
||
{required int gatewayId}) async {
|
||
final res = await apiProvider.gatewayConnectionLockListLoadData(gatewayId);
|
||
return GatewayConnectionLockListEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 远程开锁
|
||
Future<LoginEntity> remoteOpenLock({required String lockId}) async {
|
||
final res = await apiProvider.remoteOpenLock(lockId);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 转移智能锁
|
||
Future<RecipientInformationEntity> transferGatewayInfoData(
|
||
{required String receiverUsername,
|
||
required List plugIdList,
|
||
required String countryCode}) async {
|
||
final res = await apiProvider.transferGatewayInfoData(
|
||
receiverUsername, plugIdList, countryCode);
|
||
return RecipientInformationEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取网关配置
|
||
Future<GetGatewayConfigurationEntity> getGatewayConfiguration() async {
|
||
final res = await apiProvider.getGatewayConfiguration();
|
||
return GetGatewayConfigurationEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 移除坏锁
|
||
Future<RecipientInformationEntity> removeBrokenLockData(
|
||
{required List lockIdList}) async {
|
||
final res = await apiProvider.removeBrokenLockData(lockIdList);
|
||
return RecipientInformationEntity.fromJson(res.body);
|
||
}
|
||
|
||
//删除账号
|
||
Future<LoginEntity> deleteAccount(
|
||
String channel, String verificationCode) async {
|
||
final res = await apiProvider.deleteAccount(channel, verificationCode);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
//获取个人信息
|
||
Future<MinePersonInfoEntity> getUserInfo() async {
|
||
final res = await apiProvider.getUserInfo("");
|
||
return MinePersonInfoEntity.fromJson(res.body);
|
||
}
|
||
|
||
//重置密码钥匙
|
||
Future<PasswordKeyListEntity> keyboardPwdReset(
|
||
{required String lockId, required List passwordKey}) async {
|
||
final res = await apiProvider.keyboardPwdReset(lockId, passwordKey);
|
||
return PasswordKeyListEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 发送验证码 2、登陆后可使用 sendValidationCodeAuth 接口,免图片滑动验证 5删除账号
|
||
Future<SendValidationCodeEntity> sendValidationCodeAuth(
|
||
{required String countryCode,
|
||
required String account,
|
||
required String channel,
|
||
required String codeType,
|
||
required String xWidth}) async {
|
||
final res = await apiProvider.sendValidationCodeAuth(
|
||
countryCode, account, channel, codeType, xWidth);
|
||
return SendValidationCodeEntity.fromJson(res.body);
|
||
}
|
||
|
||
//更新个人信息-昵称
|
||
Future<PasswordKeyListEntity> updateUserNameInfo({
|
||
required String nickname,
|
||
}) async {
|
||
final res = await apiProvider.updateUserNameInfo(nickname);
|
||
return PasswordKeyListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//更新个人信息-头像
|
||
Future<PasswordKeyListEntity> updateUserHeadUrlInfo(
|
||
{required String headUrl}) async {
|
||
final res = await apiProvider.updateUserHeadUrlInfo(headUrl);
|
||
return PasswordKeyListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//更新个人信息-是否打开amazon alexa 0否 1是
|
||
Future<PasswordKeyListEntity> updateUserInfoWithAlexa({
|
||
required int isAlexa,
|
||
}) async {
|
||
final res = await apiProvider.updateUserInfoWithAlexa(isAlexa);
|
||
return PasswordKeyListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//更新个人信息-是否打开google home 0否 1是
|
||
Future<PasswordKeyListEntity> updateUserInfoWithGoogle({
|
||
required int isGoogle,
|
||
}) async {
|
||
final res = await apiProvider.updateUserInfoWithGoogle(isGoogle);
|
||
return PasswordKeyListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//更新个人信息-国际化
|
||
Future<PasswordKeyListEntity> updateUserLangInfo(
|
||
{required String lang}) async {
|
||
final res = await apiProvider.updateUserLangInfo(lang);
|
||
return PasswordKeyListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//修改绑定手机号
|
||
Future<PasswordKeyListEntity> bindPhone(String countryCode, String account,
|
||
String verificationCode, String unbindToken) async {
|
||
final res = await apiProvider.bindPhone(
|
||
countryCode, account, verificationCode, unbindToken);
|
||
return PasswordKeyListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//修改绑定邮箱
|
||
Future<PasswordKeyListEntity> bindEmail(
|
||
String email, String verificationCode, String unbindToken) async {
|
||
final res =
|
||
await apiProvider.bindEmail(email, verificationCode, unbindToken);
|
||
return PasswordKeyListEntity.fromJson(res.body);
|
||
}
|
||
|
||
//重置密码
|
||
Future<LoginEntity> changePassword(
|
||
String date, String newPassword, String oldPassword) async {
|
||
final res =
|
||
await apiProvider.changePassword(date, newPassword, oldPassword);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
//获取安全信息列表
|
||
Future<MineSetSafetyProblemEntity> getQuestionList(
|
||
String operatorUid, String countryCode) async {
|
||
final res = await apiProvider.getQuestionList(operatorUid, countryCode);
|
||
return MineSetSafetyProblemEntity.fromJson(res.body);
|
||
}
|
||
|
||
//获取已设置的安全信息
|
||
Future<MineViewSafetyProblemEntity> getOwnQuestionList() async {
|
||
final res = await apiProvider.getOwnQuestionList();
|
||
return MineViewSafetyProblemEntity.fromJson(res.body);
|
||
}
|
||
|
||
//设置安全信息
|
||
Future<LoginEntity> setSafeAnswer(List questionAndAnswerList) async {
|
||
final res = await apiProvider.setSafeAnswer(questionAndAnswerList);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
//修改安全信息
|
||
Future<LoginEntity> updateSafeAnswer(List questionAndAnswerList) async {
|
||
final res = await apiProvider.updateSafeAnswer(questionAndAnswerList);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
//上传头像 先获取upToken 再调用updateUserInfo
|
||
Future<MinePersonGetUploadFileInfoEntity> getUpToken({
|
||
required String userId,
|
||
required String filename,
|
||
required int size,
|
||
}) async {
|
||
final res = await apiProvider.getUpHeadToken(userId, filename, size);
|
||
return MinePersonGetUploadFileInfoEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 文件上传
|
||
Future<LoginEntity> uploadFile({
|
||
required String url,
|
||
required dynamic body,
|
||
}) async {
|
||
final res = await apiProvider.uploadFile(url, body);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
//获取解绑手机号Token
|
||
Future<MineUnbindPhoneOrEmailEntity> unbindPhoneToken(
|
||
String verificationCode) async {
|
||
final res = await apiProvider.unbindPhoneToken(verificationCode);
|
||
return MineUnbindPhoneOrEmailEntity.fromJson(res.body);
|
||
}
|
||
|
||
//获取解绑邮箱Token
|
||
Future<MineUnbindPhoneOrEmailEntity> unbindEmailToken(
|
||
String verificationCode) async {
|
||
final res = await apiProvider.unbindEmailToken(verificationCode);
|
||
return MineUnbindPhoneOrEmailEntity.fromJson(res.body);
|
||
}
|
||
|
||
//推送绑定DeviceID
|
||
Future<MineUnbindPhoneOrEmailEntity> pushBindAppId(
|
||
String deviceId, int deviceType) async {
|
||
final res = await apiProvider.pushBindAppId(deviceId, deviceType);
|
||
return MineUnbindPhoneOrEmailEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 消息列表
|
||
Future<MessageListEntity> messageListLoadData(
|
||
{required String pageNo, required String pageSize}) async {
|
||
final res = await apiProvider.messageListLoadData(pageNo, pageSize);
|
||
return MessageListEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 读取消息
|
||
Future<MessageListEntity> readMessageLoadData({
|
||
required String messageId,
|
||
}) async {
|
||
final res = await apiProvider.readMessageLoadData(messageId);
|
||
return MessageListEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 删除消息
|
||
Future<MessageListEntity> deletMessageLoadData({
|
||
required String messageId,
|
||
}) async {
|
||
final res = await apiProvider.deletMessageLoadData(messageId);
|
||
return MessageListEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 删除消息
|
||
Future<MessageListEntity> deletAllMessageLoadData() async {
|
||
final res = await apiProvider.deletAllMessageLoadData();
|
||
return MessageListEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取版本号
|
||
Future<VersionUndateEntity> getVersionData(
|
||
{required String brandName, required String currentVersion}) async {
|
||
final res = await apiProvider.getVersionData(brandName, currentVersion);
|
||
return VersionUndateEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置猫眼工作模式
|
||
Future<VersionUndateEntity> updateCatEyeModeConfig(
|
||
{required int lockId, required List catEyeConfig}) async {
|
||
final res = await apiProvider.updateCatEyeModeConfig(lockId, catEyeConfig);
|
||
return VersionUndateEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置自动亮屏
|
||
Future<VersionUndateEntity> updateAutoLightScreenConfig(
|
||
{required int lockId, required int autoLightScreen}) async {
|
||
final res =
|
||
await apiProvider.updateAutoLightScreenConfig(lockId, autoLightScreen);
|
||
return VersionUndateEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置亮屏持续时间
|
||
Future<VersionUndateEntity> updateLightScreenTimeConfig(
|
||
{required int lockId, required int autoLightScreenTime}) async {
|
||
final res = await apiProvider.updateLightScreenTimeConfig(
|
||
lockId, autoLightScreenTime);
|
||
return VersionUndateEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置逗留警告
|
||
Future<VersionUndateEntity> updateStayWarnConfig(
|
||
{required int lockId, required int stayWarn}) async {
|
||
final res = await apiProvider.updateStayWarnConfig(lockId, stayWarn);
|
||
return VersionUndateEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置异常警告
|
||
Future<VersionUndateEntity> updateAbnormalWarnConfig(
|
||
{required int lockId, required int abnormalWarn}) async {
|
||
final res =
|
||
await apiProvider.updateAbnormalWarnConfig(lockId, abnormalWarn);
|
||
return VersionUndateEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置面容开锁
|
||
Future<VersionUndateEntity> updateFaceSwitch(
|
||
{required int lockId, required int faceSwitch}) async {
|
||
final res = await apiProvider.updateFaceSwitch(lockId, faceSwitch);
|
||
return VersionUndateEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置面容感应距离
|
||
Future<VersionUndateEntity> updateFaceSenseDistance(
|
||
{required int lockId, required int faceInductionDistance}) async {
|
||
final res = await apiProvider.updateFaceSenseDistance(
|
||
lockId, faceInductionDistance);
|
||
return VersionUndateEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置面容防误开
|
||
Future<VersionUndateEntity> updateFacePreventMisrun(
|
||
{required int lockId, required int faceEnErrUnlock}) async {
|
||
final res =
|
||
await apiProvider.updateFacePreventMisrun(lockId, faceEnErrUnlock);
|
||
return VersionUndateEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置面容自动亮屏
|
||
Future<VersionUndateEntity> updateFaceAutoLightScreen(
|
||
{required int lockId, required int faceAutoLightScreen}) async {
|
||
final res = await apiProvider.updateFaceAutoLightScreen(
|
||
lockId, faceAutoLightScreen);
|
||
return VersionUndateEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取锁消息设置
|
||
Future<MsgNotificationEntity> getLockNoticeSetting(
|
||
{required int lockId}) async {
|
||
final res = await apiProvider.getLockNoticeSetting(lockId);
|
||
return MsgNotificationEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置N天未开门
|
||
Future<OpenDoorNotifyEntity> updateNdaysNotCloseDoorNoticeSetting(
|
||
{required int lockId,
|
||
required int dayNotOpenDoorState,
|
||
required int dayNotOpenDoorValue,
|
||
required List dayNotOpenDoorNoticeWayList}) async {
|
||
final res = await apiProvider.updateNdaysNotCloseDoorNoticeSetting(lockId,
|
||
dayNotOpenDoorState, dayNotOpenDoorValue, dayNotOpenDoorNoticeWayList);
|
||
return OpenDoorNotifyEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置低电量提醒
|
||
Future<OpenDoorNotifyEntity> updatelowElecNoticeStateSetting(
|
||
{required int lockId,
|
||
required int lowElecNoticeState,
|
||
required List lowElecNoticeWayList}) async {
|
||
final res = await apiProvider.updatelowElecNoticeStateSetting(
|
||
lockId, lowElecNoticeState, lowElecNoticeWayList);
|
||
return OpenDoorNotifyEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置门未关好
|
||
Future<MsgNotificationEntity> updateDoorNotCloseSetting({
|
||
required int lockId,
|
||
required int doorNotCloseState,
|
||
}) async {
|
||
final res =
|
||
await apiProvider.updateDoorNotCloseSetting(lockId, doorNotCloseState);
|
||
return MsgNotificationEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置有人按门铃状态
|
||
Future<MsgNotificationEntity> updateDoorbellNoticeStateSetting({
|
||
required int lockId,
|
||
required int doorbellNoticeState,
|
||
}) async {
|
||
final res = await apiProvider.updateDoorbellNoticeStateSetting(
|
||
lockId, doorbellNoticeState);
|
||
return MsgNotificationEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置有人出现在门口
|
||
Future<MsgNotificationEntity> updateSomeoneAtDoorNoticeStateSetting({
|
||
required int lockId,
|
||
required int someoneAtDoorNoticeState,
|
||
}) async {
|
||
final res = await apiProvider.updateSomeoneAtDoorNoticeStateSetting(
|
||
lockId, someoneAtDoorNoticeState);
|
||
return MsgNotificationEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置防拆报警通知
|
||
Future<MsgNotificationEntity> updateTamperAlarmStateSetting({
|
||
required int lockId,
|
||
required int tamperAlarmState,
|
||
}) async {
|
||
final res = await apiProvider.updaTetamperAlarmStateSetting(
|
||
lockId, tamperAlarmState);
|
||
return MsgNotificationEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 锁用户列表
|
||
Future<LockUserEntity> getLockKeysList(
|
||
{required int lockId, required String searchStr}) async {
|
||
final res = await apiProvider.getLockKeysList(lockId, searchStr);
|
||
return LockUserEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 添加开门通知
|
||
Future<MsgNotificationEntity> addLockNoticeSetting(
|
||
{required int lockId,
|
||
required int noticeType,
|
||
required Map settingValue}) async {
|
||
final res = await apiProvider.addLockNoticeSetting(
|
||
lockId, noticeType, settingValue);
|
||
return MsgNotificationEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 开门通知列表
|
||
Future<OpenDoorNotifyEntity> lockNoticeSettingAccountList(
|
||
{required int lockId, required int noticeType}) async {
|
||
final res =
|
||
await apiProvider.lockNoticeSettingAccountList(lockId, noticeType);
|
||
return OpenDoorNotifyEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 删除开门通知
|
||
Future<OpenDoorNotifyEntity> deleteLockNoticeSettingAccount(
|
||
{required int lockNoticeSettingAccountId}) async {
|
||
final res = await apiProvider
|
||
.deleteLockNoticeSettingAccount(lockNoticeSettingAccountId);
|
||
return OpenDoorNotifyEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 更新开门通知
|
||
Future<OpenDoorNotifyEntity> updateLockNoticeSettingAccount(
|
||
{required int lockNoticeSettingAccountId,
|
||
required Map settingValue}) async {
|
||
final res = await apiProvider.updateLockNoticeSettingAccount(
|
||
lockNoticeSettingAccountId, settingValue);
|
||
return OpenDoorNotifyEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取胁迫指纹列表
|
||
Future<CoerceFingerprintListEntity> getCoercedFingerprintList(
|
||
{required int lockId,
|
||
required int pageNo,
|
||
required int pageSize,
|
||
required String searchStr}) async {
|
||
final res = await apiProvider.getCoercedFingerprintList(
|
||
lockId, pageNo, pageSize, searchStr);
|
||
return CoerceFingerprintListEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取云存列表
|
||
Future<VideoLogEntity> getLockCloudStorageList({required int lockId}) async {
|
||
final res = await apiProvider.getLockCloudStorageList(lockId);
|
||
return VideoLogEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 删除云存列表
|
||
Future<VersionUndateEntity> deleteLockCloudStorageList(
|
||
{required List recordIds}) async {
|
||
final res = await apiProvider.deleteLockCloudStorageList(recordIds);
|
||
return VersionUndateEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置微信公众号推送
|
||
Future<VersionUndateEntity> setMpWechatPushSwitch(
|
||
{required int mpWechatPushSwitch}) async {
|
||
final res = await apiProvider.setMpWechatPushSwitch(mpWechatPushSwitch);
|
||
return VersionUndateEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取微信公众号二维码
|
||
Future<GetWechatQrCodeEntity> getMpWechatQrCode() async {
|
||
final res = await apiProvider.getMpWechatQrCode();
|
||
return GetWechatQrCodeEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 设置实名认证频次
|
||
Future<FaceAuthenticationEntity> setFaceAuthentication(
|
||
{required int faceAuthFrequence}) async {
|
||
final res = await apiProvider.setFaceAuthentication(faceAuthFrequence);
|
||
return FaceAuthenticationEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取购买记录
|
||
Future<UseRecordListEntity> getBuyRecordList({
|
||
required String type,
|
||
required int pageNo,
|
||
required int recordType,
|
||
int pageSize = 10,
|
||
}) async {
|
||
final res =
|
||
await apiProvider.getBuyRecordList(type, recordType, pageNo, pageSize);
|
||
return UseRecordListEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取使用记录
|
||
Future<UseRecordListEntity> getUseRecordList({
|
||
required String type,
|
||
required int pageNo,
|
||
int pageSize = 10,
|
||
}) async {
|
||
final res = await apiProvider.getUseRecordList(type, pageNo, pageSize);
|
||
return UseRecordListEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 增值服务套餐购包链接
|
||
Future<AdvancedFeaturesWebEntity> getServicePackageBuyUrl() async {
|
||
final res = await apiProvider.getServicePackageBuyUrl();
|
||
return AdvancedFeaturesWebEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取增值服务用户余量包
|
||
Future<ValueAddedServicesHighFunctionEntity> getServiceUserPackage() async {
|
||
final res = await apiProvider.getServiceUserPackage();
|
||
return ValueAddedServicesHighFunctionEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 检测实名认证是否支持开启
|
||
Future<ValueAddedServicesHighFunctionEntity> keyCheckFace({
|
||
required int lockId,
|
||
}) async {
|
||
final res = await apiProvider.keyCheckFace(lockId);
|
||
return ValueAddedServicesHighFunctionEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取人脸认证certifyId
|
||
Future<LockCertifyEntity> getFaceCertifyId({
|
||
required int lockId,
|
||
required int keyId,
|
||
required Map metaInfo,
|
||
}) async {
|
||
final res = await apiProvider.getFaceCertifyId(lockId, keyId, metaInfo);
|
||
return LockCertifyEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 检测certifyId是否完成认证
|
||
Future<ServiceAuthResultEntity> getServiceCheckCertify({
|
||
required String certifyId,
|
||
required int keyId,
|
||
}) async {
|
||
final res = await apiProvider.getServiceCheckCertify(certifyId, keyId);
|
||
return ServiceAuthResultEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 检测certifyId是否完成认证
|
||
Future<LockUserNoListEntity> getLockUserNoList({
|
||
required int lockId,
|
||
}) async {
|
||
final res = await apiProvider.getLockUserNoList(lockId);
|
||
return LockUserNoListEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 锁数据上传
|
||
Future<LoginEntity> lockDataUpload({
|
||
required int lockId,
|
||
required int uploadType,
|
||
required int recordType,
|
||
required List records,
|
||
required bool isUnShowLoading,
|
||
}) async {
|
||
final res = await apiProvider.lockDataUpload(
|
||
lockId, uploadType, recordType, records, isUnShowLoading);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 电子钥匙获取短信模板
|
||
Future<NoticeTemplateEntity> getNoticeTemplate({
|
||
required int lockId,
|
||
required int keyId,
|
||
required int channelType,
|
||
}) async {
|
||
final Response<dynamic> res =
|
||
await apiProvider.getNoticeTemplate(lockId, keyId, channelType);
|
||
return NoticeTemplateEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 电子钥匙获取短信模板
|
||
Future<GetAppInfo> getAppInfo() async {
|
||
final Response<dynamic> res = await apiProvider.getAppInfo();
|
||
return GetAppInfo.fromJson(res.body);
|
||
}
|
||
|
||
// 获取最新固件
|
||
Future<FwVersionEntity> getFwVersion(
|
||
{required String model, required String currentVersion}) async {
|
||
final Response<dynamic> res =
|
||
await apiProvider.getFwVersion(model, currentVersion);
|
||
return FwVersionEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取默认模板
|
||
Future<NewSMSTemplateEntity> getDefaultTemplate() async {
|
||
final Response<dynamic> res = await apiProvider.getDefaultTemplate();
|
||
return NewSMSTemplateEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取短信模板列表
|
||
Future<CustomSMSTemplateListEntity> getSMSTemplateList(
|
||
{required int channelType,
|
||
required int pageNo,
|
||
required int pageSize}) async {
|
||
final Response<dynamic> res =
|
||
await apiProvider.getSMSTemplateList(channelType, pageNo, pageSize);
|
||
return CustomSMSTemplateListEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 添加短信模板
|
||
Future<LoginEntity> addTemplateService(
|
||
{required int channelType,
|
||
required String name,
|
||
required int langType,
|
||
required String regards,
|
||
required String tips,
|
||
required int templateType}) async {
|
||
final Response<dynamic> res = await apiProvider.addTemplateService(
|
||
channelType, name, langType, regards, tips, templateType);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 更新模板信息
|
||
Future<LoginEntity> updateTemplateInfo(
|
||
{required int id,
|
||
required String name,
|
||
required String regards,
|
||
required String tips}) async {
|
||
final Response<dynamic> res =
|
||
await apiProvider.updateTemplateInfo(id, name, regards, tips);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 删除模板
|
||
Future<LoginEntity> deleteTemplateInfo({required int id}) async {
|
||
final Response<dynamic> res = await apiProvider.deleteTemplateInfo(id);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 查看ip是否是国外还是国内
|
||
Future<CheckIPEntity> checkIpAction({required String ip}) async {
|
||
final Response<dynamic> res = await apiProvider.checkIpAction(ip);
|
||
return CheckIPEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取电子钥匙通知模板
|
||
Future<SendEmailNotificationEntity> getKeyNoticeTemplate({
|
||
required int lockId,
|
||
required int keyId,
|
||
required int channelType,
|
||
}) async {
|
||
final Response<dynamic> res =
|
||
await apiProvider.getKeyNoticeTemplate(lockId, keyId, channelType);
|
||
return SendEmailNotificationEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取密码通知模板
|
||
Future<SendEmailNotificationEntity> getPwdNoticeTemplate({
|
||
required int lockId,
|
||
required int keyboardPwdId,
|
||
required int channelType,
|
||
}) async {
|
||
final Response<dynamic> res = await apiProvider.getPwdNoticeTemplate(
|
||
lockId, keyboardPwdId, channelType);
|
||
return SendEmailNotificationEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 电子钥匙发送短信、邮件通知
|
||
Future<SendEmailNotificationEntity> keyNoticeSubmit(
|
||
{required String receiverName,
|
||
required int lockId,
|
||
required int keyId,
|
||
required int channelType,
|
||
required int openDoorType,
|
||
required String templateType,
|
||
required int countryCode}) async {
|
||
final Response<dynamic> res = await apiProvider.keyNoticeSubmit(
|
||
receiverName,
|
||
lockId,
|
||
keyId,
|
||
channelType,
|
||
openDoorType,
|
||
templateType,
|
||
countryCode);
|
||
return SendEmailNotificationEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 密码发送短信、邮件通知
|
||
Future<SendEmailNotificationEntity> pwdNoticeSubmit(
|
||
{required String receiverName,
|
||
required int lockId,
|
||
required int keyboardPwdId,
|
||
required int channelType,
|
||
required int openDoorType,
|
||
required String templateType,
|
||
required int countryCode}) async {
|
||
final Response<dynamic> res = await apiProvider.pwdNoticeSubmit(
|
||
receiverName,
|
||
lockId,
|
||
keyboardPwdId,
|
||
channelType,
|
||
openDoorType,
|
||
templateType,
|
||
countryCode);
|
||
return SendEmailNotificationEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 获取电子钥匙通知模板
|
||
Future<UpdateLockInfoEntity> getLockUpdateLockInfo({
|
||
required int lockId,
|
||
required String fwVersion,
|
||
}) async {
|
||
final Response<dynamic> res =
|
||
await apiProvider.getLockUpdateLockInfo(lockId, fwVersion);
|
||
return UpdateLockInfoEntity.fromJson(res.body);
|
||
}
|
||
|
||
//导出锁记录
|
||
Future<ExportRecordEntity> exportLockRecords({
|
||
required int lockId,
|
||
required int startDate,
|
||
required int endDate,
|
||
}) async {
|
||
final Response<dynamic> res =
|
||
await apiProvider.exportLockRecords(lockId, startDate, endDate);
|
||
return ExportRecordEntity.fromJson(res.body);
|
||
}
|
||
|
||
//批量导出锁记录
|
||
Future<ExportRecordEntity> batchExportLockRecords({
|
||
required List<int> lockIds,
|
||
required int startDate,
|
||
required int endDate,
|
||
}) async {
|
||
final Response<dynamic> res =
|
||
await apiProvider.batchExportLockRecords(lockIds, startDate, endDate);
|
||
return ExportRecordEntity.fromJson(res.body);
|
||
}
|
||
|
||
// 更新云用户时区偏移与语言
|
||
Future<LoginEntity> updateZoneOffsetsAndLanguages({
|
||
required int timezoneOffset,
|
||
// required String language
|
||
}) async {
|
||
final res = await apiProvider.updateZoneOffsetsAndLanguages(
|
||
timezoneOffset,
|
||
// language
|
||
);
|
||
return LoginEntity.fromJson(res.body);
|
||
}
|
||
}
|