melon.yin 3 years ago
parent
commit
0754a6071a

+ 17 - 7
lib/services/device.dart

@@ -18,26 +18,36 @@ class DeviceService extends JsonRpcClientBase {
 						timeout: timeout,
 				) {
 		/// 注册响应实体反序列化处理器
-		FJsonConvert.setDecoder((map) => DeviceInfo.fromJson(map));
-		FJsonConvert.setDecoder((map) => PageCollection<DeviceInfo>.fromJson(map));
+		FJsonConvert.setDecoder((map) => DeviceInfoDTO.fromJson(map));
+		FJsonConvert.setDecoder((map) => PageCollection<DeviceInfoDTO>.fromJson(map));
 	}
 
-	Future<String> createDeviceInfoAsync(CreateDeviceInfoRequest request) async {
+	Future<bool> createDeviceInfoAsync(CreateDeviceRequest request) async {
 		var rpcRst = await call("CreateDeviceInfoAsync", request);
 		return rpcRst;
 	}
 
-	Future<DeviceInfo> getDeviceInfoAsync(String deviceCode) async {
+	Future<DeviceInfoDTO> getDeviceInfoAsync(String deviceCode) async {
 		var rpcRst = await call("GetDeviceInfoAsync", deviceCode);
-		var result = DeviceInfo.fromJson(rpcRst as Map<String, dynamic>);
+		var result = DeviceInfoDTO.fromJson(rpcRst as Map<String, dynamic>);
 		return result;
 	}
 
-	Future<PageCollection<DeviceInfo>> getDeviceInfoPageAsync(PageRequest request) async {
+	Future<PageCollection<DeviceInfoDTO>> getDeviceInfoPageAsync(PageRequest request) async {
 		var rpcRst = await call("GetDeviceInfoPageAsync", request);
-		var result = PageCollection<DeviceInfo>.fromJson(rpcRst as Map<String, dynamic>);
+		var result = PageCollection<DeviceInfoDTO>.fromJson(rpcRst as Map<String, dynamic>);
 		return result;
 	}
 
+	Future<bool> createShareDeviceToUserAsync(CreateShareDeviceToUserRequest request) async {
+		var rpcRst = await call("CreateShareDeviceToUserAsync", request);
+		return rpcRst;
+	}
+
+	Future<bool> deleteShareDeviceToUserAsync(DeleteShareDeviceToUserRequest request) async {
+		var rpcRst = await call("DeleteShareDeviceToUserAsync", request);
+		return rpcRst;
+	}
+
 }
 

+ 180 - 40
lib/services/device.m.dart

@@ -2,38 +2,17 @@ import 'package:fis_jsonrpc/utils.dart';
 
 import 'package:fis_common/json_convert.dart';
 
-class BaseRequest {
-	String? token;
-
-	BaseRequest({
-		this.token,
-	});
-
-	factory BaseRequest.fromJson(Map<String, dynamic> map) {
-		return BaseRequest( 
-			token: map['Token'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(token != null)
-			map['Token'] = token;
-		return map;
-	}
-}
-
-class BaseEntity {
+class BaseDTO {
 	DateTime? createTime;
 	DateTime? updateTime;
 
-	BaseEntity({
+	BaseDTO({
 		this.createTime,
 		this.updateTime,
 	});
 
-	factory BaseEntity.fromJson(Map<String, dynamic> map) {
-		return BaseEntity( 
+	factory BaseDTO.fromJson(Map<String, dynamic> map) {
+		return BaseDTO( 
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
 		);
@@ -49,9 +28,10 @@ class BaseEntity {
 	}
 }
 
-class DeviceInfo extends BaseEntity{
+class DeviceInfoDTO extends BaseDTO{
 	String? deviceCode;
 	String? serialNumber;
+	String? name;
 	String? description;
 	String? deviceModel;
 	String? deviceType;
@@ -61,9 +41,10 @@ class DeviceInfo extends BaseEntity{
 	String? organizationCode;
 	String? shortCode;
 
-	DeviceInfo({
+	DeviceInfoDTO({
 		this.deviceCode,
 		this.serialNumber,
+		this.name,
 		this.description,
 		this.deviceModel,
 		this.deviceType,
@@ -79,10 +60,11 @@ class DeviceInfo extends BaseEntity{
 			updateTime: updateTime,
 		);
 
-	factory DeviceInfo.fromJson(Map<String, dynamic> map) {
-		return DeviceInfo( 
+	factory DeviceInfoDTO.fromJson(Map<String, dynamic> map) {
+		return DeviceInfoDTO( 
 			deviceCode: map['DeviceCode'],
 			serialNumber: map['SerialNumber'],
+			name: map['Name'],
 			description: map['Description'],
 			deviceModel: map['DeviceModel'],
 			deviceType: map['DeviceType'],
@@ -102,6 +84,8 @@ class DeviceInfo extends BaseEntity{
 			map['DeviceCode'] = deviceCode;
 		if(serialNumber != null)
 			map['SerialNumber'] = serialNumber;
+		if(name != null)
+			map['Name'] = name;
 		if(description != null)
 			map['Description'] = description;
 		if(deviceModel != null)
@@ -122,27 +106,63 @@ class DeviceInfo extends BaseEntity{
 	}
 }
 
-class CreateDeviceInfoRequest extends BaseRequest{
-	DeviceInfo? info;
+class CreateDeviceRequest extends DeviceInfoDTO{
+	String? token;
 
-	CreateDeviceInfoRequest({
-		this.info,
-		String? token,
+	CreateDeviceRequest({
+		this.token,
+		String? deviceCode,
+		String? serialNumber,
+		String? name,
+		String? description,
+		String? deviceModel,
+		String? deviceType,
+		String? headPicUrl,
+		String? deviceSoftwareVersion,
+		String? sDKSoftwareVersion,
+		String? organizationCode,
+		String? shortCode,
+		DateTime? createTime,
+		DateTime? updateTime,
 	}) : super(
-			token: token,
+			deviceCode: deviceCode,
+			serialNumber: serialNumber,
+			name: name,
+			description: description,
+			deviceModel: deviceModel,
+			deviceType: deviceType,
+			headPicUrl: headPicUrl,
+			deviceSoftwareVersion: deviceSoftwareVersion,
+			sDKSoftwareVersion: sDKSoftwareVersion,
+			organizationCode: organizationCode,
+			shortCode: shortCode,
+			createTime: createTime,
+			updateTime: updateTime,
 		);
 
-	factory CreateDeviceInfoRequest.fromJson(Map<String, dynamic> map) {
-		return CreateDeviceInfoRequest( 
-			info: map['Info'],
+	factory CreateDeviceRequest.fromJson(Map<String, dynamic> map) {
+		return CreateDeviceRequest( 
 			token: map['Token'],
+			deviceCode: map['DeviceCode'],
+			serialNumber: map['SerialNumber'],
+			name: map['Name'],
+			description: map['Description'],
+			deviceModel: map['DeviceModel'],
+			deviceType: map['DeviceType'],
+			headPicUrl: map['HeadPicUrl'],
+			deviceSoftwareVersion: map['DeviceSoftwareVersion'],
+			sDKSoftwareVersion: map['SDKSoftwareVersion'],
+			organizationCode: map['OrganizationCode'],
+			shortCode: map['ShortCode'],
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
 		);
 	}
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
-		if(info != null)
-			map['Info'] = info;
+		if(token != null)
+			map['Token'] = token;
 		return map;
 	}
 }
@@ -185,6 +205,27 @@ class PageCollection<T> {
 	}
 }
 
+class BaseRequest {
+	String? token;
+
+	BaseRequest({
+		this.token,
+	});
+
+	factory BaseRequest.fromJson(Map<String, dynamic> map) {
+		return BaseRequest( 
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(token != null)
+			map['Token'] = token;
+		return map;
+	}
+}
+
 class PageRequest extends BaseRequest{
 	int currentPage;
 	int pageSize;
@@ -222,5 +263,104 @@ class PageRequest extends BaseRequest{
 	}
 }
 
+class BaseRequest {
+
+	BaseRequest();
+
+	factory BaseRequest.fromJson(Map<String, dynamic> map) {
+		return BaseRequest( 
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		return map;
+	}
+}
+
+class TokenRequest extends BaseRequest{
+	String? token;
+
+	TokenRequest({
+		this.token,
+	}) : super(
+		);
+
+	factory TokenRequest.fromJson(Map<String, dynamic> map) {
+		return TokenRequest( 
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(token != null)
+			map['Token'] = token;
+		return map;
+	}
+}
+
+class CreateShareDeviceToUserRequest extends TokenRequest{
+	List<String>? userCodes;
+	String? deviceCode;
+
+	CreateShareDeviceToUserRequest({
+		this.userCodes,
+		this.deviceCode,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory CreateShareDeviceToUserRequest.fromJson(Map<String, dynamic> map) {
+		final userCodesData = map['UserCodes'];
+		return CreateShareDeviceToUserRequest( 
+			userCodes: userCodesData != null ? (userCodesData as List).map((e) => e as String).toList(): null,
+			deviceCode: map['DeviceCode'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(userCodes != null)
+			map['UserCodes'] = userCodes;
+		if(deviceCode != null)
+			map['DeviceCode'] = deviceCode;
+		return map;
+	}
+}
+
+class DeleteShareDeviceToUserRequest extends TokenRequest{
+	List<String>? userCodes;
+	String? deviceCode;
+
+	DeleteShareDeviceToUserRequest({
+		this.userCodes,
+		this.deviceCode,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory DeleteShareDeviceToUserRequest.fromJson(Map<String, dynamic> map) {
+		final userCodesData = map['UserCodes'];
+		return DeleteShareDeviceToUserRequest( 
+			userCodes: userCodesData != null ? (userCodesData as List).map((e) => e as String).toList(): null,
+			deviceCode: map['DeviceCode'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(userCodes != null)
+			map['UserCodes'] = userCodes;
+		if(deviceCode != null)
+			map['DeviceCode'] = deviceCode;
+		return map;
+	}
+}
+
 
 

+ 6 - 0
lib/services/identityApply.dart

@@ -27,6 +27,12 @@ class IdentityApplyService extends JsonRpcClientBase {
 		return result;
 	}
 
+	Future<IdentityApplyStateDTO> getLastIdentityApply(GetLastIdentityApplyRequest request) async {
+		var rpcRst = await call("GetLastIdentityApply", request);
+		var result = IdentityApplyStateDTO.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
 	Future<bool> applyFor(ApplyForRequest request) async {
 		var rpcRst = await call("ApplyFor", request);
 		return rpcRst;

+ 205 - 188
lib/services/identityApply.m.dart

@@ -1,209 +1,226 @@
 import 'package:fis_jsonrpc/utils.dart';
 
 class BaseDTO {
-  DateTime? createTime;
-  DateTime? updateTime;
-
-  BaseDTO({
-    this.createTime,
-    this.updateTime,
-  });
-
-  factory BaseDTO.fromJson(Map<String, dynamic> map) {
-    return BaseDTO(
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    if (createTime != null)
-      map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
-    if (updateTime != null)
-      map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
-    return map;
-  }
+	DateTime? createTime;
+	DateTime? updateTime;
+
+	BaseDTO({
+		this.createTime,
+		this.updateTime,
+	});
+
+	factory BaseDTO.fromJson(Map<String, dynamic> map) {
+		return BaseDTO( 
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(createTime != null)
+			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
+		if(updateTime != null)
+			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
+		return map;
+	}
 }
 
-class IdentityApplyDTO extends BaseDTO {
-  String? applyPosition;
-  List<String>? identityCard;
-  List<String>? licenseCard;
-
-  IdentityApplyDTO({
-    this.applyPosition,
-    this.identityCard,
-    this.licenseCard,
-    DateTime? createTime,
-    DateTime? updateTime,
-  }) : super(
-          createTime: createTime,
-          updateTime: updateTime,
-        );
-
-  factory IdentityApplyDTO.fromJson(Map<String, dynamic> map) {
-    final identityCardData = map['IdentityCard'];
-    final licenseCardData = map['LicenseCard'];
-    return IdentityApplyDTO(
-      applyPosition: map['ApplyPosition'],
-      identityCard: identityCardData != null
-          ? (identityCardData as List).map((e) => e as String).toList()
-          : null,
-      licenseCard: licenseCardData != null
-          ? (licenseCardData as List).map((e) => e as String).toList()
-          : null,
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (applyPosition != null) map['ApplyPosition'] = applyPosition;
-    if (identityCard != null) map['IdentityCard'] = identityCard;
-    if (licenseCard != null) map['LicenseCard'] = licenseCard;
-    return map;
-  }
+class IdentityApplyDTO extends BaseDTO{
+	String? applyPosition;
+	List<String>? identityCard;
+	List<String>? licenseCard;
+
+	IdentityApplyDTO({
+		this.applyPosition,
+		this.identityCard,
+		this.licenseCard,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory IdentityApplyDTO.fromJson(Map<String, dynamic> map) {
+		final identityCardData = map['IdentityCard'];
+		final licenseCardData = map['LicenseCard'];
+		return IdentityApplyDTO( 
+			applyPosition: map['ApplyPosition'],
+			identityCard: identityCardData != null ? (identityCardData as List).map((e) => e as String).toList(): null,
+			licenseCard: licenseCardData != null ? (licenseCardData as List).map((e) => e as String).toList(): null,
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(applyPosition != null)
+			map['ApplyPosition'] = applyPosition;
+		if(identityCard != null)
+			map['IdentityCard'] = identityCard;
+		if(licenseCard != null)
+			map['LicenseCard'] = licenseCard;
+		return map;
+	}
 }
 
 enum ApplyStateEnum {
-  NotApply,
-  Applying,
-  Refused,
-  Passed,
+	NotApply,
+	Applying,
+	Refused,
+	Passed,
 }
 
-class IdentityApplyStateDTO extends IdentityApplyDTO {
-  ApplyStateEnum applyState;
-  String? applyNote;
-
-  IdentityApplyStateDTO({
-    this.applyState = ApplyStateEnum.NotApply,
-    this.applyNote,
-    String? applyPosition,
-    List<String>? identityCard,
-    List<String>? licenseCard,
-    DateTime? createTime,
-    DateTime? updateTime,
-  }) : super(
-          applyPosition: applyPosition,
-          identityCard: identityCard,
-          licenseCard: licenseCard,
-          createTime: createTime,
-          updateTime: updateTime,
-        );
-
-  factory IdentityApplyStateDTO.fromJson(Map<String, dynamic> map) {
-    final identityCardData = map['IdentityCard'];
-    final licenseCardData = map['LicenseCard'];
-    return IdentityApplyStateDTO(
-      applyState:
-          ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
-      applyNote: map['ApplyNote'],
-      applyPosition: map['ApplyPosition'],
-      identityCard: identityCardData != null
-          ? (identityCardData as List).map((e) => e as String).toList()
-          : null,
-      licenseCard: licenseCardData != null
-          ? (licenseCardData as List).map((e) => e as String).toList()
-          : null,
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    map['ApplyState'] = applyState.index;
-    if (applyNote != null) map['ApplyNote'] = applyNote;
-    return map;
-  }
+class IdentityApplyStateDTO extends IdentityApplyDTO{
+	ApplyStateEnum applyState;
+	String? applyNote;
+
+	IdentityApplyStateDTO({
+		this.applyState = ApplyStateEnum.NotApply,
+		this.applyNote,
+		String? applyPosition,
+		List<String>? identityCard,
+		List<String>? licenseCard,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			applyPosition: applyPosition,
+			identityCard: identityCard,
+			licenseCard: licenseCard,
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory IdentityApplyStateDTO.fromJson(Map<String, dynamic> map) {
+		final identityCardData = map['IdentityCard'];
+		final licenseCardData = map['LicenseCard'];
+		return IdentityApplyStateDTO( 
+			applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
+			applyNote: map['ApplyNote'],
+			applyPosition: map['ApplyPosition'],
+			identityCard: identityCardData != null ? (identityCardData as List).map((e) => e as String).toList(): null,
+			licenseCard: licenseCardData != null ? (licenseCardData as List).map((e) => e as String).toList(): null,
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		map['ApplyState'] = applyState.index;
+		if(applyNote != null)
+			map['ApplyNote'] = applyNote;
+		return map;
+	}
 }
 
 class BaseRequest {
-  BaseRequest();
 
-  factory BaseRequest.fromJson(Map<String, dynamic> map) {
-    return BaseRequest();
-  }
+	BaseRequest();
 
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    return map;
-  }
-}
-
-class TokenRequest extends BaseRequest {
-  String? token;
+	factory BaseRequest.fromJson(Map<String, dynamic> map) {
+		return BaseRequest( 
+		);
+	}
 
-  TokenRequest({
-    this.token,
-  }) : super();
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		return map;
+	}
+}
 
-  factory TokenRequest.fromJson(Map<String, dynamic> map) {
-    return TokenRequest(
-      token: map['Token'],
-    );
-  }
+class TokenRequest extends BaseRequest{
+	String? token;
+
+	TokenRequest({
+		this.token,
+	}) : super(
+		);
+
+	factory TokenRequest.fromJson(Map<String, dynamic> map) {
+		return TokenRequest( 
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(token != null)
+			map['Token'] = token;
+		return map;
+	}
+}
 
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (token != null) map['Token'] = token;
-    return map;
-  }
+class GetLastIdentityApplyRequest extends TokenRequest{
+	String? applyPosition;
+
+	GetLastIdentityApplyRequest({
+		this.applyPosition,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory GetLastIdentityApplyRequest.fromJson(Map<String, dynamic> map) {
+		return GetLastIdentityApplyRequest( 
+			applyPosition: map['ApplyPosition'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(applyPosition != null)
+			map['ApplyPosition'] = applyPosition;
+		return map;
+	}
 }
 
-class ApplyForRequest extends IdentityApplyDTO {
-  String? token;
-  String? extensionData;
-
-  ApplyForRequest({
-    this.token,
-    this.extensionData,
-    String? applyPosition,
-    List<String>? identityCard,
-    List<String>? licenseCard,
-    DateTime? createTime,
-    DateTime? updateTime,
-  }) : super(
-          applyPosition: applyPosition,
-          identityCard: identityCard,
-          licenseCard: licenseCard,
-          createTime: createTime,
-          updateTime: updateTime,
-        );
-
-  factory ApplyForRequest.fromJson(Map<String, dynamic> map) {
-    final identityCardData = map['IdentityCard'];
-    final licenseCardData = map['LicenseCard'];
-    return ApplyForRequest(
-      token: map['Token'],
-      extensionData: map['ExtensionData'],
-      applyPosition: map['ApplyPosition'],
-      identityCard: identityCardData != null
-          ? (identityCardData as List).map((e) => e as String).toList()
-          : null,
-      licenseCard: licenseCardData != null
-          ? (licenseCardData as List).map((e) => e as String).toList()
-          : null,
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (token != null) map['Token'] = token;
-    if (extensionData != null) map['ExtensionData'] = extensionData;
-    return map;
-  }
+class ApplyForRequest extends IdentityApplyDTO{
+	String? token;
+	String? extensionData;
+
+	ApplyForRequest({
+		this.token,
+		this.extensionData,
+		String? applyPosition,
+		List<String>? identityCard,
+		List<String>? licenseCard,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			applyPosition: applyPosition,
+			identityCard: identityCard,
+			licenseCard: licenseCard,
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory ApplyForRequest.fromJson(Map<String, dynamic> map) {
+		final identityCardData = map['IdentityCard'];
+		final licenseCardData = map['LicenseCard'];
+		return ApplyForRequest( 
+			token: map['Token'],
+			extensionData: map['ExtensionData'],
+			applyPosition: map['ApplyPosition'],
+			identityCard: identityCardData != null ? (identityCardData as List).map((e) => e as String).toList(): null,
+			licenseCard: licenseCardData != null ? (licenseCardData as List).map((e) => e as String).toList(): null,
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(token != null)
+			map['Token'] = token;
+		if(extensionData != null)
+			map['ExtensionData'] = extensionData;
+		return map;
+	}
 }
+
+
+

+ 0 - 11
lib/services/login.dart

@@ -21,12 +21,6 @@ class LoginService extends JsonRpcClientBase {
 		FJsonConvert.setDecoder((map) => UserTokenDTO.fromJson(map));
 	}
 
-	Future<UserTokenDTO> clientLoginAsync(ClientLoginRequest request) async {
-		var rpcRst = await call("ClientLoginAsync", request);
-		var result = UserTokenDTO.fromJson(rpcRst as Map<String, dynamic>);
-		return result;
-	}
-
 	Future<UserTokenDTO> commonLoginAsync(CommonLoginRequest request) async {
 		var rpcRst = await call("CommonLoginAsync", request);
 		var result = UserTokenDTO.fromJson(rpcRst as Map<String, dynamic>);
@@ -43,11 +37,6 @@ class LoginService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
-	Future<bool> signUpAsync(SignUpRequest request) async {
-		var rpcRst = await call("SignUpAsync", request);
-		return rpcRst;
-	}
-
 	Future<bool> checkSMSVerificationCode(CheckSMSVerificationCodeRequest request) async {
 		var rpcRst = await call("CheckSMSVerificationCode", request);
 		return rpcRst;

+ 10 - 373
lib/services/login.m.dart

@@ -1,5 +1,3 @@
-import 'package:fis_jsonrpc/utils.dart';
-
 class UserTokenDTO {
 	String? userCode;
 	String? deviceId;
@@ -31,161 +29,17 @@ class UserTokenDTO {
 	}
 }
 
-enum EnumLoginProcessorType {
-	Official,
-	Wechat,
-	Phone,
-	Email,
-	Unregistered,
-}
-
-class LoginProcessorDTO {
-	String? userName;
-	String? password;
-	String? phone;
-	String? email;
-	String? verifyCode;
-	String? wechatToken;
-
-	LoginProcessorDTO({
-		this.userName,
-		this.password,
-		this.phone,
-		this.email,
-		this.verifyCode,
-		this.wechatToken,
-	});
-
-	factory LoginProcessorDTO.fromJson(Map<String, dynamic> map) {
-		return LoginProcessorDTO( 
-			userName: map['UserName'],
-			password: map['Password'],
-			phone: map['Phone'],
-			email: map['Email'],
-			verifyCode: map['VerifyCode'],
-			wechatToken: map['WechatToken'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(userName != null)
-			map['UserName'] = userName;
-		if(password != null)
-			map['Password'] = password;
-		if(phone != null)
-			map['Phone'] = phone;
-		if(email != null)
-			map['Email'] = email;
-		if(verifyCode != null)
-			map['VerifyCode'] = verifyCode;
-		if(wechatToken != null)
-			map['WechatToken'] = wechatToken;
-		return map;
-	}
-}
-
-class ClientDTO {
-	String? clientIpAndPort;
-	String? clientDeviceId;
-	String? clientSource;
-	String? clientExtensionInfo;
-
-	ClientDTO({
-		this.clientIpAndPort,
-		this.clientDeviceId,
-		this.clientSource,
-		this.clientExtensionInfo,
-	});
-
-	factory ClientDTO.fromJson(Map<String, dynamic> map) {
-		return ClientDTO( 
-			clientIpAndPort: map['ClientIpAndPort'],
-			clientDeviceId: map['ClientDeviceId'],
-			clientSource: map['ClientSource'],
-			clientExtensionInfo: map['ClientExtensionInfo'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(clientIpAndPort != null)
-			map['ClientIpAndPort'] = clientIpAndPort;
-		if(clientDeviceId != null)
-			map['ClientDeviceId'] = clientDeviceId;
-		if(clientSource != null)
-			map['ClientSource'] = clientSource;
-		if(clientExtensionInfo != null)
-			map['ClientExtensionInfo'] = clientExtensionInfo;
-		return map;
-	}
-}
-
-class UserLoginDTO {
-	EnumLoginProcessorType loginType;
-	LoginProcessorDTO? processorInfo;
-	ClientDTO? clientInfo;
-
-	UserLoginDTO({
-		this.loginType = EnumLoginProcessorType.Official,
-		this.processorInfo,
-		this.clientInfo,
-	});
-
-	factory UserLoginDTO.fromJson(Map<String, dynamic> map) {
-		return UserLoginDTO( 
-			loginType: EnumLoginProcessorType.values.firstWhere((e) => e.index == map['LoginType']),
-			processorInfo: map['ProcessorInfo'],
-			clientInfo: map['ClientInfo'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		map['LoginType'] = loginType.index;
-		if(processorInfo != null)
-			map['ProcessorInfo'] = processorInfo;
-		if(clientInfo != null)
-			map['ClientInfo'] = clientInfo;
-		return map;
-	}
-}
-
-class ClientLoginRequest extends UserLoginDTO{
-
-	ClientLoginRequest({
-		EnumLoginProcessorType loginType = EnumLoginProcessorType.Official,
-		LoginProcessorDTO? processorInfo,
-		ClientDTO? clientInfo,
-	}) : super(
-			loginType: loginType,
-			processorInfo: processorInfo,
-			clientInfo: clientInfo,
-		);
-
-	factory ClientLoginRequest.fromJson(Map<String, dynamic> map) {
-		return ClientLoginRequest( 
-			loginType: EnumLoginProcessorType.values.firstWhere((e) => e.index == map['LoginType']),
-			processorInfo: map['ProcessorInfo'],
-			clientInfo: map['ClientInfo'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		return map;
-	}
-}
-
 class CommonLoginRequest {
 	String? anyAccount;
 	String? anyCode;
 	String? password;
+	Map<String,String>? headerMap;
 
 	CommonLoginRequest({
 		this.anyAccount,
 		this.anyCode,
 		this.password,
+		this.headerMap,
 	});
 
 	factory CommonLoginRequest.fromJson(Map<String, dynamic> map) {
@@ -193,6 +47,7 @@ class CommonLoginRequest {
 			anyAccount: map['AnyAccount'],
 			anyCode: map['AnyCode'],
 			password: map['Password'],
+			headerMap: map['HeaderMap'].cast<String,String>(),
 		);
 	}
 
@@ -204,6 +59,8 @@ class CommonLoginRequest {
 			map['AnyCode'] = anyCode;
 		if(password != null)
 			map['Password'] = password;
+		if(headerMap != null)
+			map['HeaderMap'] = headerMap;
 		return map;
 	}
 }
@@ -233,11 +90,13 @@ class CommonSignUpRequest {
 	String? anyAccount;
 	String? anyCode;
 	String? password;
+	Map<String,String>? headerMap;
 
 	CommonSignUpRequest({
 		this.anyAccount,
 		this.anyCode,
 		this.password,
+		this.headerMap,
 	});
 
 	factory CommonSignUpRequest.fromJson(Map<String, dynamic> map) {
@@ -245,6 +104,7 @@ class CommonSignUpRequest {
 			anyAccount: map['AnyAccount'],
 			anyCode: map['AnyCode'],
 			password: map['Password'],
+			headerMap: map['HeaderMap'].cast<String,String>(),
 		);
 	}
 
@@ -256,231 +116,8 @@ class CommonSignUpRequest {
 			map['AnyCode'] = anyCode;
 		if(password != null)
 			map['Password'] = password;
-		return map;
-	}
-}
-
-class BaseDTO {
-	DateTime? createTime;
-	DateTime? updateTime;
-
-	BaseDTO({
-		this.createTime,
-		this.updateTime,
-	});
-
-	factory BaseDTO.fromJson(Map<String, dynamic> map) {
-		return BaseDTO( 
-			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(createTime != null)
-			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
-		if(updateTime != null)
-			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
-		return map;
-	}
-}
-
-enum UserInfoStateEnum {
-	Nonactivated,
-	Activated,
-}
-
-enum ApplyStateEnum {
-	NotApply,
-	Applying,
-	Refused,
-	Passed,
-}
-
-class UserDTO extends BaseDTO{
-	String? userCode;
-	String? userName;
-	String? phone;
-	String? email;
-	String? nickName;
-	String? fullName;
-	String? headImageUrl;
-	String? organizationCode;
-	String? rootOrganizationCode;
-	List<String>? authorityGroups;
-	List<String>? bindDevices;
-	String? lastIP;
-	int logintimes;
-	UserInfoStateEnum userState;
-	List<String>? roleCodes;
-	List<String>? rankCodes;
-	List<String>? positionCodes;
-	ApplyStateEnum applyState;
-
-	UserDTO({
-		this.userCode,
-		this.userName,
-		this.phone,
-		this.email,
-		this.nickName,
-		this.fullName,
-		this.headImageUrl,
-		this.organizationCode,
-		this.rootOrganizationCode,
-		this.authorityGroups,
-		this.bindDevices,
-		this.lastIP,
-		this.logintimes = 0,
-		this.userState = UserInfoStateEnum.Nonactivated,
-		this.roleCodes,
-		this.rankCodes,
-		this.positionCodes,
-		this.applyState = ApplyStateEnum.NotApply,
-		DateTime? createTime,
-		DateTime? updateTime,
-	}) : super(
-			createTime: createTime,
-			updateTime: updateTime,
-		);
-
-	factory UserDTO.fromJson(Map<String, dynamic> map) {
-		return UserDTO( 
-			userCode: map['UserCode'],
-			userName: map['UserName'],
-			phone: map['Phone'],
-			email: map['Email'],
-			nickName: map['NickName'],
-			fullName: map['FullName'],
-			headImageUrl: map['HeadImageUrl'],
-			organizationCode: map['OrganizationCode'],
-			rootOrganizationCode: map['RootOrganizationCode'],
-			authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
-			bindDevices: map['BindDevices'].cast<String>().toList(),
-			lastIP: map['LastIP'],
-			logintimes: map['Logintimes'],
-			userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
-			roleCodes: map['RoleCodes'].cast<String>().toList(),
-			rankCodes: map['RankCodes'].cast<String>().toList(),
-			positionCodes: map['PositionCodes'].cast<String>().toList(),
-			applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
-			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(userCode != null)
-			map['UserCode'] = userCode;
-		if(userName != null)
-			map['UserName'] = userName;
-		if(phone != null)
-			map['Phone'] = phone;
-		if(email != null)
-			map['Email'] = email;
-		if(nickName != null)
-			map['NickName'] = nickName;
-		if(fullName != null)
-			map['FullName'] = fullName;
-		if(headImageUrl != null)
-			map['HeadImageUrl'] = headImageUrl;
-		if(organizationCode != null)
-			map['OrganizationCode'] = organizationCode;
-		if(rootOrganizationCode != null)
-			map['RootOrganizationCode'] = rootOrganizationCode;
-		if(authorityGroups != null)
-			map['AuthorityGroups'] = authorityGroups;
-		if(bindDevices != null)
-			map['BindDevices'] = bindDevices;
-		if(lastIP != null)
-			map['LastIP'] = lastIP;
-		map['Logintimes'] = logintimes;
-		map['UserState'] = userState.index;
-		if(roleCodes != null)
-			map['RoleCodes'] = roleCodes;
-		if(rankCodes != null)
-			map['RankCodes'] = rankCodes;
-		if(positionCodes != null)
-			map['PositionCodes'] = positionCodes;
-		map['ApplyState'] = applyState.index;
-		return map;
-	}
-}
-
-class SignUpRequest extends UserDTO{
-
-	SignUpRequest({
-		String? userCode,
-		String? userName,
-		String? phone,
-		String? email,
-		String? nickName,
-		String? fullName,
-		String? headImageUrl,
-		String? organizationCode,
-		String? rootOrganizationCode,
-		List<String>? authorityGroups,
-		List<String>? bindDevices,
-		String? lastIP,
-		int logintimes = 0,
-		UserInfoStateEnum userState = UserInfoStateEnum.Nonactivated,
-		List<String>? roleCodes,
-		List<String>? rankCodes,
-		List<String>? positionCodes,
-		ApplyStateEnum applyState = ApplyStateEnum.NotApply,
-		DateTime? createTime,
-		DateTime? updateTime,
-	}) : super(
-			userCode: userCode,
-			userName: userName,
-			phone: phone,
-			email: email,
-			nickName: nickName,
-			fullName: fullName,
-			headImageUrl: headImageUrl,
-			organizationCode: organizationCode,
-			rootOrganizationCode: rootOrganizationCode,
-			authorityGroups: authorityGroups,
-			bindDevices: bindDevices,
-			lastIP: lastIP,
-			logintimes: logintimes,
-			userState: userState,
-			roleCodes: roleCodes,
-			rankCodes: rankCodes,
-			positionCodes: positionCodes,
-			applyState: applyState,
-			createTime: createTime,
-			updateTime: updateTime,
-		);
-
-	factory SignUpRequest.fromJson(Map<String, dynamic> map) {
-		return SignUpRequest( 
-			userCode: map['UserCode'],
-			userName: map['UserName'],
-			phone: map['Phone'],
-			email: map['Email'],
-			nickName: map['NickName'],
-			fullName: map['FullName'],
-			headImageUrl: map['HeadImageUrl'],
-			organizationCode: map['OrganizationCode'],
-			rootOrganizationCode: map['RootOrganizationCode'],
-			authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
-			bindDevices: map['BindDevices'].cast<String>().toList(),
-			lastIP: map['LastIP'],
-			logintimes: map['Logintimes'],
-			userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
-			roleCodes: map['RoleCodes'].cast<String>().toList(),
-			rankCodes: map['RankCodes'].cast<String>().toList(),
-			positionCodes: map['PositionCodes'].cast<String>().toList(),
-			applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
-			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
+		if(headerMap != null)
+			map['HeaderMap'] = headerMap;
 		return map;
 	}
 }

+ 401 - 373
lib/services/organization.m.dart

@@ -1,414 +1,442 @@
 import 'package:fis_jsonrpc/utils.dart';
 
 class BaseDTO {
-  DateTime? createTime;
-  DateTime? updateTime;
-
-  BaseDTO({
-    this.createTime,
-    this.updateTime,
-  });
-
-  factory BaseDTO.fromJson(Map<String, dynamic> map) {
-    return BaseDTO(
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    if (createTime != null)
-      map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
-    if (updateTime != null)
-      map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
-    return map;
-  }
+	DateTime? createTime;
+	DateTime? updateTime;
+
+	BaseDTO({
+		this.createTime,
+		this.updateTime,
+	});
+
+	factory BaseDTO.fromJson(Map<String, dynamic> map) {
+		return BaseDTO( 
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(createTime != null)
+			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
+		if(updateTime != null)
+			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
+		return map;
+	}
 }
 
-class OrganizationBaseDTO extends BaseDTO {
-  String? organizationCode;
-  String? organizationName;
-
-  OrganizationBaseDTO({
-    this.organizationCode,
-    this.organizationName,
-    DateTime? createTime,
-    DateTime? updateTime,
-  }) : super(
-          createTime: createTime,
-          updateTime: updateTime,
-        );
-
-  factory OrganizationBaseDTO.fromJson(Map<String, dynamic> map) {
-    return OrganizationBaseDTO(
-      organizationCode: map['OrganizationCode'],
-      organizationName: map['OrganizationName'],
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (organizationCode != null) map['OrganizationCode'] = organizationCode;
-    if (organizationName != null) map['OrganizationName'] = organizationName;
-    return map;
-  }
+class OrganizationBaseDTO extends BaseDTO{
+	String? organizationCode;
+	String? organizationName;
+
+	OrganizationBaseDTO({
+		this.organizationCode,
+		this.organizationName,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory OrganizationBaseDTO.fromJson(Map<String, dynamic> map) {
+		return OrganizationBaseDTO( 
+			organizationCode: map['OrganizationCode'],
+			organizationName: map['OrganizationName'],
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(organizationCode != null)
+			map['OrganizationCode'] = organizationCode;
+		if(organizationName != null)
+			map['OrganizationName'] = organizationName;
+		return map;
+	}
 }
 
-class OrganizationBasicDTO extends OrganizationBaseDTO {
-  String? regionCode;
-  String? parentCode;
-  String? logoUrl;
-
-  OrganizationBasicDTO({
-    this.regionCode,
-    this.parentCode,
-    this.logoUrl,
-    String? organizationCode,
-    String? organizationName,
-    DateTime? createTime,
-    DateTime? updateTime,
-  }) : super(
-          organizationCode: organizationCode,
-          organizationName: organizationName,
-          createTime: createTime,
-          updateTime: updateTime,
-        );
-
-  factory OrganizationBasicDTO.fromJson(Map<String, dynamic> map) {
-    return OrganizationBasicDTO(
-      regionCode: map['RegionCode'],
-      parentCode: map['ParentCode'],
-      logoUrl: map['LogoUrl'],
-      organizationCode: map['OrganizationCode'],
-      organizationName: map['OrganizationName'],
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (regionCode != null) map['RegionCode'] = regionCode;
-    if (parentCode != null) map['ParentCode'] = parentCode;
-    if (logoUrl != null) map['LogoUrl'] = logoUrl;
-    return map;
-  }
+class OrganizationBasicDTO extends OrganizationBaseDTO{
+	String? regionCode;
+	String? parentCode;
+	String? logoUrl;
+
+	OrganizationBasicDTO({
+		this.regionCode,
+		this.parentCode,
+		this.logoUrl,
+		String? organizationCode,
+		String? organizationName,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			organizationCode: organizationCode,
+			organizationName: organizationName,
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory OrganizationBasicDTO.fromJson(Map<String, dynamic> map) {
+		return OrganizationBasicDTO( 
+			regionCode: map['RegionCode'],
+			parentCode: map['ParentCode'],
+			logoUrl: map['LogoUrl'],
+			organizationCode: map['OrganizationCode'],
+			organizationName: map['OrganizationName'],
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(regionCode != null)
+			map['RegionCode'] = regionCode;
+		if(parentCode != null)
+			map['ParentCode'] = parentCode;
+		if(logoUrl != null)
+			map['LogoUrl'] = logoUrl;
+		return map;
+	}
 }
 
 enum OrganizationTypeEnum {
-  Corporation,
-  Department,
-  Section,
+	Corporation,
+	Department,
+	Section,
 }
 
-class OrganizationDTO extends OrganizationBasicDTO {
-  String? description;
-  String? rootCode;
-  OrganizationTypeEnum organizationType;
-  List<String>? authorityGroups;
-  String? nautica;
-
-  OrganizationDTO({
-    this.description,
-    this.rootCode,
-    this.organizationType = OrganizationTypeEnum.Corporation,
-    this.authorityGroups,
-    this.nautica,
-    String? regionCode,
-    String? parentCode,
-    String? logoUrl,
-    String? organizationCode,
-    String? organizationName,
-    DateTime? createTime,
-    DateTime? updateTime,
-  }) : super(
-          regionCode: regionCode,
-          parentCode: parentCode,
-          logoUrl: logoUrl,
-          organizationCode: organizationCode,
-          organizationName: organizationName,
-          createTime: createTime,
-          updateTime: updateTime,
-        );
-
-  factory OrganizationDTO.fromJson(Map<String, dynamic> map) {
-    return OrganizationDTO(
-      description: map['Description'],
-      rootCode: map['RootCode'],
-      organizationType: OrganizationTypeEnum.values
-          .firstWhere((e) => e.index == map['OrganizationType']),
-      authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
-      nautica: map['Nautica'],
-      regionCode: map['RegionCode'],
-      parentCode: map['ParentCode'],
-      logoUrl: map['LogoUrl'],
-      organizationCode: map['OrganizationCode'],
-      organizationName: map['OrganizationName'],
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (description != null) map['Description'] = description;
-    if (rootCode != null) map['RootCode'] = rootCode;
-    map['OrganizationType'] = organizationType.index;
-    if (authorityGroups != null) map['AuthorityGroups'] = authorityGroups;
-    if (nautica != null) map['Nautica'] = nautica;
-    return map;
-  }
+enum OrganizationStateEnum {
+	WaitAudit,
+	Audited,
+	Rejected,
+}
+
+class OrganizationDTO extends OrganizationBasicDTO{
+	String? description;
+	String? rootCode;
+	OrganizationTypeEnum organizationType;
+	List<String>? authorityGroups;
+	String? nautica;
+	OrganizationStateEnum state;
+	List<String>? directors;
+
+	OrganizationDTO({
+		this.description,
+		this.rootCode,
+		this.organizationType = OrganizationTypeEnum.Corporation,
+		this.authorityGroups,
+		this.nautica,
+		this.state = OrganizationStateEnum.WaitAudit,
+		this.directors,
+		String? regionCode,
+		String? parentCode,
+		String? logoUrl,
+		String? organizationCode,
+		String? organizationName,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			regionCode: regionCode,
+			parentCode: parentCode,
+			logoUrl: logoUrl,
+			organizationCode: organizationCode,
+			organizationName: organizationName,
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory OrganizationDTO.fromJson(Map<String, dynamic> map) {
+		return OrganizationDTO( 
+			description: map['Description'],
+			rootCode: map['RootCode'],
+			organizationType: OrganizationTypeEnum.values.firstWhere((e) => e.index == map['OrganizationType']),
+			authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
+			nautica: map['Nautica'],
+			state: OrganizationStateEnum.values.firstWhere((e) => e.index == map['State']),
+			directors: map['Directors'].cast<String>().toList(),
+			regionCode: map['RegionCode'],
+			parentCode: map['ParentCode'],
+			logoUrl: map['LogoUrl'],
+			organizationCode: map['OrganizationCode'],
+			organizationName: map['OrganizationName'],
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(description != null)
+			map['Description'] = description;
+		if(rootCode != null)
+			map['RootCode'] = rootCode;
+		map['OrganizationType'] = organizationType.index;
+		if(authorityGroups != null)
+			map['AuthorityGroups'] = authorityGroups;
+		if(nautica != null)
+			map['Nautica'] = nautica;
+		map['State'] = state.index;
+		if(directors != null)
+			map['Directors'] = directors;
+		return map;
+	}
 }
 
 class SearchOrganizationsRequest {
-  String? keyword;
-  String? parentCode;
-  OrganizationTypeEnum organizationType;
-
-  SearchOrganizationsRequest({
-    this.keyword,
-    this.parentCode,
-    this.organizationType = OrganizationTypeEnum.Corporation,
-  });
-
-  factory SearchOrganizationsRequest.fromJson(Map<String, dynamic> map) {
-    return SearchOrganizationsRequest(
-      keyword: map['Keyword'],
-      parentCode: map['ParentCode'],
-      organizationType: OrganizationTypeEnum.values
-          .firstWhere((e) => e.index == map['OrganizationType']),
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    if (keyword != null) map['Keyword'] = keyword;
-    if (parentCode != null) map['ParentCode'] = parentCode;
-    map['OrganizationType'] = organizationType.index;
-    return map;
-  }
+	String? keyword;
+	String? parentCode;
+	OrganizationTypeEnum organizationType;
+
+	SearchOrganizationsRequest({
+		this.keyword,
+		this.parentCode,
+		this.organizationType = OrganizationTypeEnum.Corporation,
+	});
+
+	factory SearchOrganizationsRequest.fromJson(Map<String, dynamic> map) {
+		return SearchOrganizationsRequest( 
+			keyword: map['Keyword'],
+			parentCode: map['ParentCode'],
+			organizationType: OrganizationTypeEnum.values.firstWhere((e) => e.index == map['OrganizationType']),
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(keyword != null)
+			map['Keyword'] = keyword;
+		if(parentCode != null)
+			map['ParentCode'] = parentCode;
+		map['OrganizationType'] = organizationType.index;
+		return map;
+	}
 }
 
 class GetOrganizationByCodeRequest {
-  String? organizationCode;
-
-  GetOrganizationByCodeRequest({
-    this.organizationCode,
-  });
-
-  factory GetOrganizationByCodeRequest.fromJson(Map<String, dynamic> map) {
-    return GetOrganizationByCodeRequest(
-      organizationCode: map['OrganizationCode'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    if (organizationCode != null) map['OrganizationCode'] = organizationCode;
-    return map;
-  }
+	String? organizationCode;
+
+	GetOrganizationByCodeRequest({
+		this.organizationCode,
+	});
+
+	factory GetOrganizationByCodeRequest.fromJson(Map<String, dynamic> map) {
+		return GetOrganizationByCodeRequest( 
+			organizationCode: map['OrganizationCode'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(organizationCode != null)
+			map['OrganizationCode'] = organizationCode;
+		return map;
+	}
 }
 
 class BaseRequest {
-  BaseRequest();
 
-  factory BaseRequest.fromJson(Map<String, dynamic> map) {
-    return BaseRequest();
-  }
+	BaseRequest();
+
+	factory BaseRequest.fromJson(Map<String, dynamic> map) {
+		return BaseRequest( 
+		);
+	}
 
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    return map;
-  }
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		return map;
+	}
 }
 
-class TokenRequest extends BaseRequest {
-  String? token;
+class TokenRequest extends BaseRequest{
+	String? token;
+
+	TokenRequest({
+		this.token,
+	}) : super(
+		);
+
+	factory TokenRequest.fromJson(Map<String, dynamic> map) {
+		return TokenRequest( 
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(token != null)
+			map['Token'] = token;
+		return map;
+	}
+}
 
-  TokenRequest({
-    this.token,
-  }) : super();
+class GetParentOrganizationListRequest extends TokenRequest{
 
-  factory TokenRequest.fromJson(Map<String, dynamic> map) {
-    return TokenRequest(
-      token: map['Token'],
-    );
-  }
+	GetParentOrganizationListRequest({
+		String? token,
+	}) : super(
+			token: token,
+		);
 
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (token != null) map['Token'] = token;
-    return map;
-  }
-}
+	factory GetParentOrganizationListRequest.fromJson(Map<String, dynamic> map) {
+		return GetParentOrganizationListRequest( 
+			token: map['Token'],
+		);
+	}
 
-class GetParentOrganizationListRequest extends TokenRequest {
-  GetParentOrganizationListRequest({
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory GetParentOrganizationListRequest.fromJson(Map<String, dynamic> map) {
-    return GetParentOrganizationListRequest(
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    return map;
-  }
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		return map;
+	}
 }
 
-class GetPersonOrganizationRequest extends TokenRequest {
-  GetPersonOrganizationRequest({
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory GetPersonOrganizationRequest.fromJson(Map<String, dynamic> map) {
-    return GetPersonOrganizationRequest(
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    return map;
-  }
+class GetPersonOrganizationRequest extends TokenRequest{
+
+	GetPersonOrganizationRequest({
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory GetPersonOrganizationRequest.fromJson(Map<String, dynamic> map) {
+		return GetPersonOrganizationRequest( 
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		return map;
+	}
 }
 
-class SavePersonOrganizationRequest extends OrganizationBasicDTO {
-  String? token;
-
-  SavePersonOrganizationRequest({
-    this.token,
-    String? regionCode,
-    String? parentCode,
-    String? logoUrl,
-    String? organizationCode,
-    String? organizationName,
-    DateTime? createTime,
-    DateTime? updateTime,
-  }) : super(
-          regionCode: regionCode,
-          parentCode: parentCode,
-          logoUrl: logoUrl,
-          organizationCode: organizationCode,
-          organizationName: organizationName,
-          createTime: createTime,
-          updateTime: updateTime,
-        );
-
-  factory SavePersonOrganizationRequest.fromJson(Map<String, dynamic> map) {
-    return SavePersonOrganizationRequest(
-      token: map['Token'],
-      regionCode: map['RegionCode'],
-      parentCode: map['ParentCode'],
-      logoUrl: map['LogoUrl'],
-      organizationCode: map['OrganizationCode'],
-      organizationName: map['OrganizationName'],
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (token != null) map['Token'] = token;
-    return map;
-  }
+class SavePersonOrganizationRequest extends OrganizationBasicDTO{
+	String? token;
+
+	SavePersonOrganizationRequest({
+		this.token,
+		String? regionCode,
+		String? parentCode,
+		String? logoUrl,
+		String? organizationCode,
+		String? organizationName,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			regionCode: regionCode,
+			parentCode: parentCode,
+			logoUrl: logoUrl,
+			organizationCode: organizationCode,
+			organizationName: organizationName,
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory SavePersonOrganizationRequest.fromJson(Map<String, dynamic> map) {
+		return SavePersonOrganizationRequest( 
+			token: map['Token'],
+			regionCode: map['RegionCode'],
+			parentCode: map['ParentCode'],
+			logoUrl: map['LogoUrl'],
+			organizationCode: map['OrganizationCode'],
+			organizationName: map['OrganizationName'],
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(token != null)
+			map['Token'] = token;
+		return map;
+	}
 }
 
 class OrganizationItemDTO {
-  String? organizationName;
-  String? parentCode;
-  String? extendsData;
-
-  OrganizationItemDTO({
-    this.organizationName,
-    this.parentCode,
-    this.extendsData,
-  });
-
-  factory OrganizationItemDTO.fromJson(Map<String, dynamic> map) {
-    return OrganizationItemDTO(
-      organizationName: map['OrganizationName'],
-      parentCode: map['ParentCode'],
-      extendsData: map['ExtendsData'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    if (organizationName != null) map['OrganizationName'] = organizationName;
-    if (parentCode != null) map['ParentCode'] = parentCode;
-    if (extendsData != null) map['ExtendsData'] = extendsData;
-    return map;
-  }
+	String? organizationName;
+	String? parentCode;
+	String? extendsData;
+
+	OrganizationItemDTO({
+		this.organizationName,
+		this.parentCode,
+		this.extendsData,
+	});
+
+	factory OrganizationItemDTO.fromJson(Map<String, dynamic> map) {
+		return OrganizationItemDTO( 
+			organizationName: map['OrganizationName'],
+			parentCode: map['ParentCode'],
+			extendsData: map['ExtendsData'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(organizationName != null)
+			map['OrganizationName'] = organizationName;
+		if(parentCode != null)
+			map['ParentCode'] = parentCode;
+		if(extendsData != null)
+			map['ExtendsData'] = extendsData;
+		return map;
+	}
 }
 
-class AddOrganizationsRequest extends TokenRequest {
-  List<OrganizationItemDTO>? organizationInfos;
-
-  AddOrganizationsRequest({
-    this.organizationInfos,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory AddOrganizationsRequest.fromJson(Map<String, dynamic> map) {
-    return AddOrganizationsRequest(
-      organizationInfos: map['OrganizationInfos']
-          .map((e) => OrganizationItemDTO.fromJson(e as Map<String, dynamic>))
-          .toList(),
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (organizationInfos != null) map['OrganizationInfos'] = organizationInfos;
-    return map;
-  }
+class AddOrganizationsRequest extends TokenRequest{
+	List<OrganizationItemDTO>? organizationInfos;
+
+	AddOrganizationsRequest({
+		this.organizationInfos,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory AddOrganizationsRequest.fromJson(Map<String, dynamic> map) {
+		return AddOrganizationsRequest( 
+			organizationInfos: map['OrganizationInfos'].map((e)=>OrganizationItemDTO.fromJson(e as Map<String,dynamic>)).toList(),
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(organizationInfos != null)
+			map['OrganizationInfos'] = organizationInfos;
+		return map;
+	}
 }
 
-class RemoveOrganizationsRequest extends TokenRequest {
-  List<String>? organizationCodes;
-
-  RemoveOrganizationsRequest({
-    this.organizationCodes,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory RemoveOrganizationsRequest.fromJson(Map<String, dynamic> map) {
-    return RemoveOrganizationsRequest(
-      organizationCodes: map['OrganizationCodes'].cast<String>().toList(),
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (organizationCodes != null) map['OrganizationCodes'] = organizationCodes;
-    return map;
-  }
+class RemoveOrganizationsRequest extends TokenRequest{
+	List<String>? organizationCodes;
+
+	RemoveOrganizationsRequest({
+		this.organizationCodes,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory RemoveOrganizationsRequest.fromJson(Map<String, dynamic> map) {
+		return RemoveOrganizationsRequest( 
+			organizationCodes: map['OrganizationCodes'].cast<String>().toList(),
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(organizationCodes != null)
+			map['OrganizationCodes'] = organizationCodes;
+		return map;
+	}
 }
+
+
+

+ 227 - 214
lib/services/position.m.dart

@@ -1,239 +1,252 @@
 import 'package:fis_jsonrpc/utils.dart';
 
 class BaseDTO {
-  DateTime? createTime;
-  DateTime? updateTime;
-
-  BaseDTO({
-    this.createTime,
-    this.updateTime,
-  });
-
-  factory BaseDTO.fromJson(Map<String, dynamic> map) {
-    return BaseDTO(
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    if (createTime != null)
-      map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
-    if (updateTime != null)
-      map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
-    return map;
-  }
+	DateTime? createTime;
+	DateTime? updateTime;
+
+	BaseDTO({
+		this.createTime,
+		this.updateTime,
+	});
+
+	factory BaseDTO.fromJson(Map<String, dynamic> map) {
+		return BaseDTO( 
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(createTime != null)
+			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
+		if(updateTime != null)
+			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
+		return map;
+	}
 }
 
-class PositionDTO extends BaseDTO {
-  String? positionCode;
-  String? positionName;
-  String? organizationCode;
-  List<String>? underUserCodes;
-
-  PositionDTO({
-    this.positionCode,
-    this.positionName,
-    this.organizationCode,
-    this.underUserCodes,
-    DateTime? createTime,
-    DateTime? updateTime,
-  }) : super(
-          createTime: createTime,
-          updateTime: updateTime,
-        );
-
-  factory PositionDTO.fromJson(Map<String, dynamic> map) {
-    return PositionDTO(
-      positionCode: map['PositionCode'],
-      positionName: map['PositionName'],
-      organizationCode: map['OrganizationCode'],
-      underUserCodes: map['UnderUserCodes'].cast<String>().toList(),
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (positionCode != null) map['PositionCode'] = positionCode;
-    if (positionName != null) map['PositionName'] = positionName;
-    if (organizationCode != null) map['OrganizationCode'] = organizationCode;
-    if (underUserCodes != null) map['UnderUserCodes'] = underUserCodes;
-    return map;
-  }
+class PositionDTO extends BaseDTO{
+	String? positionCode;
+	String? positionName;
+	String? organizationCode;
+	List<String>? underUserCodes;
+
+	PositionDTO({
+		this.positionCode,
+		this.positionName,
+		this.organizationCode,
+		this.underUserCodes,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory PositionDTO.fromJson(Map<String, dynamic> map) {
+		return PositionDTO( 
+			positionCode: map['PositionCode'],
+			positionName: map['PositionName'],
+			organizationCode: map['OrganizationCode'],
+			underUserCodes: map['UnderUserCodes'].cast<String>().toList(),
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(positionCode != null)
+			map['PositionCode'] = positionCode;
+		if(positionName != null)
+			map['PositionName'] = positionName;
+		if(organizationCode != null)
+			map['OrganizationCode'] = organizationCode;
+		if(underUserCodes != null)
+			map['UnderUserCodes'] = underUserCodes;
+		return map;
+	}
 }
 
 class BaseRequest {
-  BaseRequest();
 
-  factory BaseRequest.fromJson(Map<String, dynamic> map) {
-    return BaseRequest();
-  }
+	BaseRequest();
 
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    return map;
-  }
-}
-
-class TokenRequest extends BaseRequest {
-  String? token;
+	factory BaseRequest.fromJson(Map<String, dynamic> map) {
+		return BaseRequest( 
+		);
+	}
 
-  TokenRequest({
-    this.token,
-  }) : super();
-
-  factory TokenRequest.fromJson(Map<String, dynamic> map) {
-    return TokenRequest(
-      token: map['Token'],
-    );
-  }
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		return map;
+	}
+}
 
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (token != null) map['Token'] = token;
-    return map;
-  }
+class TokenRequest extends BaseRequest{
+	String? token;
+
+	TokenRequest({
+		this.token,
+	}) : super(
+		);
+
+	factory TokenRequest.fromJson(Map<String, dynamic> map) {
+		return TokenRequest( 
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(token != null)
+			map['Token'] = token;
+		return map;
+	}
 }
 
-class GetPositionsRequest extends TokenRequest {
-  List<String>? positionCodes;
-  List<String>? organizationCodes;
-
-  GetPositionsRequest({
-    this.positionCodes,
-    this.organizationCodes,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory GetPositionsRequest.fromJson(Map<String, dynamic> map) {
-    return GetPositionsRequest(
-      positionCodes: map['PositionCodes'].cast<String>().toList(),
-      organizationCodes: map['OrganizationCodes'].cast<String>().toList(),
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (positionCodes != null) map['PositionCodes'] = positionCodes;
-    if (organizationCodes != null) map['OrganizationCodes'] = organizationCodes;
-    return map;
-  }
+class GetPositionsRequest extends TokenRequest{
+	List<String>? positionCodes;
+	List<String>? organizationCodes;
+
+	GetPositionsRequest({
+		this.positionCodes,
+		this.organizationCodes,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory GetPositionsRequest.fromJson(Map<String, dynamic> map) {
+		return GetPositionsRequest( 
+			positionCodes: map['PositionCodes'].cast<String>().toList(),
+			organizationCodes: map['OrganizationCodes'].cast<String>().toList(),
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(positionCodes != null)
+			map['PositionCodes'] = positionCodes;
+		if(organizationCodes != null)
+			map['OrganizationCodes'] = organizationCodes;
+		return map;
+	}
 }
 
 class PositionItemDTO {
-  String? positionName;
-  String? organizationCode;
-  List<String>? underUserCodes;
-  String? extendsData;
-
-  PositionItemDTO({
-    this.positionName,
-    this.organizationCode,
-    this.underUserCodes,
-    this.extendsData,
-  });
-
-  factory PositionItemDTO.fromJson(Map<String, dynamic> map) {
-    return PositionItemDTO(
-      positionName: map['PositionName'],
-      organizationCode: map['OrganizationCode'],
-      underUserCodes: map['UnderUserCodes'].cast<String>().toList(),
-      extendsData: map['ExtendsData'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    if (positionName != null) map['PositionName'] = positionName;
-    if (organizationCode != null) map['OrganizationCode'] = organizationCode;
-    if (underUserCodes != null) map['UnderUserCodes'] = underUserCodes;
-    if (extendsData != null) map['ExtendsData'] = extendsData;
-    return map;
-  }
+	String? positionName;
+	String? organizationCode;
+	List<String>? underUserCodes;
+	String? extendsData;
+
+	PositionItemDTO({
+		this.positionName,
+		this.organizationCode,
+		this.underUserCodes,
+		this.extendsData,
+	});
+
+	factory PositionItemDTO.fromJson(Map<String, dynamic> map) {
+		return PositionItemDTO( 
+			positionName: map['PositionName'],
+			organizationCode: map['OrganizationCode'],
+			underUserCodes: map['UnderUserCodes'].cast<String>().toList(),
+			extendsData: map['ExtendsData'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(positionName != null)
+			map['PositionName'] = positionName;
+		if(organizationCode != null)
+			map['OrganizationCode'] = organizationCode;
+		if(underUserCodes != null)
+			map['UnderUserCodes'] = underUserCodes;
+		if(extendsData != null)
+			map['ExtendsData'] = extendsData;
+		return map;
+	}
 }
 
 class AddPositionsRequest {
-  String? token;
-  List<PositionItemDTO>? positions;
-
-  AddPositionsRequest({
-    this.token,
-    this.positions,
-  });
-
-  factory AddPositionsRequest.fromJson(Map<String, dynamic> map) {
-    return AddPositionsRequest(
-      token: map['Token'],
-      positions: map['Positions']
-          .map((e) => PositionItemDTO.fromJson(e as Map<String, dynamic>))
-          .toList(),
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    if (token != null) map['Token'] = token;
-    if (positions != null) map['Positions'] = positions;
-    return map;
-  }
+	String? token;
+	List<PositionItemDTO>? positions;
+
+	AddPositionsRequest({
+		this.token,
+		this.positions,
+	});
+
+	factory AddPositionsRequest.fromJson(Map<String, dynamic> map) {
+		return AddPositionsRequest( 
+			token: map['Token'],
+			positions: map['Positions'].map((e)=>PositionItemDTO.fromJson(e as Map<String,dynamic>)).toList(),
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(token != null)
+			map['Token'] = token;
+		if(positions != null)
+			map['Positions'] = positions;
+		return map;
+	}
 }
 
-class UpdatePositionsRequest extends TokenRequest {
-  List<PositionItemDTO>? positions;
-
-  UpdatePositionsRequest({
-    this.positions,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory UpdatePositionsRequest.fromJson(Map<String, dynamic> map) {
-    return UpdatePositionsRequest(
-      positions: map['Positions']
-          .map((e) => PositionItemDTO.fromJson(e as Map<String, dynamic>))
-          .toList(),
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (positions != null) map['Positions'] = positions;
-    return map;
-  }
+class UpdatePositionsRequest extends TokenRequest{
+	List<PositionItemDTO>? positions;
+
+	UpdatePositionsRequest({
+		this.positions,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory UpdatePositionsRequest.fromJson(Map<String, dynamic> map) {
+		return UpdatePositionsRequest( 
+			positions: map['Positions'].map((e)=>PositionItemDTO.fromJson(e as Map<String,dynamic>)).toList(),
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(positions != null)
+			map['Positions'] = positions;
+		return map;
+	}
 }
 
-class RemovePositionRequest extends TokenRequest {
-  List<String>? positionCodes;
-
-  RemovePositionRequest({
-    this.positionCodes,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory RemovePositionRequest.fromJson(Map<String, dynamic> map) {
-    return RemovePositionRequest(
-      positionCodes: map['PositionCodes'].cast<String>().toList(),
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (positionCodes != null) map['PositionCodes'] = positionCodes;
-    return map;
-  }
+class RemovePositionRequest extends TokenRequest{
+	List<String>? positionCodes;
+
+	RemovePositionRequest({
+		this.positionCodes,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory RemovePositionRequest.fromJson(Map<String, dynamic> map) {
+		return RemovePositionRequest( 
+			positionCodes: map['PositionCodes'].cast<String>().toList(),
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(positionCodes != null)
+			map['PositionCodes'] = positionCodes;
+		return map;
+	}
 }
+
+
+

+ 235 - 225
lib/services/rank.m.dart

@@ -1,251 +1,261 @@
 import 'package:fis_jsonrpc/utils.dart';
 
 class BaseDTO {
-  DateTime? createTime;
-  DateTime? updateTime;
-
-  BaseDTO({
-    this.createTime,
-    this.updateTime,
-  });
-
-  factory BaseDTO.fromJson(Map<String, dynamic> map) {
-    return BaseDTO(
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    if (createTime != null)
-      map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
-    if (updateTime != null)
-      map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
-    return map;
-  }
+	DateTime? createTime;
+	DateTime? updateTime;
+
+	BaseDTO({
+		this.createTime,
+		this.updateTime,
+	});
+
+	factory BaseDTO.fromJson(Map<String, dynamic> map) {
+		return BaseDTO( 
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(createTime != null)
+			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
+		if(updateTime != null)
+			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
+		return map;
+	}
 }
 
-class RankDTO extends BaseDTO {
-  String? rankCode;
-  String? rankName;
-
-  RankDTO({
-    this.rankCode,
-    this.rankName,
-    DateTime? createTime,
-    DateTime? updateTime,
-  }) : super(
-          createTime: createTime,
-          updateTime: updateTime,
-        );
-
-  factory RankDTO.fromJson(Map<String, dynamic> map) {
-    return RankDTO(
-      rankCode: map['RankCode'],
-      rankName: map['RankName'],
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (rankCode != null) map['RankCode'] = rankCode;
-    if (rankName != null) map['RankName'] = rankName;
-    return map;
-  }
+class RankDTO extends BaseDTO{
+	String? rankCode;
+	String? rankName;
+
+	RankDTO({
+		this.rankCode,
+		this.rankName,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory RankDTO.fromJson(Map<String, dynamic> map) {
+		return RankDTO( 
+			rankCode: map['RankCode'],
+			rankName: map['RankName'],
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(rankCode != null)
+			map['RankCode'] = rankCode;
+		if(rankName != null)
+			map['RankName'] = rankName;
+		return map;
+	}
 }
 
 class BaseRequest {
-  BaseRequest();
 
-  factory BaseRequest.fromJson(Map<String, dynamic> map) {
-    return BaseRequest();
-  }
+	BaseRequest();
 
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    return map;
-  }
-}
-
-class TokenRequest extends BaseRequest {
-  String? token;
+	factory BaseRequest.fromJson(Map<String, dynamic> map) {
+		return BaseRequest( 
+		);
+	}
 
-  TokenRequest({
-    this.token,
-  }) : super();
-
-  factory TokenRequest.fromJson(Map<String, dynamic> map) {
-    return TokenRequest(
-      token: map['Token'],
-    );
-  }
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		return map;
+	}
+}
 
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (token != null) map['Token'] = token;
-    return map;
-  }
+class TokenRequest extends BaseRequest{
+	String? token;
+
+	TokenRequest({
+		this.token,
+	}) : super(
+		);
+
+	factory TokenRequest.fromJson(Map<String, dynamic> map) {
+		return TokenRequest( 
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(token != null)
+			map['Token'] = token;
+		return map;
+	}
 }
 
-class GetRankByCodeRequest extends TokenRequest {
-  String? rankCode;
-
-  GetRankByCodeRequest({
-    this.rankCode,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory GetRankByCodeRequest.fromJson(Map<String, dynamic> map) {
-    return GetRankByCodeRequest(
-      rankCode: map['RankCode'],
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (rankCode != null) map['RankCode'] = rankCode;
-    return map;
-  }
+class GetRankByCodeRequest extends TokenRequest{
+	String? rankCode;
+
+	GetRankByCodeRequest({
+		this.rankCode,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory GetRankByCodeRequest.fromJson(Map<String, dynamic> map) {
+		return GetRankByCodeRequest( 
+			rankCode: map['RankCode'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(rankCode != null)
+			map['RankCode'] = rankCode;
+		return map;
+	}
 }
 
-class GetRanksRequest extends TokenRequest {
-  List<String>? rankCodes;
-  List<String>? organizationCodes;
-
-  GetRanksRequest({
-    this.rankCodes,
-    this.organizationCodes,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory GetRanksRequest.fromJson(Map<String, dynamic> map) {
-    return GetRanksRequest(
-      rankCodes: map['RankCodes'].cast<String>().toList(),
-      organizationCodes: map['OrganizationCodes'].cast<String>().toList(),
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (rankCodes != null) map['RankCodes'] = rankCodes;
-    if (organizationCodes != null) map['OrganizationCodes'] = organizationCodes;
-    return map;
-  }
+class GetRanksRequest extends TokenRequest{
+	List<String>? rankCodes;
+	List<String>? organizationCodes;
+
+	GetRanksRequest({
+		this.rankCodes,
+		this.organizationCodes,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory GetRanksRequest.fromJson(Map<String, dynamic> map) {
+		return GetRanksRequest( 
+			rankCodes: map['RankCodes'].cast<String>().toList(),
+			organizationCodes: map['OrganizationCodes'].cast<String>().toList(),
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(rankCodes != null)
+			map['RankCodes'] = rankCodes;
+		if(organizationCodes != null)
+			map['OrganizationCodes'] = organizationCodes;
+		return map;
+	}
 }
 
 class RankItemDTO {
-  String? rankName;
-  String? organizationCode;
-  String? extendsData;
-
-  RankItemDTO({
-    this.rankName,
-    this.organizationCode,
-    this.extendsData,
-  });
-
-  factory RankItemDTO.fromJson(Map<String, dynamic> map) {
-    return RankItemDTO(
-      rankName: map['RankName'],
-      organizationCode: map['OrganizationCode'],
-      extendsData: map['ExtendsData'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    if (rankName != null) map['RankName'] = rankName;
-    if (organizationCode != null) map['OrganizationCode'] = organizationCode;
-    if (extendsData != null) map['ExtendsData'] = extendsData;
-    return map;
-  }
+	String? rankName;
+	String? organizationCode;
+	String? extendsData;
+
+	RankItemDTO({
+		this.rankName,
+		this.organizationCode,
+		this.extendsData,
+	});
+
+	factory RankItemDTO.fromJson(Map<String, dynamic> map) {
+		return RankItemDTO( 
+			rankName: map['RankName'],
+			organizationCode: map['OrganizationCode'],
+			extendsData: map['ExtendsData'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(rankName != null)
+			map['RankName'] = rankName;
+		if(organizationCode != null)
+			map['OrganizationCode'] = organizationCode;
+		if(extendsData != null)
+			map['ExtendsData'] = extendsData;
+		return map;
+	}
 }
 
-class AddRanksRequest extends TokenRequest {
-  List<RankItemDTO>? rankInfos;
-
-  AddRanksRequest({
-    this.rankInfos,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory AddRanksRequest.fromJson(Map<String, dynamic> map) {
-    return AddRanksRequest(
-      rankInfos: map['RankInfos']
-          .map((e) => RankItemDTO.fromJson(e as Map<String, dynamic>))
-          .toList(),
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (rankInfos != null) map['RankInfos'] = rankInfos;
-    return map;
-  }
+class AddRanksRequest extends TokenRequest{
+	List<RankItemDTO>? rankInfos;
+
+	AddRanksRequest({
+		this.rankInfos,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory AddRanksRequest.fromJson(Map<String, dynamic> map) {
+		return AddRanksRequest( 
+			rankInfos: map['RankInfos'].map((e)=>RankItemDTO.fromJson(e as Map<String,dynamic>)).toList(),
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(rankInfos != null)
+			map['RankInfos'] = rankInfos;
+		return map;
+	}
 }
 
-class RemoveRanksRequest extends TokenRequest {
-  List<String>? rankCodes;
-
-  RemoveRanksRequest({
-    this.rankCodes,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory RemoveRanksRequest.fromJson(Map<String, dynamic> map) {
-    return RemoveRanksRequest(
-      rankCodes: map['RankCodes'].cast<String>().toList(),
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (rankCodes != null) map['RankCodes'] = rankCodes;
-    return map;
-  }
+class RemoveRanksRequest extends TokenRequest{
+	List<String>? rankCodes;
+
+	RemoveRanksRequest({
+		this.rankCodes,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory RemoveRanksRequest.fromJson(Map<String, dynamic> map) {
+		return RemoveRanksRequest( 
+			rankCodes: map['RankCodes'].cast<String>().toList(),
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(rankCodes != null)
+			map['RankCodes'] = rankCodes;
+		return map;
+	}
 }
 
-class UpdateRanksRequest extends TokenRequest {
-  List<RankItemDTO>? ranks;
-
-  UpdateRanksRequest({
-    this.ranks,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory UpdateRanksRequest.fromJson(Map<String, dynamic> map) {
-    return UpdateRanksRequest(
-      ranks: map['Ranks']
-          .map((e) => RankItemDTO.fromJson(e as Map<String, dynamic>))
-          .toList(),
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (ranks != null) map['Ranks'] = ranks;
-    return map;
-  }
+class UpdateRanksRequest extends TokenRequest{
+	List<RankItemDTO>? ranks;
+
+	UpdateRanksRequest({
+		this.ranks,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory UpdateRanksRequest.fromJson(Map<String, dynamic> map) {
+		return UpdateRanksRequest( 
+			ranks: map['Ranks'].map((e)=>RankItemDTO.fromJson(e as Map<String,dynamic>)).toList(),
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(ranks != null)
+			map['Ranks'] = ranks;
+		return map;
+	}
 }
+
+
+

+ 190 - 180
lib/services/role.m.dart

@@ -1,205 +1,215 @@
 import 'package:fis_jsonrpc/utils.dart';
 
 class BaseDTO {
-  DateTime? createTime;
-  DateTime? updateTime;
-
-  BaseDTO({
-    this.createTime,
-    this.updateTime,
-  });
-
-  factory BaseDTO.fromJson(Map<String, dynamic> map) {
-    return BaseDTO(
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    if (createTime != null)
-      map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
-    if (updateTime != null)
-      map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
-    return map;
-  }
+	DateTime? createTime;
+	DateTime? updateTime;
+
+	BaseDTO({
+		this.createTime,
+		this.updateTime,
+	});
+
+	factory BaseDTO.fromJson(Map<String, dynamic> map) {
+		return BaseDTO( 
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(createTime != null)
+			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
+		if(updateTime != null)
+			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
+		return map;
+	}
 }
 
 enum RoleShowTypeEnum {
-  NotShow,
-  ISShow,
+	NotShow,
+	ISShow,
 }
 
 enum RoleQualificationEnum {
-  NoNeed,
-  ID,
-  DocLicense,
-  Both,
+	NoNeed,
+	ID,
+	DocLicense,
+	Both,
 }
 
-class RoleDTO extends BaseDTO {
-  String? roleCode;
-  String? roleName;
-  RoleShowTypeEnum roleShowType;
-  String? description;
-  String? iConUrl;
-  String? colorStart;
-  String? colorEnd;
-  RoleQualificationEnum roleQualification;
-
-  RoleDTO({
-    this.roleCode,
-    this.roleName,
-    this.roleShowType = RoleShowTypeEnum.NotShow,
-    this.description,
-    this.iConUrl,
-    this.colorStart,
-    this.colorEnd,
-    this.roleQualification = RoleQualificationEnum.NoNeed,
-    DateTime? createTime,
-    DateTime? updateTime,
-  }) : super(
-          createTime: createTime,
-          updateTime: updateTime,
-        );
-
-  factory RoleDTO.fromJson(Map<String, dynamic> map) {
-    return RoleDTO(
-      roleCode: map['RoleCode'],
-      roleName: map['RoleName'],
-      roleShowType: RoleShowTypeEnum.values
-          .firstWhere((e) => e.index == map['RoleShowType']),
-      description: map['Description'],
-      iConUrl: map['IConUrl'],
-      colorStart: map['ColorStart'],
-      colorEnd: map['ColorEnd'],
-      roleQualification: RoleQualificationEnum.values
-          .firstWhere((e) => e.index == map['RoleQualification']),
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (roleCode != null) map['RoleCode'] = roleCode;
-    if (roleName != null) map['RoleName'] = roleName;
-    map['RoleShowType'] = roleShowType.index;
-    if (description != null) map['Description'] = description;
-    if (iConUrl != null) map['IConUrl'] = iConUrl;
-    if (colorStart != null) map['ColorStart'] = colorStart;
-    if (colorEnd != null) map['ColorEnd'] = colorEnd;
-    map['RoleQualification'] = roleQualification.index;
-    return map;
-  }
+class RoleDTO extends BaseDTO{
+	String? roleCode;
+	String? roleName;
+	RoleShowTypeEnum roleShowType;
+	String? description;
+	String? iConUrl;
+	String? colorStart;
+	String? colorEnd;
+	RoleQualificationEnum roleQualification;
+
+	RoleDTO({
+		this.roleCode,
+		this.roleName,
+		this.roleShowType = RoleShowTypeEnum.NotShow,
+		this.description,
+		this.iConUrl,
+		this.colorStart,
+		this.colorEnd,
+		this.roleQualification = RoleQualificationEnum.NoNeed,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory RoleDTO.fromJson(Map<String, dynamic> map) {
+		return RoleDTO( 
+			roleCode: map['RoleCode'],
+			roleName: map['RoleName'],
+			roleShowType: RoleShowTypeEnum.values.firstWhere((e) => e.index == map['RoleShowType']),
+			description: map['Description'],
+			iConUrl: map['IConUrl'],
+			colorStart: map['ColorStart'],
+			colorEnd: map['ColorEnd'],
+			roleQualification: RoleQualificationEnum.values.firstWhere((e) => e.index == map['RoleQualification']),
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(roleCode != null)
+			map['RoleCode'] = roleCode;
+		if(roleName != null)
+			map['RoleName'] = roleName;
+		map['RoleShowType'] = roleShowType.index;
+		if(description != null)
+			map['Description'] = description;
+		if(iConUrl != null)
+			map['IConUrl'] = iConUrl;
+		if(colorStart != null)
+			map['ColorStart'] = colorStart;
+		if(colorEnd != null)
+			map['ColorEnd'] = colorEnd;
+		map['RoleQualification'] = roleQualification.index;
+		return map;
+	}
 }
 
 class BaseRequest {
-  BaseRequest();
 
-  factory BaseRequest.fromJson(Map<String, dynamic> map) {
-    return BaseRequest();
-  }
+	BaseRequest();
 
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    return map;
-  }
-}
-
-class TokenRequest extends BaseRequest {
-  String? token;
+	factory BaseRequest.fromJson(Map<String, dynamic> map) {
+		return BaseRequest( 
+		);
+	}
 
-  TokenRequest({
-    this.token,
-  }) : super();
-
-  factory TokenRequest.fromJson(Map<String, dynamic> map) {
-    return TokenRequest(
-      token: map['Token'],
-    );
-  }
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		return map;
+	}
+}
 
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (token != null) map['Token'] = token;
-    return map;
-  }
+class TokenRequest extends BaseRequest{
+	String? token;
+
+	TokenRequest({
+		this.token,
+	}) : super(
+		);
+
+	factory TokenRequest.fromJson(Map<String, dynamic> map) {
+		return TokenRequest( 
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(token != null)
+			map['Token'] = token;
+		return map;
+	}
 }
 
-class GetRoleByCodeRequest extends TokenRequest {
-  String? roleCode;
-
-  GetRoleByCodeRequest({
-    this.roleCode,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory GetRoleByCodeRequest.fromJson(Map<String, dynamic> map) {
-    return GetRoleByCodeRequest(
-      roleCode: map['RoleCode'],
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (roleCode != null) map['RoleCode'] = roleCode;
-    return map;
-  }
+class GetRoleByCodeRequest extends TokenRequest{
+	String? roleCode;
+
+	GetRoleByCodeRequest({
+		this.roleCode,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory GetRoleByCodeRequest.fromJson(Map<String, dynamic> map) {
+		return GetRoleByCodeRequest( 
+			roleCode: map['RoleCode'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(roleCode != null)
+			map['RoleCode'] = roleCode;
+		return map;
+	}
 }
 
-class FindDefaultRolesRequest extends TokenRequest {
-  String? organizationCode;
-
-  FindDefaultRolesRequest({
-    this.organizationCode,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory FindDefaultRolesRequest.fromJson(Map<String, dynamic> map) {
-    return FindDefaultRolesRequest(
-      organizationCode: map['OrganizationCode'],
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (organizationCode != null) map['OrganizationCode'] = organizationCode;
-    return map;
-  }
+class FindDefaultRolesRequest extends TokenRequest{
+	String? organizationCode;
+
+	FindDefaultRolesRequest({
+		this.organizationCode,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory FindDefaultRolesRequest.fromJson(Map<String, dynamic> map) {
+		return FindDefaultRolesRequest( 
+			organizationCode: map['OrganizationCode'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(organizationCode != null)
+			map['OrganizationCode'] = organizationCode;
+		return map;
+	}
 }
 
-class FindAuthenticationRolesRequest extends TokenRequest {
-  String? organizationCode;
-
-  FindAuthenticationRolesRequest({
-    this.organizationCode,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory FindAuthenticationRolesRequest.fromJson(Map<String, dynamic> map) {
-    return FindAuthenticationRolesRequest(
-      organizationCode: map['OrganizationCode'],
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (organizationCode != null) map['OrganizationCode'] = organizationCode;
-    return map;
-  }
+class FindAuthenticationRolesRequest extends TokenRequest{
+	String? organizationCode;
+
+	FindAuthenticationRolesRequest({
+		this.organizationCode,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory FindAuthenticationRolesRequest.fromJson(Map<String, dynamic> map) {
+		return FindAuthenticationRolesRequest( 
+			organizationCode: map['OrganizationCode'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(organizationCode != null)
+			map['OrganizationCode'] = organizationCode;
+		return map;
+	}
 }
+
+
+

+ 455 - 435
lib/services/user.m.dart

@@ -1,468 +1,488 @@
 import 'package:fis_jsonrpc/utils.dart';
 
 class BaseDTO {
-  DateTime? createTime;
-  DateTime? updateTime;
-
-  BaseDTO({
-    this.createTime,
-    this.updateTime,
-  });
-
-  factory BaseDTO.fromJson(Map<String, dynamic> map) {
-    return BaseDTO(
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    if (createTime != null)
-      map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
-    if (updateTime != null)
-      map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
-    return map;
-  }
+	DateTime? createTime;
+	DateTime? updateTime;
+
+	BaseDTO({
+		this.createTime,
+		this.updateTime,
+	});
+
+	factory BaseDTO.fromJson(Map<String, dynamic> map) {
+		return BaseDTO( 
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(createTime != null)
+			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
+		if(updateTime != null)
+			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
+		return map;
+	}
 }
 
 enum UserInfoStateEnum {
-  Nonactivated,
-  Activated,
+	Nonactivated,
+	Activated,
 }
 
 enum ApplyStateEnum {
-  NotApply,
-  Applying,
-  Refused,
-  Passed,
+	NotApply,
+	Applying,
+	Refused,
+	Passed,
 }
 
-class UserDTO extends BaseDTO {
-  String? userCode;
-  String? userName;
-  String? phone;
-  String? email;
-  String? nickName;
-  String? fullName;
-  String? headImageUrl;
-  String? organizationCode;
-  String? rootOrganizationCode;
-  List<String>? authorityGroups;
-  List<String>? bindDevices;
-  String? lastIP;
-  int logintimes;
-  UserInfoStateEnum userState;
-  List<String>? roleCodes;
-  List<String>? rankCodes;
-  List<String>? positionCodes;
-  ApplyStateEnum applyState;
-
-  UserDTO({
-    this.userCode,
-    this.userName,
-    this.phone,
-    this.email,
-    this.nickName,
-    this.fullName,
-    this.headImageUrl,
-    this.organizationCode,
-    this.rootOrganizationCode,
-    this.authorityGroups,
-    this.bindDevices,
-    this.lastIP,
-    this.logintimes = 0,
-    this.userState = UserInfoStateEnum.Nonactivated,
-    this.roleCodes,
-    this.rankCodes,
-    this.positionCodes,
-    this.applyState = ApplyStateEnum.NotApply,
-    DateTime? createTime,
-    DateTime? updateTime,
-  }) : super(
-          createTime: createTime,
-          updateTime: updateTime,
-        );
-
-  factory UserDTO.fromJson(Map<String, dynamic> map) {
-    return UserDTO(
-      userCode: map['UserCode'],
-      userName: map['UserName'],
-      phone: map['Phone'],
-      email: map['Email'],
-      nickName: map['NickName'],
-      fullName: map['FullName'],
-      headImageUrl: map['HeadImageUrl'],
-      organizationCode: map['OrganizationCode'],
-      rootOrganizationCode: map['RootOrganizationCode'],
-      authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
-      bindDevices: map['BindDevices'].cast<String>().toList(),
-      lastIP: map['LastIP'],
-      logintimes: map['Logintimes'],
-      userState: UserInfoStateEnum.values
-          .firstWhere((e) => e.index == map['UserState']),
-      roleCodes: map['RoleCodes'].cast<String>().toList(),
-      rankCodes: map['RankCodes'].cast<String>().toList(),
-      positionCodes: map['PositionCodes'].cast<String>().toList(),
-      applyState:
-          ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (userCode != null) map['UserCode'] = userCode;
-    if (userName != null) map['UserName'] = userName;
-    if (phone != null) map['Phone'] = phone;
-    if (email != null) map['Email'] = email;
-    if (nickName != null) map['NickName'] = nickName;
-    if (fullName != null) map['FullName'] = fullName;
-    if (headImageUrl != null) map['HeadImageUrl'] = headImageUrl;
-    if (organizationCode != null) map['OrganizationCode'] = organizationCode;
-    if (rootOrganizationCode != null)
-      map['RootOrganizationCode'] = rootOrganizationCode;
-    if (authorityGroups != null) map['AuthorityGroups'] = authorityGroups;
-    if (bindDevices != null) map['BindDevices'] = bindDevices;
-    if (lastIP != null) map['LastIP'] = lastIP;
-    map['Logintimes'] = logintimes;
-    map['UserState'] = userState.index;
-    if (roleCodes != null) map['RoleCodes'] = roleCodes;
-    if (rankCodes != null) map['RankCodes'] = rankCodes;
-    if (positionCodes != null) map['PositionCodes'] = positionCodes;
-    map['ApplyState'] = applyState.index;
-    return map;
-  }
+class UserDTO extends BaseDTO{
+	String? userCode;
+	String? userName;
+	String? phone;
+	String? email;
+	String? nickName;
+	String? fullName;
+	String? headImageUrl;
+	String? organizationCode;
+	String? rootOrganizationCode;
+	List<String>? authorityGroups;
+	List<String>? bindDevices;
+	String? lastIP;
+	int logintimes;
+	UserInfoStateEnum userState;
+	List<String>? roleCodes;
+	List<String>? rankCodes;
+	List<String>? positionCodes;
+	ApplyStateEnum applyState;
+
+	UserDTO({
+		this.userCode,
+		this.userName,
+		this.phone,
+		this.email,
+		this.nickName,
+		this.fullName,
+		this.headImageUrl,
+		this.organizationCode,
+		this.rootOrganizationCode,
+		this.authorityGroups,
+		this.bindDevices,
+		this.lastIP,
+		this.logintimes = 0,
+		this.userState = UserInfoStateEnum.Nonactivated,
+		this.roleCodes,
+		this.rankCodes,
+		this.positionCodes,
+		this.applyState = ApplyStateEnum.NotApply,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory UserDTO.fromJson(Map<String, dynamic> map) {
+		return UserDTO( 
+			userCode: map['UserCode'],
+			userName: map['UserName'],
+			phone: map['Phone'],
+			email: map['Email'],
+			nickName: map['NickName'],
+			fullName: map['FullName'],
+			headImageUrl: map['HeadImageUrl'],
+			organizationCode: map['OrganizationCode'],
+			rootOrganizationCode: map['RootOrganizationCode'],
+			authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
+			bindDevices: map['BindDevices'].cast<String>().toList(),
+			lastIP: map['LastIP'],
+			logintimes: map['Logintimes'],
+			userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
+			roleCodes: map['RoleCodes'].cast<String>().toList(),
+			rankCodes: map['RankCodes'].cast<String>().toList(),
+			positionCodes: map['PositionCodes'].cast<String>().toList(),
+			applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(userCode != null)
+			map['UserCode'] = userCode;
+		if(userName != null)
+			map['UserName'] = userName;
+		if(phone != null)
+			map['Phone'] = phone;
+		if(email != null)
+			map['Email'] = email;
+		if(nickName != null)
+			map['NickName'] = nickName;
+		if(fullName != null)
+			map['FullName'] = fullName;
+		if(headImageUrl != null)
+			map['HeadImageUrl'] = headImageUrl;
+		if(organizationCode != null)
+			map['OrganizationCode'] = organizationCode;
+		if(rootOrganizationCode != null)
+			map['RootOrganizationCode'] = rootOrganizationCode;
+		if(authorityGroups != null)
+			map['AuthorityGroups'] = authorityGroups;
+		if(bindDevices != null)
+			map['BindDevices'] = bindDevices;
+		if(lastIP != null)
+			map['LastIP'] = lastIP;
+		map['Logintimes'] = logintimes;
+		map['UserState'] = userState.index;
+		if(roleCodes != null)
+			map['RoleCodes'] = roleCodes;
+		if(rankCodes != null)
+			map['RankCodes'] = rankCodes;
+		if(positionCodes != null)
+			map['PositionCodes'] = positionCodes;
+		map['ApplyState'] = applyState.index;
+		return map;
+	}
 }
 
 class BaseRequest {
-  BaseRequest();
 
-  factory BaseRequest.fromJson(Map<String, dynamic> map) {
-    return BaseRequest();
-  }
+	BaseRequest();
 
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    return map;
-  }
+	factory BaseRequest.fromJson(Map<String, dynamic> map) {
+		return BaseRequest( 
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		return map;
+	}
 }
 
-class TokenRequest extends BaseRequest {
-  String? token;
+class TokenRequest extends BaseRequest{
+	String? token;
+
+	TokenRequest({
+		this.token,
+	}) : super(
+		);
+
+	factory TokenRequest.fromJson(Map<String, dynamic> map) {
+		return TokenRequest( 
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(token != null)
+			map['Token'] = token;
+		return map;
+	}
+}
 
-  TokenRequest({
-    this.token,
-  }) : super();
+class GetUserInfoRequest extends TokenRequest{
 
-  factory TokenRequest.fromJson(Map<String, dynamic> map) {
-    return TokenRequest(
-      token: map['Token'],
-    );
-  }
+	GetUserInfoRequest({
+		String? token,
+	}) : super(
+			token: token,
+		);
 
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (token != null) map['Token'] = token;
-    return map;
-  }
-}
+	factory GetUserInfoRequest.fromJson(Map<String, dynamic> map) {
+		return GetUserInfoRequest( 
+			token: map['Token'],
+		);
+	}
 
-class GetUserInfoRequest extends TokenRequest {
-  GetUserInfoRequest({
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory GetUserInfoRequest.fromJson(Map<String, dynamic> map) {
-    return GetUserInfoRequest(
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    return map;
-  }
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		return map;
+	}
 }
 
-class AlterUserInfoRequest extends UserDTO {
-  String? token;
-  String? extensionData;
-
-  AlterUserInfoRequest({
-    this.token,
-    this.extensionData,
-    String? userCode,
-    String? userName,
-    String? phone,
-    String? email,
-    String? nickName,
-    String? fullName,
-    String? headImageUrl,
-    String? organizationCode,
-    String? rootOrganizationCode,
-    List<String>? authorityGroups,
-    List<String>? bindDevices,
-    String? lastIP,
-    int logintimes = 0,
-    UserInfoStateEnum userState = UserInfoStateEnum.Nonactivated,
-    List<String>? roleCodes,
-    List<String>? rankCodes,
-    List<String>? positionCodes,
-    ApplyStateEnum applyState = ApplyStateEnum.NotApply,
-    DateTime? createTime,
-    DateTime? updateTime,
-  }) : super(
-          userCode: userCode,
-          userName: userName,
-          phone: phone,
-          email: email,
-          nickName: nickName,
-          fullName: fullName,
-          headImageUrl: headImageUrl,
-          organizationCode: organizationCode,
-          rootOrganizationCode: rootOrganizationCode,
-          authorityGroups: authorityGroups,
-          bindDevices: bindDevices,
-          lastIP: lastIP,
-          logintimes: logintimes,
-          userState: userState,
-          roleCodes: roleCodes,
-          rankCodes: rankCodes,
-          positionCodes: positionCodes,
-          applyState: applyState,
-          createTime: createTime,
-          updateTime: updateTime,
-        );
-
-  factory AlterUserInfoRequest.fromJson(Map<String, dynamic> map) {
-    return AlterUserInfoRequest(
-      token: map['Token'],
-      extensionData: map['ExtensionData'],
-      userCode: map['UserCode'],
-      userName: map['UserName'],
-      phone: map['Phone'],
-      email: map['Email'],
-      nickName: map['NickName'],
-      fullName: map['FullName'],
-      headImageUrl: map['HeadImageUrl'],
-      organizationCode: map['OrganizationCode'],
-      rootOrganizationCode: map['RootOrganizationCode'],
-      authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
-      bindDevices: map['BindDevices'].cast<String>().toList(),
-      lastIP: map['LastIP'],
-      logintimes: map['Logintimes'],
-      userState: UserInfoStateEnum.values
-          .firstWhere((e) => e.index == map['UserState']),
-      roleCodes: map['RoleCodes'].cast<String>().toList(),
-      rankCodes: map['RankCodes'].cast<String>().toList(),
-      positionCodes: map['PositionCodes'].cast<String>().toList(),
-      applyState:
-          ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (token != null) map['Token'] = token;
-    if (extensionData != null) map['ExtensionData'] = extensionData;
-    return map;
-  }
+class AlterUserInfoRequest extends UserDTO{
+	String? token;
+	String? extensionData;
+
+	AlterUserInfoRequest({
+		this.token,
+		this.extensionData,
+		String? userCode,
+		String? userName,
+		String? phone,
+		String? email,
+		String? nickName,
+		String? fullName,
+		String? headImageUrl,
+		String? organizationCode,
+		String? rootOrganizationCode,
+		List<String>? authorityGroups,
+		List<String>? bindDevices,
+		String? lastIP,
+		int logintimes = 0,
+		UserInfoStateEnum userState = UserInfoStateEnum.Nonactivated,
+		List<String>? roleCodes,
+		List<String>? rankCodes,
+		List<String>? positionCodes,
+		ApplyStateEnum applyState = ApplyStateEnum.NotApply,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			userCode: userCode,
+			userName: userName,
+			phone: phone,
+			email: email,
+			nickName: nickName,
+			fullName: fullName,
+			headImageUrl: headImageUrl,
+			organizationCode: organizationCode,
+			rootOrganizationCode: rootOrganizationCode,
+			authorityGroups: authorityGroups,
+			bindDevices: bindDevices,
+			lastIP: lastIP,
+			logintimes: logintimes,
+			userState: userState,
+			roleCodes: roleCodes,
+			rankCodes: rankCodes,
+			positionCodes: positionCodes,
+			applyState: applyState,
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory AlterUserInfoRequest.fromJson(Map<String, dynamic> map) {
+		return AlterUserInfoRequest( 
+			token: map['Token'],
+			extensionData: map['ExtensionData'],
+			userCode: map['UserCode'],
+			userName: map['UserName'],
+			phone: map['Phone'],
+			email: map['Email'],
+			nickName: map['NickName'],
+			fullName: map['FullName'],
+			headImageUrl: map['HeadImageUrl'],
+			organizationCode: map['OrganizationCode'],
+			rootOrganizationCode: map['RootOrganizationCode'],
+			authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
+			bindDevices: map['BindDevices'].cast<String>().toList(),
+			lastIP: map['LastIP'],
+			logintimes: map['Logintimes'],
+			userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
+			roleCodes: map['RoleCodes'].cast<String>().toList(),
+			rankCodes: map['RankCodes'].cast<String>().toList(),
+			positionCodes: map['PositionCodes'].cast<String>().toList(),
+			applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(token != null)
+			map['Token'] = token;
+		if(extensionData != null)
+			map['ExtensionData'] = extensionData;
+		return map;
+	}
 }
 
-class GetUserListRequest extends TokenRequest {
-  String? roleCode;
-  String? rankCode;
-  String? positionCode;
-  String? organizationCode;
-
-  GetUserListRequest({
-    this.roleCode,
-    this.rankCode,
-    this.positionCode,
-    this.organizationCode,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory GetUserListRequest.fromJson(Map<String, dynamic> map) {
-    return GetUserListRequest(
-      roleCode: map['RoleCode'],
-      rankCode: map['RankCode'],
-      positionCode: map['PositionCode'],
-      organizationCode: map['OrganizationCode'],
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (roleCode != null) map['RoleCode'] = roleCode;
-    if (rankCode != null) map['RankCode'] = rankCode;
-    if (positionCode != null) map['PositionCode'] = positionCode;
-    if (organizationCode != null) map['OrganizationCode'] = organizationCode;
-    return map;
-  }
+class GetUserListRequest extends TokenRequest{
+	String? roleCode;
+	String? rankCode;
+	String? positionCode;
+	String? organizationCode;
+
+	GetUserListRequest({
+		this.roleCode,
+		this.rankCode,
+		this.positionCode,
+		this.organizationCode,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory GetUserListRequest.fromJson(Map<String, dynamic> map) {
+		return GetUserListRequest( 
+			roleCode: map['RoleCode'],
+			rankCode: map['RankCode'],
+			positionCode: map['PositionCode'],
+			organizationCode: map['OrganizationCode'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(roleCode != null)
+			map['RoleCode'] = roleCode;
+		if(rankCode != null)
+			map['RankCode'] = rankCode;
+		if(positionCode != null)
+			map['PositionCode'] = positionCode;
+		if(organizationCode != null)
+			map['OrganizationCode'] = organizationCode;
+		return map;
+	}
 }
 
-class RemoveUsersFromOrganizationRequest extends TokenRequest {
-  List<String>? userCodes;
-
-  RemoveUsersFromOrganizationRequest({
-    this.userCodes,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory RemoveUsersFromOrganizationRequest.fromJson(
-      Map<String, dynamic> map) {
-    return RemoveUsersFromOrganizationRequest(
-      userCodes: map['UserCodes'].cast<String>().toList(),
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (userCodes != null) map['UserCodes'] = userCodes;
-    return map;
-  }
+class RemoveUsersFromOrganizationRequest extends TokenRequest{
+	List<String>? userCodes;
+
+	RemoveUsersFromOrganizationRequest({
+		this.userCodes,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory RemoveUsersFromOrganizationRequest.fromJson(Map<String, dynamic> map) {
+		return RemoveUsersFromOrganizationRequest( 
+			userCodes: map['UserCodes'].cast<String>().toList(),
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(userCodes != null)
+			map['UserCodes'] = userCodes;
+		return map;
+	}
 }
 
-class SetUserOrganizationInfoRequest extends TokenRequest {
-  String? userCode;
-  List<String>? roleCodes;
-  List<String>? rankCodes;
-  List<String>? positionCodes;
-  String? organizationCode;
-
-  SetUserOrganizationInfoRequest({
-    this.userCode,
-    this.roleCodes,
-    this.rankCodes,
-    this.positionCodes,
-    this.organizationCode,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory SetUserOrganizationInfoRequest.fromJson(Map<String, dynamic> map) {
-    return SetUserOrganizationInfoRequest(
-      userCode: map['UserCode'],
-      roleCodes: map['RoleCodes'].cast<String>().toList(),
-      rankCodes: map['RankCodes'].cast<String>().toList(),
-      positionCodes: map['PositionCodes'].cast<String>().toList(),
-      organizationCode: map['OrganizationCode'],
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (userCode != null) map['UserCode'] = userCode;
-    if (roleCodes != null) map['RoleCodes'] = roleCodes;
-    if (rankCodes != null) map['RankCodes'] = rankCodes;
-    if (positionCodes != null) map['PositionCodes'] = positionCodes;
-    if (organizationCode != null) map['OrganizationCode'] = organizationCode;
-    return map;
-  }
+class SetUserOrganizationInfoRequest extends TokenRequest{
+	String? userCode;
+	List<String>? roleCodes;
+	List<String>? rankCodes;
+	List<String>? positionCodes;
+	String? organizationCode;
+
+	SetUserOrganizationInfoRequest({
+		this.userCode,
+		this.roleCodes,
+		this.rankCodes,
+		this.positionCodes,
+		this.organizationCode,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory SetUserOrganizationInfoRequest.fromJson(Map<String, dynamic> map) {
+		return SetUserOrganizationInfoRequest( 
+			userCode: map['UserCode'],
+			roleCodes: map['RoleCodes'].cast<String>().toList(),
+			rankCodes: map['RankCodes'].cast<String>().toList(),
+			positionCodes: map['PositionCodes'].cast<String>().toList(),
+			organizationCode: map['OrganizationCode'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(userCode != null)
+			map['UserCode'] = userCode;
+		if(roleCodes != null)
+			map['RoleCodes'] = roleCodes;
+		if(rankCodes != null)
+			map['RankCodes'] = rankCodes;
+		if(positionCodes != null)
+			map['PositionCodes'] = positionCodes;
+		if(organizationCode != null)
+			map['OrganizationCode'] = organizationCode;
+		return map;
+	}
 }
 
-class AlterPersonInfoRequest extends UserDTO {
-  String? token;
-
-  AlterPersonInfoRequest({
-    this.token,
-    String? userCode,
-    String? userName,
-    String? phone,
-    String? email,
-    String? nickName,
-    String? fullName,
-    String? headImageUrl,
-    String? organizationCode,
-    String? rootOrganizationCode,
-    List<String>? authorityGroups,
-    List<String>? bindDevices,
-    String? lastIP,
-    int logintimes = 0,
-    UserInfoStateEnum userState = UserInfoStateEnum.Nonactivated,
-    List<String>? roleCodes,
-    List<String>? rankCodes,
-    List<String>? positionCodes,
-    ApplyStateEnum applyState = ApplyStateEnum.NotApply,
-    DateTime? createTime,
-    DateTime? updateTime,
-  }) : super(
-          userCode: userCode,
-          userName: userName,
-          phone: phone,
-          email: email,
-          nickName: nickName,
-          fullName: fullName,
-          headImageUrl: headImageUrl,
-          organizationCode: organizationCode,
-          rootOrganizationCode: rootOrganizationCode,
-          authorityGroups: authorityGroups,
-          bindDevices: bindDevices,
-          lastIP: lastIP,
-          logintimes: logintimes,
-          userState: userState,
-          roleCodes: roleCodes,
-          rankCodes: rankCodes,
-          positionCodes: positionCodes,
-          applyState: applyState,
-          createTime: createTime,
-          updateTime: updateTime,
-        );
-
-  factory AlterPersonInfoRequest.fromJson(Map<String, dynamic> map) {
-    return AlterPersonInfoRequest(
-      token: map['Token'],
-      userCode: map['UserCode'],
-      userName: map['UserName'],
-      phone: map['Phone'],
-      email: map['Email'],
-      nickName: map['NickName'],
-      fullName: map['FullName'],
-      headImageUrl: map['HeadImageUrl'],
-      organizationCode: map['OrganizationCode'],
-      rootOrganizationCode: map['RootOrganizationCode'],
-      authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
-      bindDevices: map['BindDevices'].cast<String>().toList(),
-      lastIP: map['LastIP'],
-      logintimes: map['Logintimes'],
-      userState: UserInfoStateEnum.values
-          .firstWhere((e) => e.index == map['UserState']),
-      roleCodes: map['RoleCodes'].cast<String>().toList(),
-      rankCodes: map['RankCodes'].cast<String>().toList(),
-      positionCodes: map['PositionCodes'].cast<String>().toList(),
-      applyState:
-          ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (token != null) map['Token'] = token;
-    return map;
-  }
+class AlterPersonInfoRequest extends UserDTO{
+	String? token;
+
+	AlterPersonInfoRequest({
+		this.token,
+		String? userCode,
+		String? userName,
+		String? phone,
+		String? email,
+		String? nickName,
+		String? fullName,
+		String? headImageUrl,
+		String? organizationCode,
+		String? rootOrganizationCode,
+		List<String>? authorityGroups,
+		List<String>? bindDevices,
+		String? lastIP,
+		int logintimes = 0,
+		UserInfoStateEnum userState = UserInfoStateEnum.Nonactivated,
+		List<String>? roleCodes,
+		List<String>? rankCodes,
+		List<String>? positionCodes,
+		ApplyStateEnum applyState = ApplyStateEnum.NotApply,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			userCode: userCode,
+			userName: userName,
+			phone: phone,
+			email: email,
+			nickName: nickName,
+			fullName: fullName,
+			headImageUrl: headImageUrl,
+			organizationCode: organizationCode,
+			rootOrganizationCode: rootOrganizationCode,
+			authorityGroups: authorityGroups,
+			bindDevices: bindDevices,
+			lastIP: lastIP,
+			logintimes: logintimes,
+			userState: userState,
+			roleCodes: roleCodes,
+			rankCodes: rankCodes,
+			positionCodes: positionCodes,
+			applyState: applyState,
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory AlterPersonInfoRequest.fromJson(Map<String, dynamic> map) {
+		return AlterPersonInfoRequest( 
+			token: map['Token'],
+			userCode: map['UserCode'],
+			userName: map['UserName'],
+			phone: map['Phone'],
+			email: map['Email'],
+			nickName: map['NickName'],
+			fullName: map['FullName'],
+			headImageUrl: map['HeadImageUrl'],
+			organizationCode: map['OrganizationCode'],
+			rootOrganizationCode: map['RootOrganizationCode'],
+			authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
+			bindDevices: map['BindDevices'].cast<String>().toList(),
+			lastIP: map['LastIP'],
+			logintimes: map['Logintimes'],
+			userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
+			roleCodes: map['RoleCodes'].cast<String>().toList(),
+			rankCodes: map['RankCodes'].cast<String>().toList(),
+			positionCodes: map['PositionCodes'].cast<String>().toList(),
+			applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(token != null)
+			map['Token'] = token;
+		return map;
+	}
 }
+
+
+