2023-08-07 10:32:24 +08:00
|
|
|
import 'dart:convert';
|
2023-07-27 15:29:37 +08:00
|
|
|
|
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
|
import 'api_provider_base.dart';
|
|
|
|
|
|
|
|
|
|
class ApiProvider extends BaseProvider {
|
2023-08-07 10:32:24 +08:00
|
|
|
Future<Response> getVerificationCode(String countryCode, String account,
|
|
|
|
|
String channel, String codeType, String uniqueid, String xWidth) =>
|
|
|
|
|
post(
|
|
|
|
|
getVerificationCodeUrl.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'countryCode': countryCode,
|
|
|
|
|
'account': account,
|
|
|
|
|
"channel": channel,
|
|
|
|
|
'codeType': codeType,
|
|
|
|
|
"uniqueid": uniqueid,
|
|
|
|
|
'xWidth': xWidth,
|
|
|
|
|
}));
|
2023-07-27 15:29:37 +08:00
|
|
|
|
2023-08-07 10:32:24 +08:00
|
|
|
Future<Response> register(String countryCode, String countryId, String mobile,
|
|
|
|
|
String password, String uniqueid, String verificationCode) =>
|
|
|
|
|
post(registerUrl.toUrl, null, query: {
|
|
|
|
|
'countryCode': countryCode,
|
|
|
|
|
'countryId': countryId,
|
|
|
|
|
"mobile": mobile,
|
|
|
|
|
'password': password,
|
|
|
|
|
'platId': "2",
|
|
|
|
|
"uniqueid": uniqueid,
|
|
|
|
|
'verificationCode': verificationCode,
|
|
|
|
|
});
|
2023-07-27 15:29:37 +08:00
|
|
|
|
2023-08-07 10:32:24 +08:00
|
|
|
// post(
|
|
|
|
|
// registerUrl.toUrl,
|
|
|
|
|
// jsonEncode({
|
|
|
|
|
// 'countryCode': countryCode,
|
|
|
|
|
// 'countryId': countryId,
|
|
|
|
|
// "mobile": mobile,
|
|
|
|
|
// 'password': password,
|
|
|
|
|
// 'platId': "2",
|
|
|
|
|
// "uniqueid": uniqueid,
|
|
|
|
|
// 'verificationCode': verificationCode,
|
|
|
|
|
// }));
|
2023-07-27 15:29:37 +08:00
|
|
|
|
2023-08-07 10:32:24 +08:00
|
|
|
Future<Response> getSliderVerifyImg(String countryCode, String account) =>
|
|
|
|
|
post(
|
|
|
|
|
getSliderVerifyImgUrl.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'countryCode': countryCode,
|
|
|
|
|
'account': account,
|
|
|
|
|
}));
|
2023-07-29 18:33:48 +08:00
|
|
|
|
2023-08-02 09:22:39 +08:00
|
|
|
Future<Response> checkSliderVerifyImg(
|
2023-08-07 10:32:24 +08:00
|
|
|
String countryCode, String account, String xWidth) =>
|
|
|
|
|
post(
|
|
|
|
|
checkImgUrl.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'countryCode': countryCode,
|
|
|
|
|
'account': account,
|
|
|
|
|
'xWidth': xWidth,
|
|
|
|
|
}));
|
2023-07-29 18:33:48 +08:00
|
|
|
|
2023-08-07 10:32:24 +08:00
|
|
|
Future<Response> login(String loginType, String password, String countryCode,
|
|
|
|
|
String username) =>
|
|
|
|
|
post(
|
|
|
|
|
loginUrl.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'loginType': loginType,
|
|
|
|
|
'password': password,
|
|
|
|
|
"platId": "2",
|
|
|
|
|
'uniqueid': "477E6814-289D-402A-9F49-F89A8BD05D63",
|
|
|
|
|
'countryCode': countryCode,
|
|
|
|
|
"username": username
|
|
|
|
|
}));
|
2023-07-27 15:29:37 +08:00
|
|
|
|
2023-08-07 10:32:24 +08:00
|
|
|
Future<Response> resetPassword(
|
|
|
|
|
String countryCode,
|
|
|
|
|
String account,
|
|
|
|
|
String date,
|
|
|
|
|
String newPassword,
|
|
|
|
|
String uniqueid,
|
|
|
|
|
String verificationCode) =>
|
|
|
|
|
post(
|
|
|
|
|
resetPasswordURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'countryCode': countryCode,
|
|
|
|
|
'account': account,
|
|
|
|
|
"date": date,
|
|
|
|
|
'newPassword': newPassword,
|
|
|
|
|
"uniqueid": uniqueid,
|
|
|
|
|
'verificationCode': verificationCode,
|
|
|
|
|
}));
|
2023-08-16 17:35:43 +08:00
|
|
|
|
|
|
|
|
Future<Response> getCountryRegion(String type) =>
|
|
|
|
|
post(getCountryRegionURL.toUrl, jsonEncode({'type': type}));
|
|
|
|
|
|
|
|
|
|
Future<Response> electronicKeyList(
|
|
|
|
|
String endDate,
|
|
|
|
|
String keyId,
|
|
|
|
|
String keyStatus,
|
|
|
|
|
String lockId,
|
|
|
|
|
String operatorUid,
|
|
|
|
|
String pageNo,
|
|
|
|
|
String pageSize,
|
2023-08-23 14:27:50 +08:00
|
|
|
String startDate,
|
|
|
|
|
String keyRight) =>
|
2023-08-16 17:35:43 +08:00
|
|
|
post(
|
|
|
|
|
electronicKeyListURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'endDate': endDate,
|
|
|
|
|
'keyId': keyId,
|
|
|
|
|
"keyStatus": keyStatus,
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
"operatorUid": operatorUid,
|
|
|
|
|
'pageNo': pageNo,
|
|
|
|
|
'pageSize': pageSize,
|
|
|
|
|
'startDate': startDate,
|
2023-08-23 14:27:50 +08:00
|
|
|
'keyRight': keyRight
|
2023-09-18 09:29:33 +08:00
|
|
|
}));
|
2023-08-16 17:35:43 +08:00
|
|
|
|
|
|
|
|
Future<Response> sendElectronicKey(
|
|
|
|
|
String createUser,
|
|
|
|
|
String countryCode,
|
|
|
|
|
String usernameType,
|
|
|
|
|
String endDate,
|
|
|
|
|
String faceAuthentication,
|
|
|
|
|
String isCameraEnable,
|
|
|
|
|
String isRemoteUnlock,
|
|
|
|
|
String keyNameForAdmin,
|
|
|
|
|
String keyRight,
|
|
|
|
|
String keyType,
|
|
|
|
|
String lockId,
|
|
|
|
|
String operatorUid,
|
|
|
|
|
String receiverUsername,
|
|
|
|
|
String remarks,
|
|
|
|
|
String startDate,
|
2023-08-17 18:54:19 +08:00
|
|
|
List weekDays) =>
|
2023-08-16 17:35:43 +08:00
|
|
|
post(
|
|
|
|
|
sendElectronicKeyURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'createUser': createUser,
|
|
|
|
|
'countryCode': countryCode,
|
|
|
|
|
'usernameType': usernameType,
|
|
|
|
|
'endDate': endDate,
|
|
|
|
|
'faceAuthentication': faceAuthentication,
|
|
|
|
|
'isCameraEnable': isCameraEnable,
|
|
|
|
|
'isRemoteUnlock': isRemoteUnlock,
|
|
|
|
|
'keyNameForAdmin': keyNameForAdmin,
|
|
|
|
|
'keyRight': keyRight,
|
|
|
|
|
'keyType': keyType,
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
'operatorUid': operatorUid,
|
|
|
|
|
'receiverUsername': receiverUsername,
|
|
|
|
|
'remarks': remarks,
|
|
|
|
|
'startDate': startDate,
|
|
|
|
|
'weekDays': weekDays
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
Future<Response> uploadElectricQuantity(
|
|
|
|
|
String electricQuantity,
|
|
|
|
|
String lockId,
|
|
|
|
|
) =>
|
|
|
|
|
post(
|
|
|
|
|
uploadElectricQuantityURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'electricQuantity': electricQuantity,
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
}));
|
2023-08-17 18:54:19 +08:00
|
|
|
|
2023-08-18 18:25:58 +08:00
|
|
|
Future<Response> modifyKeyName(
|
|
|
|
|
String keyId,
|
|
|
|
|
String lockId,
|
|
|
|
|
String keyName,
|
|
|
|
|
String operatorUid,
|
|
|
|
|
) =>
|
|
|
|
|
post(
|
|
|
|
|
modifyKeyNameURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'keyId': keyId,
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
'keyName': keyName,
|
|
|
|
|
'operatorUid': operatorUid,
|
|
|
|
|
}));
|
|
|
|
|
|
2023-08-23 14:27:50 +08:00
|
|
|
Future<Response> modifyKeyNameForAdmin(
|
|
|
|
|
String keyId,
|
|
|
|
|
String keyNameForAdmin,
|
|
|
|
|
String operatorUid,
|
|
|
|
|
) =>
|
|
|
|
|
post(
|
|
|
|
|
modifyKeyNameForAdminURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'keyId': keyId,
|
|
|
|
|
'keyNameForAdmin': keyNameForAdmin,
|
|
|
|
|
'operatorUid': operatorUid,
|
|
|
|
|
}));
|
|
|
|
|
|
2023-09-04 11:11:14 +08:00
|
|
|
Future<Response> updateKeyDate(
|
|
|
|
|
String keyId,
|
|
|
|
|
String lockId,
|
|
|
|
|
String endDate,
|
|
|
|
|
String endDay,
|
|
|
|
|
String operatorUid,
|
|
|
|
|
String startDate,
|
|
|
|
|
String startDay,
|
|
|
|
|
List weekDays) =>
|
|
|
|
|
post(
|
|
|
|
|
updateKeyDateURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'keyId': keyId,
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
'endDate': endDate,
|
|
|
|
|
'endDay': endDay,
|
|
|
|
|
'operatorUid': operatorUid,
|
|
|
|
|
'startDate': startDate,
|
|
|
|
|
'startDay': startDay,
|
|
|
|
|
'weekDays': weekDays,
|
|
|
|
|
}));
|
|
|
|
|
|
2023-08-17 18:54:19 +08:00
|
|
|
Future<Response> resetElectronicKey(String lockId, String operatorUid) =>
|
|
|
|
|
post(resetElectronicKeyURL.toUrl,
|
|
|
|
|
jsonEncode({'lockId': lockId, 'operatorUid': operatorUid}));
|
|
|
|
|
|
|
|
|
|
Future<Response> lockRecordList(
|
|
|
|
|
String endDate,
|
|
|
|
|
String keyId,
|
|
|
|
|
String keyStatus,
|
|
|
|
|
String lockId,
|
|
|
|
|
String operatorUid,
|
|
|
|
|
String pageNo,
|
|
|
|
|
String pageSize,
|
|
|
|
|
String startDate,
|
|
|
|
|
String recordType,
|
|
|
|
|
String searchStr,
|
2023-08-31 14:40:50 +08:00
|
|
|
String timezoneRawOffSet,
|
|
|
|
|
String keyboardPwdId,
|
|
|
|
|
String cardId,
|
|
|
|
|
String fingerprintId) =>
|
2023-08-17 18:54:19 +08:00
|
|
|
post(
|
|
|
|
|
keyOperationRecordURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'endDate': endDate,
|
|
|
|
|
'keyId': keyId,
|
|
|
|
|
"keyStatus": keyStatus,
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
"operatorUid": operatorUid,
|
|
|
|
|
'pageNo': pageNo,
|
|
|
|
|
'pageSize': pageSize,
|
|
|
|
|
'startDate': startDate,
|
|
|
|
|
'recordType': recordType,
|
|
|
|
|
'searchStr': searchStr,
|
2023-08-31 14:40:50 +08:00
|
|
|
'timezoneRawOffSet': timezoneRawOffSet,
|
|
|
|
|
'keyboardPwdId': keyboardPwdId,
|
|
|
|
|
'cardId': cardId,
|
|
|
|
|
'fingerprintId': fingerprintId
|
2023-09-18 09:29:33 +08:00
|
|
|
}));
|
2023-08-24 14:25:55 +08:00
|
|
|
|
|
|
|
|
// 绑定蓝牙管理员
|
|
|
|
|
Future<Response> bindingBlueAdmin(
|
2023-08-24 14:29:31 +08:00
|
|
|
String bindingDate,
|
|
|
|
|
String hotelMode,
|
|
|
|
|
String lockAlias,
|
2023-08-26 11:40:40 +08:00
|
|
|
Map lockData,
|
2023-08-24 14:29:31 +08:00
|
|
|
String nbInitSuccess,
|
2023-08-29 11:02:52 +08:00
|
|
|
Map position,
|
|
|
|
|
Map bluetooth,
|
2023-08-31 15:56:01 +08:00
|
|
|
String deviceNo,
|
2023-09-07 18:36:16 +08:00
|
|
|
String lockUserNo,
|
|
|
|
|
String pwdTimestamp) =>
|
2023-08-24 14:25:55 +08:00
|
|
|
post(
|
|
|
|
|
bindingBlueAdminURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'bindingDate': bindingDate,
|
|
|
|
|
'hotelMode': hotelMode,
|
|
|
|
|
"lockAlias": lockAlias,
|
|
|
|
|
'lockData': lockData,
|
|
|
|
|
"nbInitSuccess": nbInitSuccess,
|
|
|
|
|
'position': position,
|
2023-08-29 11:02:52 +08:00
|
|
|
'bluetooth': bluetooth,
|
2023-08-31 15:56:01 +08:00
|
|
|
'deviceNo': deviceNo,
|
|
|
|
|
'lockUserNo': lockUserNo,
|
2023-09-07 18:36:16 +08:00
|
|
|
'pwdTimestamp': pwdTimestamp,
|
2023-08-24 14:25:55 +08:00
|
|
|
}));
|
2023-08-26 11:40:40 +08:00
|
|
|
|
|
|
|
|
// 获取锁信息
|
2023-08-30 10:58:00 +08:00
|
|
|
Future<Response> getLockInfo(String lastUpdateDate, String pageNo) => post(
|
|
|
|
|
getLockInfoURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'lastUpdateDate': lastUpdateDate,
|
|
|
|
|
"pageNo": pageNo,
|
|
|
|
|
}));
|
2023-08-26 11:40:40 +08:00
|
|
|
|
2023-08-29 17:39:35 +08:00
|
|
|
// 删除锁
|
2023-08-30 10:58:00 +08:00
|
|
|
Future<Response> deletLockInfo(String lockId) => post(
|
|
|
|
|
deletLockURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
}));
|
2023-08-29 17:39:35 +08:00
|
|
|
|
2023-09-07 18:36:16 +08:00
|
|
|
// 获取Wifi锁服务器
|
2023-09-11 09:48:47 +08:00
|
|
|
Future<Response> getWifiLockServiceIpAndPort() =>
|
|
|
|
|
post(getWifiServiceIpURL.toUrl, jsonEncode({}));
|
2023-09-07 18:36:16 +08:00
|
|
|
|
2023-08-23 14:27:50 +08:00
|
|
|
Future<Response> passwordKeyList(
|
|
|
|
|
String keyStatus,
|
|
|
|
|
String lockId,
|
|
|
|
|
String operatorUid,
|
|
|
|
|
String pageNo,
|
|
|
|
|
String pageSize,
|
|
|
|
|
) =>
|
|
|
|
|
post(
|
|
|
|
|
passwordKeyListURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'keyStatus': keyStatus,
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
'operatorUid': operatorUid,
|
|
|
|
|
'pageNo': pageNo,
|
|
|
|
|
'pageSize': pageSize
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
Future<Response> resetPasswordKey(String lockId, String operatorUid) => post(
|
2023-08-25 17:06:42 +08:00
|
|
|
resetPasswordURL.toUrl,
|
2023-08-23 14:27:50 +08:00
|
|
|
jsonEncode({'lockId': lockId, 'operatorUid': operatorUid}));
|
2023-08-25 17:06:42 +08:00
|
|
|
|
|
|
|
|
Future<Response> getKeyboardPwd(
|
|
|
|
|
String endDate,
|
|
|
|
|
String isExclusive,
|
|
|
|
|
String keyboardPwdName,
|
|
|
|
|
String keyboardPwdType,
|
|
|
|
|
String keyboardPwdVersion,
|
|
|
|
|
String lockId,
|
|
|
|
|
String operatorUid,
|
|
|
|
|
String startDate,
|
|
|
|
|
String timezoneRawOffSet,
|
|
|
|
|
) =>
|
|
|
|
|
post(
|
|
|
|
|
passwordKeyGetURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'endDate': endDate,
|
|
|
|
|
'isExclusive': isExclusive,
|
|
|
|
|
'keyboardPwdName': keyboardPwdName,
|
|
|
|
|
'keyboardPwdType': keyboardPwdType,
|
|
|
|
|
'keyboardPwdVersion': keyboardPwdVersion,
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
'operatorUid': operatorUid,
|
|
|
|
|
'startDate': startDate,
|
|
|
|
|
'timezoneRawOffSet': timezoneRawOffSet
|
2023-09-18 09:29:33 +08:00
|
|
|
}));
|
2023-08-28 17:35:30 +08:00
|
|
|
|
2023-09-07 18:32:56 +08:00
|
|
|
Future<Response> addKeyboardPwd(
|
|
|
|
|
String lockId,
|
|
|
|
|
String keyboardPwdName,
|
|
|
|
|
String keyboardPwd,
|
|
|
|
|
String keyboardPwdType,
|
|
|
|
|
String startDate,
|
|
|
|
|
String endDate,
|
|
|
|
|
String addType,
|
|
|
|
|
) =>
|
|
|
|
|
post(
|
|
|
|
|
passwordKeyAddURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
'keyboardPwdName': keyboardPwdName,
|
|
|
|
|
'keyboardPwd': keyboardPwd,
|
|
|
|
|
'keyboardPwdType': keyboardPwdType,
|
|
|
|
|
'startDate': startDate,
|
|
|
|
|
'endDate': endDate,
|
|
|
|
|
'addType': addType,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
Future<Response> updateKeyboardPwd(
|
|
|
|
|
String lockId,
|
|
|
|
|
String keyboardPwdId,
|
|
|
|
|
String keyboardPwdName,
|
|
|
|
|
String newKeyboardPwd,
|
|
|
|
|
String startDate,
|
|
|
|
|
String endDate,
|
|
|
|
|
String changeType,
|
|
|
|
|
) =>
|
|
|
|
|
post(
|
|
|
|
|
updatePasswordKeyURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
'keyboardPwdId': keyboardPwdId,
|
|
|
|
|
'keyboardPwdName': keyboardPwdName,
|
|
|
|
|
'newKeyboardPwd': newKeyboardPwd,
|
|
|
|
|
'startDate': startDate,
|
|
|
|
|
'endDate': endDate,
|
|
|
|
|
'changeType': changeType,
|
|
|
|
|
}));
|
|
|
|
|
|
2023-08-28 17:35:30 +08:00
|
|
|
Future<Response> clearOperationRecord(String lockId) =>
|
|
|
|
|
post(clearOperationRecordURL.toUrl, jsonEncode({'lockId': lockId}));
|
|
|
|
|
|
|
|
|
|
Future<Response> addLockGroup(String groupName, String operatorUid) => post(
|
|
|
|
|
addlockGroupURL.toUrl,
|
|
|
|
|
jsonEncode({'groupName': groupName, 'operatorUid': operatorUid}));
|
|
|
|
|
|
2023-09-07 18:32:56 +08:00
|
|
|
Future<Response> setLockGroup(String lockId, String groupId) => post(
|
|
|
|
|
setlockGroupURL.toUrl,
|
|
|
|
|
jsonEncode({'lockId': lockId, 'groupId': groupId}));
|
|
|
|
|
|
2023-08-28 17:35:30 +08:00
|
|
|
Future<Response> lockGroupList(String type) =>
|
2023-09-18 09:29:33 +08:00
|
|
|
post(lockGroupListURL.toUrl, jsonEncode({'type': type}));
|
2023-08-29 17:41:20 +08:00
|
|
|
|
|
|
|
|
Future<Response> deleteElectronicKey(String keyId) =>
|
|
|
|
|
post(deleteElectronicKeyURL.toUrl, jsonEncode({'keyId': keyId}));
|
|
|
|
|
|
2023-09-15 09:43:20 +08:00
|
|
|
Future<Response> deleteAdministrator(String uid, String includeUnderlings) =>
|
|
|
|
|
post(deleteElectronicKeyURL.toUrl,
|
|
|
|
|
jsonEncode({'uid': uid, 'includeUnderlings': includeUnderlings}));
|
|
|
|
|
|
|
|
|
|
Future<Response> updateAdministrator(String uid, String name, String endDate,
|
|
|
|
|
String startDate, String isRemoteUnlock) =>
|
|
|
|
|
post(
|
|
|
|
|
deleteElectronicKeyURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'uid': uid,
|
|
|
|
|
'name': name,
|
|
|
|
|
'endDate': endDate,
|
|
|
|
|
'startDate': startDate,
|
|
|
|
|
'isRemoteUnlock': isRemoteUnlock
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
Future<Response> expireLockList(
|
|
|
|
|
String operatorUid, String pageNo, String pageSize) =>
|
|
|
|
|
post(
|
|
|
|
|
expireLockListURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'operatorUid': operatorUid,
|
|
|
|
|
'pageNo': pageNo,
|
|
|
|
|
'pageSize': pageSize,
|
|
|
|
|
}));
|
|
|
|
|
|
2023-08-29 17:41:20 +08:00
|
|
|
Future<Response> deleteKeyboardPwd(
|
2023-09-04 11:11:14 +08:00
|
|
|
String lockId, String keyboardPwdId, String deleteType) =>
|
2023-08-29 17:41:20 +08:00
|
|
|
post(
|
|
|
|
|
deleteKeyboardPwdURL.toUrl,
|
|
|
|
|
jsonEncode({
|
2023-09-04 11:11:14 +08:00
|
|
|
'lockId': lockId,
|
2023-08-29 17:41:20 +08:00
|
|
|
'keyboardPwdId': keyboardPwdId,
|
|
|
|
|
'deleteType': deleteType
|
|
|
|
|
}));
|
2023-08-30 10:58:00 +08:00
|
|
|
|
|
|
|
|
Future<Response> updateSetting(String lockId, String isOn, String type) =>
|
|
|
|
|
post(updateSettingURL.toUrl,
|
|
|
|
|
jsonEncode({'lockId': lockId, 'isOn': isOn, 'type': type}));
|
2023-08-31 15:58:29 +08:00
|
|
|
|
|
|
|
|
Future<Response> keyGroupList(String type) =>
|
|
|
|
|
post(keyGroupListURL.toUrl, jsonEncode({'type': type}));
|
|
|
|
|
|
|
|
|
|
Future<Response> lockListByGroup(String type, String keyGroupId) => post(
|
|
|
|
|
lockListByGroupURL.toUrl,
|
|
|
|
|
jsonEncode({'type': type, 'keyGroupId': keyGroupId}));
|
2023-09-07 18:36:16 +08:00
|
|
|
|
2023-09-11 09:48:47 +08:00
|
|
|
/// 锁设置模块
|
2023-09-07 18:36:16 +08:00
|
|
|
// 远程开锁
|
2023-09-11 09:48:47 +08:00
|
|
|
Future<Response> remoteUnlockingOpenOrCloseLoadData(
|
|
|
|
|
String lockId, String featureValue) =>
|
2023-09-07 18:36:16 +08:00
|
|
|
post(
|
|
|
|
|
updateSpecialValueUrl.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
'featureValue': featureValue,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 自动闭锁
|
2023-09-11 09:48:47 +08:00
|
|
|
Future<Response> setAutoUnlockLoadData(
|
|
|
|
|
String lockId, String autoLockTime, String type) =>
|
2023-09-07 18:36:16 +08:00
|
|
|
post(
|
|
|
|
|
setAutoLockTimeUrl.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
'autoLockTime': autoLockTime,
|
|
|
|
|
'type': type,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 获取锁的常开模式设置
|
2023-09-11 09:48:47 +08:00
|
|
|
Future<Response> getPassageModeConfigLoadData(String lockId) => post(
|
|
|
|
|
getPassageModeConfigUrl.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
}));
|
2023-09-07 18:36:16 +08:00
|
|
|
|
|
|
|
|
// 获取锁的常开模式设置
|
2023-09-11 09:48:47 +08:00
|
|
|
Future<Response> configPassageMode(
|
|
|
|
|
String lockId,
|
|
|
|
|
String passageMode,
|
|
|
|
|
String autoUnlock,
|
|
|
|
|
String type,
|
|
|
|
|
String startDate,
|
|
|
|
|
String endDate,
|
|
|
|
|
String isAllDay,
|
|
|
|
|
List weekDays) =>
|
2023-09-07 18:36:16 +08:00
|
|
|
post(
|
|
|
|
|
configPassageModeUrl.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
'passageMode': passageMode,
|
|
|
|
|
'autoUnlock': autoUnlock,
|
|
|
|
|
'type': type,
|
|
|
|
|
'startDate': startDate,
|
|
|
|
|
'endDate': endDate,
|
|
|
|
|
'isAllDay': isAllDay,
|
|
|
|
|
'weekDays': weekDays,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 获取锁的常开模式设置
|
2023-09-11 09:48:47 +08:00
|
|
|
Future<Response> setLockSetGeneralSetting(
|
|
|
|
|
String lockId, String changeType, String isOn, String type) =>
|
2023-09-07 18:36:16 +08:00
|
|
|
post(
|
|
|
|
|
updateSettingUrl.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
'changeType': changeType,
|
|
|
|
|
'isOn': isOn,
|
|
|
|
|
'type': type,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 通过网关获取锁的时间
|
2023-09-11 09:48:47 +08:00
|
|
|
Future<Response> getLockTimeFromGatewayLoadData(String lockId) => post(
|
|
|
|
|
roomQueryDateUrl.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
}));
|
2023-09-07 18:36:16 +08:00
|
|
|
|
|
|
|
|
// 获取服务器当前时间
|
2023-09-11 09:48:47 +08:00
|
|
|
Future<Response> getServerDatetimeLoadData(String lockId) => post(
|
|
|
|
|
getServerDatetimeUrl.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
}));
|
2023-09-07 18:36:16 +08:00
|
|
|
|
2023-09-09 18:33:37 +08:00
|
|
|
// 锁诊断
|
|
|
|
|
Future<Response> setLockDiagnoseData(
|
2023-09-11 10:20:44 +08:00
|
|
|
String lockId,
|
|
|
|
|
String electricQuantity,
|
|
|
|
|
String firmwareRevision,
|
|
|
|
|
String hardwareRevision,
|
|
|
|
|
String lockDate,
|
|
|
|
|
String modelNum,
|
|
|
|
|
String pwdInfo,
|
|
|
|
|
String timestamp) =>
|
2023-09-09 18:33:37 +08:00
|
|
|
post(
|
|
|
|
|
lockDiagnoseUrl.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
'electricQuantity': electricQuantity,
|
|
|
|
|
'firmwareRevision': firmwareRevision,
|
|
|
|
|
'hardwareRevision': hardwareRevision,
|
|
|
|
|
'lockDate': lockDate,
|
|
|
|
|
'modelNum': modelNum,
|
|
|
|
|
'pwdInfo': pwdInfo,
|
|
|
|
|
'timestamp': timestamp,
|
|
|
|
|
}));
|
|
|
|
|
|
2023-09-07 18:36:16 +08:00
|
|
|
// 获取锁版本信息
|
2023-09-11 09:48:47 +08:00
|
|
|
Future<Response> getLockVersionInfoLoadData(String lockId) => post(
|
|
|
|
|
getLockVersionInfoUrl.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
}));
|
2023-09-07 18:44:05 +08:00
|
|
|
|
2023-09-09 18:33:37 +08:00
|
|
|
// 开启考勤获取考勤信息
|
|
|
|
|
Future<Response> openCheckingInGetData(String lockId) => post(
|
|
|
|
|
openCheckingInURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
}),
|
2023-09-15 16:04:11 +08:00
|
|
|
isUnShowLoading: true
|
2023-09-09 18:33:37 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// 设置考勤时创建公司
|
|
|
|
|
Future<Response> setCheckInCreateCompanyData(
|
2023-09-11 10:20:44 +08:00
|
|
|
String lockId,
|
|
|
|
|
String attendanceType,
|
|
|
|
|
String companyName,
|
|
|
|
|
List workDay,
|
|
|
|
|
String workEndTime,
|
|
|
|
|
String workStartTime) =>
|
|
|
|
|
post(
|
|
|
|
|
setCheckInCreateCompanyURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
'attendanceType': attendanceType,
|
|
|
|
|
'companyName': companyName,
|
|
|
|
|
'workDay': workDay,
|
|
|
|
|
'workEndTime': workEndTime,
|
|
|
|
|
'workStartTime': workStartTime,
|
|
|
|
|
}));
|
2023-09-09 18:33:37 +08:00
|
|
|
|
|
|
|
|
// 获取开锁提醒
|
2023-09-11 10:20:44 +08:00
|
|
|
Future<Response> setLockPickingReminderData(
|
|
|
|
|
String lockId, String keyId, String monitorFlag) =>
|
2023-09-09 18:33:37 +08:00
|
|
|
post(
|
|
|
|
|
setLockPickingReminderDataURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
'keyId': keyId,
|
|
|
|
|
'monitorFlag': monitorFlag,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 获取员工列表
|
2023-09-11 10:20:44 +08:00
|
|
|
Future<Response> getStaffListData(String companyId, String lockId) => post(
|
|
|
|
|
getStaffListURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'companyId': companyId,
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
}));
|
2023-09-09 18:33:37 +08:00
|
|
|
|
|
|
|
|
// 添加员工
|
|
|
|
|
Future<Response> addStaffData(
|
2023-09-11 10:20:44 +08:00
|
|
|
String attendanceType,
|
|
|
|
|
String attendanceWay,
|
|
|
|
|
String companyId,
|
|
|
|
|
String have,
|
|
|
|
|
String staffName,
|
|
|
|
|
String countryCode,
|
|
|
|
|
String usernameType) =>
|
2023-09-09 18:33:37 +08:00
|
|
|
post(
|
|
|
|
|
addStaffURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'attendanceType': attendanceType,
|
|
|
|
|
'attendanceWay': attendanceWay,
|
|
|
|
|
'companyId': companyId,
|
|
|
|
|
'have': have,
|
|
|
|
|
'staffName': staffName,
|
|
|
|
|
'countryCode': countryCode,
|
|
|
|
|
'usernameType': usernameType,
|
|
|
|
|
}));
|
|
|
|
|
|
2023-09-15 16:04:11 +08:00
|
|
|
// 编辑员工 addHolidaysData
|
|
|
|
|
Future<Response> editStaffData(
|
|
|
|
|
String attendanceType,
|
|
|
|
|
String attendanceWay,
|
|
|
|
|
String staffId,
|
|
|
|
|
String have,
|
|
|
|
|
String staffName,
|
|
|
|
|
String countryCode,
|
|
|
|
|
String usernameType) =>
|
|
|
|
|
post(
|
|
|
|
|
editStaffURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'attendanceType': attendanceType,
|
|
|
|
|
'attendanceWay': attendanceWay,
|
|
|
|
|
'staffId': staffId,
|
|
|
|
|
'have': have,
|
|
|
|
|
'staffName': staffName,
|
|
|
|
|
'countryCode': countryCode,
|
|
|
|
|
'usernameType': usernameType,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 添加员工选择钥匙
|
|
|
|
|
Future<Response> addStaffSeletKeyData(
|
|
|
|
|
String companyId,
|
|
|
|
|
String type) =>
|
|
|
|
|
post(
|
|
|
|
|
addStaffSeletKeyURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'companyId': companyId,
|
|
|
|
|
'type': type,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 添加假期
|
|
|
|
|
Future<Response> addHolidaysData(
|
|
|
|
|
String companyId,
|
|
|
|
|
String fillClassDate,
|
|
|
|
|
String vacationEndDate,
|
|
|
|
|
String vacationName,
|
|
|
|
|
String vacationStartDate) =>
|
|
|
|
|
post(
|
|
|
|
|
addHolidaysURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'companyId': companyId,
|
|
|
|
|
'fillClassDate': fillClassDate,
|
|
|
|
|
'vacationEndDate': vacationEndDate,
|
|
|
|
|
'vacationName': vacationName,
|
|
|
|
|
'vacationStartDate': vacationStartDate,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 假期列表
|
|
|
|
|
Future<Response> holidaysListData(
|
|
|
|
|
String companyId,
|
|
|
|
|
String vacationYear) =>
|
|
|
|
|
post(
|
|
|
|
|
holidaysListURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'companyId': companyId,
|
|
|
|
|
'vacationYear': vacationYear,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 删除假期
|
|
|
|
|
Future<Response> deletHolidaysData(
|
|
|
|
|
String vacationId) =>
|
|
|
|
|
post(
|
|
|
|
|
holidaysDeleteURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'vacationId': vacationId,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 获取考勤设置信息
|
|
|
|
|
Future<Response> getCheckInSetInfoData(
|
|
|
|
|
String companyId) =>
|
|
|
|
|
post(
|
|
|
|
|
getCheckInSetInfoURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'companyId': companyId,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 修改考勤设置信息
|
|
|
|
|
Future<Response> editCheckInSetInfoData(
|
|
|
|
|
String attendanceType,
|
|
|
|
|
String companyId,
|
|
|
|
|
String type,
|
|
|
|
|
String companyName,
|
|
|
|
|
String workEndTime,
|
|
|
|
|
String workStartTime,
|
|
|
|
|
List<int> workDay) =>
|
|
|
|
|
post(
|
|
|
|
|
editCheckInSetInfoURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'attendanceType': attendanceType,
|
|
|
|
|
'companyId': companyId,
|
|
|
|
|
'type': type,
|
|
|
|
|
'companyName': companyName,
|
|
|
|
|
'workEndTime': workEndTime,
|
|
|
|
|
'workStartTime': workStartTime,
|
|
|
|
|
'workDay': workDay,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 获取考勤列表 -- 早到榜日榜
|
|
|
|
|
Future<Response> getCheckInListEarlyArrivalWithDateData(String companyId, String attendanceDate) =>
|
|
|
|
|
post(
|
|
|
|
|
getAttendanceRecordListByDateURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'companyId': companyId,
|
|
|
|
|
'attendanceDate': attendanceDate,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 获取考勤列表 -- 早到榜月榜
|
|
|
|
|
Future<Response> getCheckInListEarlyArrivalWithMonthData(String companyId, String attendanceDate) =>
|
|
|
|
|
post(
|
|
|
|
|
getAttendanceRecordListByMonthURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'companyId': companyId,
|
|
|
|
|
'attendanceDate': attendanceDate,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 获取考勤列表 -- 迟到榜日榜
|
|
|
|
|
Future<Response> getCheckInListLateTimesWithDateData(String companyId, String attendanceDate) =>
|
|
|
|
|
post(
|
|
|
|
|
getAttendanceRecordListLateTimesByDateURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'companyId': companyId,
|
|
|
|
|
'attendanceDate': attendanceDate,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 获取考勤列表 -- 迟到榜月榜
|
|
|
|
|
Future<Response> getCheckInListLateTimesWithMonthData(String companyId, String attendanceDate) =>
|
|
|
|
|
post(
|
|
|
|
|
getAttendanceRecordListLateTimesByMonthURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'companyId': companyId,
|
|
|
|
|
'attendanceDate': attendanceDate,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 获取考勤列表 -- 勤奋榜
|
|
|
|
|
Future<Response> getCheckInListHardworkingData(String companyId, String attendanceDate, String type) =>
|
|
|
|
|
post(
|
|
|
|
|
getAttendanceRecordHardworkingListURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'companyId': companyId,
|
|
|
|
|
'attendanceDate': attendanceDate,
|
|
|
|
|
'type': type,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 获取考勤详情
|
|
|
|
|
Future<Response> getCheckInDetailData(String companyId, String attendanceDate, String staffId) =>
|
|
|
|
|
post(
|
|
|
|
|
getAttendanceRecordDtailURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'companyId': companyId,
|
|
|
|
|
'attendanceDate': attendanceDate,
|
|
|
|
|
'staffId': staffId,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 获取指纹列表
|
|
|
|
|
Future<Response> getFingerprintsListData(String lockId, String pageNo, String pageSize, String searchStr) =>
|
|
|
|
|
post(
|
|
|
|
|
getFingerprintListURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
'pageNo': pageNo,
|
|
|
|
|
'pageSize': pageSize,
|
|
|
|
|
'searchStr': searchStr,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// 添加指纹
|
|
|
|
|
Future<Response> addFingerprintsData(
|
|
|
|
|
String lockId,
|
|
|
|
|
String endDate,
|
|
|
|
|
String addType,
|
|
|
|
|
String fingerprintName,
|
|
|
|
|
String fingerprintNumber,
|
|
|
|
|
String fingerprintType,
|
|
|
|
|
String isCoerced,
|
|
|
|
|
String startDate,
|
|
|
|
|
String cyclicConfig,) =>
|
|
|
|
|
post(
|
|
|
|
|
addFingerprintURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'lockId': lockId,
|
|
|
|
|
'endDate': endDate,
|
|
|
|
|
'addType': addType,
|
|
|
|
|
'fingerprintName': fingerprintName,
|
|
|
|
|
'fingerprintNumber': fingerprintNumber,
|
|
|
|
|
'fingerprintType': fingerprintType,
|
|
|
|
|
'isCoerced': isCoerced,
|
|
|
|
|
'startDate': startDate,
|
|
|
|
|
'cyclicConfig': cyclicConfig,
|
|
|
|
|
}));
|
|
|
|
|
|
2023-09-07 18:32:56 +08:00
|
|
|
Future<Response> listLockByGroup(String type, String keyGroupId) => post(
|
|
|
|
|
listLockByGroupURL.toUrl,
|
|
|
|
|
jsonEncode({'type': type, 'keyGroupId': keyGroupId}));
|
|
|
|
|
|
2023-09-04 15:04:44 +08:00
|
|
|
Future<Response> getKeyDetail(String lockId) =>
|
2023-09-18 09:29:33 +08:00
|
|
|
post(getKeyDetailURL.toUrl, jsonEncode({'lockId': lockId}));
|
2023-09-07 18:32:56 +08:00
|
|
|
|
|
|
|
|
Future<Response> lockUserList(
|
|
|
|
|
String pageNo, String pageSize, String searchStr) =>
|
|
|
|
|
post(
|
|
|
|
|
lockUserListURL.toUrl,
|
2023-09-15 09:43:20 +08:00
|
|
|
jsonEncode(
|
2023-09-18 09:29:33 +08:00
|
|
|
{'pageNo': pageNo, 'pageSize': pageSize, 'searchStr': searchStr}));
|
2023-09-07 18:32:56 +08:00
|
|
|
|
2023-09-13 18:13:36 +08:00
|
|
|
Future<Response> keyListByUser(String pageNo, String pageSize, String uid) =>
|
|
|
|
|
post(keyListByUserURL.toUrl,
|
2023-09-18 09:29:33 +08:00
|
|
|
jsonEncode({'pageNo': pageNo, 'pageSize': pageSize, 'uid': uid}));
|
2023-09-15 09:43:20 +08:00
|
|
|
|
|
|
|
|
Future<Response> authorizedAdminList(String pageNo, String pageSize) => post(
|
|
|
|
|
authorizedAdminListURL.toUrl,
|
2023-09-18 09:29:33 +08:00
|
|
|
jsonEncode({'pageNo': pageNo, 'pageSize': pageSize}));
|
2023-09-07 18:32:56 +08:00
|
|
|
|
|
|
|
|
Future<Response> canSendKey(
|
2023-09-12 18:38:11 +08:00
|
|
|
String endDate, List keyGroupIdList, List lockIdList) =>
|
2023-09-07 18:32:56 +08:00
|
|
|
post(
|
|
|
|
|
canSendKeyURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'endDate': endDate,
|
|
|
|
|
'keyGroupIdList': keyGroupIdList,
|
|
|
|
|
'lockIdList': lockIdList
|
2023-09-07 18:36:16 +08:00
|
|
|
}));
|
2023-09-11 09:48:47 +08:00
|
|
|
|
|
|
|
|
Future<Response> batchSendKey(
|
|
|
|
|
String endDate,
|
2023-09-12 18:38:11 +08:00
|
|
|
List keyGroupIdList,
|
|
|
|
|
List lockIdList,
|
2023-09-11 09:48:47 +08:00
|
|
|
String createUser,
|
|
|
|
|
String isRemoteUnlock,
|
|
|
|
|
String keyNameForAdmin,
|
|
|
|
|
String receiverUsername,
|
|
|
|
|
String startDate,
|
|
|
|
|
String countryCode,
|
2023-09-12 18:38:11 +08:00
|
|
|
String usernameType,
|
|
|
|
|
List weekDays) =>
|
2023-09-11 09:48:47 +08:00
|
|
|
post(
|
|
|
|
|
batchSendKeyURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'endDate': endDate,
|
|
|
|
|
'keyGroupIdList': keyGroupIdList,
|
2023-09-12 18:38:11 +08:00
|
|
|
'lockIdList': lockIdList,
|
|
|
|
|
'createUser': createUser,
|
|
|
|
|
'isRemoteUnlock': isRemoteUnlock,
|
|
|
|
|
'keyNameForAdmin': keyNameForAdmin,
|
|
|
|
|
'receiverUsername': receiverUsername,
|
|
|
|
|
'startDate': startDate,
|
|
|
|
|
'countryCode': countryCode,
|
|
|
|
|
'usernameType': usernameType,
|
|
|
|
|
'weekDays': weekDays,
|
2023-09-11 09:48:47 +08:00
|
|
|
}));
|
2023-09-13 18:13:36 +08:00
|
|
|
|
|
|
|
|
Future<Response> addAuthorizedAdmin(
|
|
|
|
|
String createUser,
|
|
|
|
|
String endDate,
|
|
|
|
|
String isRemoteUnlock,
|
|
|
|
|
List keyGroupIdList,
|
|
|
|
|
List lockIdList,
|
|
|
|
|
String name,
|
|
|
|
|
String startDate,
|
|
|
|
|
String userid,
|
|
|
|
|
String countryCode,
|
|
|
|
|
String usernameType) =>
|
|
|
|
|
post(
|
|
|
|
|
addAuthorizedAdminURL.toUrl,
|
|
|
|
|
jsonEncode({
|
|
|
|
|
'createUser': createUser,
|
|
|
|
|
'endDate': endDate,
|
|
|
|
|
'isRemoteUnlock': isRemoteUnlock,
|
|
|
|
|
'keyGroupIdList': keyGroupIdList,
|
|
|
|
|
'lockIdList': lockIdList,
|
|
|
|
|
'name': name,
|
|
|
|
|
'startDate': startDate,
|
|
|
|
|
'userid': userid,
|
|
|
|
|
'countryCode': countryCode,
|
|
|
|
|
'usernameType': usernameType
|
|
|
|
|
}));
|
2023-07-27 15:29:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
extension ExtensionString on String {
|
2023-08-23 14:27:50 +08:00
|
|
|
String get toUrl => this;
|
2023-08-07 10:32:24 +08:00
|
|
|
}
|