melon.yin 3 years ago
parent
commit
472af4456c

+ 13 - 34
lib/services/department.m.dart

@@ -38,9 +38,9 @@ class PageCollection<T> {
 	List<T>? pageData;
 
 	PageCollection({
-		this.currentPage = 0,
-		this.pageSize = 0,
-		this.dataCount = 0,
+		this.currentPage=0,
+		this.pageSize=0,
+		this.dataCount=0,
 		this.pageData,
 	});
 
@@ -69,42 +69,20 @@ class PageCollection<T> {
 	}
 }
 
-class BaseRequest {
-	String? sessionId;
-
-	BaseRequest({
-		this.sessionId,
-	});
-
-	factory BaseRequest.fromJson(Map<String, dynamic> map) {
-		return BaseRequest( 
-			sessionId: map['SessionId'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(sessionId != null)
-			map['SessionId'] = sessionId;
-		return map;
-	}
-}
-
-class PageRequest extends BaseRequest{
+class PageRequest {
 	int currentPage;
 	int pageSize;
 	Map<String,String>? filter;
 	bool isFuzzy;
+	String? sessionId;
 
 	PageRequest({
-		this.currentPage = 0,
-		this.pageSize = 0,
+		this.currentPage=0,
+		this.pageSize=0,
 		this.filter,
-		this.isFuzzy = false,
-		String? sessionId,
-	}) : super(
-			sessionId: sessionId,
-		);
+		this.isFuzzy=false,
+		this.sessionId,
+	});
 
 	factory PageRequest.fromJson(Map<String, dynamic> map) {
 		return PageRequest( 
@@ -117,15 +95,16 @@ class PageRequest extends BaseRequest{
 	}
 
 	Map<String, dynamic> toJson() {
-		final map = super.toJson();
+		final map = Map<String, dynamic>();
 		map['CurrentPage'] = currentPage;
 		map['PageSize'] = pageSize;
 		if(filter != null)
 			map['Filter'] = filter;
 		map['IsFuzzy'] = isFuzzy;
+		if(sessionId != null)
+			map['SessionId'] = sessionId;
 		return map;
 	}
 }
 
 
-

+ 119 - 110
lib/services/identityApply.m.dart

@@ -1,120 +1,129 @@
 import 'package:fis_jsonrpc/utils.dart';
 
 class BaseEntity {
-	DateTime? createTime;
-	DateTime? updateTime;
-
-	BaseEntity({
-		this.createTime,
-		this.updateTime,
-	});
-
-	factory BaseEntity.fromJson(Map<String, dynamic> map) {
-		return BaseEntity( 
-			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 IdentityApplyInfo extends BaseEntity{
-	String? applyPosition;
-	List<String>? identityCard;
-	List<String>? licenseCard;
-
-	IdentityApplyInfo({
-		this.applyPosition,
-		this.identityCard,
-		this.licenseCard,
-		DateTime? createTime,
-		DateTime? updateTime,
-	}) : super(
-			createTime: createTime,
-			updateTime: updateTime,
-		);
-
-	factory IdentityApplyInfo.fromJson(Map<String, dynamic> map) {
-		final identityCardData = map['IdentityCard'];
-		final licenseCardData = map['LicenseCard'];
-		return IdentityApplyInfo( 
-			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;
-	}
+  DateTime? createTime;
+  DateTime? updateTime;
+
+  BaseEntity({
+    this.createTime,
+    this.updateTime,
+  });
+
+  factory BaseEntity.fromJson(Map<String, dynamic> map) {
+    return BaseEntity(
+      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 ApplyStateEnum {
-	NotApply,
-	Applying,
-	Refused,
-	Passed,
+  NotApply,
+  Applying,
+  Refused,
+  Passed,
 }
 
-class IdentityApplyStateInfo extends IdentityApplyInfo{
-	ApplyStateEnum applyState;
-	String? applyNote;
-
-	IdentityApplyStateInfo({
-		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 IdentityApplyStateInfo.fromJson(Map<String, dynamic> map) {
-		final identityCardData = map['IdentityCard'];
-		final licenseCardData = map['LicenseCard'];
-		return IdentityApplyStateInfo( 
-			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 IdentityApplyStateInfo extends IdentityApplyInfo {
+  String? applyPosition;
+  ApplyStateEnum applyState;
+  String? applyNote;
+
+  IdentityApplyStateInfo({
+    this.applyPosition,
+    this.applyState = ApplyStateEnum.NotApply,
+    this.applyNote,
+    List<String>? identityCard,
+    List<String>? licenseCard,
+    DateTime? createTime,
+    DateTime? updateTime,
+  }) : super(
+          identityCard: identityCard,
+          licenseCard: licenseCard,
+          createTime: createTime,
+          updateTime: updateTime,
+        );
+
+  factory IdentityApplyStateInfo.fromJson(Map<String, dynamic> map) {
+    final identityCardData = map['IdentityCard'];
+    final licenseCardData = map['LicenseCard'];
+    return IdentityApplyStateInfo(
+      applyPosition: map['ApplyPosition'],
+      applyState:
+          ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
+      applyNote: map['ApplyNote'],
+      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;
+    map['ApplyState'] = applyState.index;
+    if (applyNote != null) map['ApplyNote'] = applyNote;
+    return map;
+  }
 }
 
-
-
+class IdentityApplyInfo extends BaseEntity {
+  String? applyPosition;
+  List<String>? identityCard;
+  List<String>? licenseCard;
+
+  IdentityApplyInfo({
+    this.applyPosition,
+    this.identityCard,
+    this.licenseCard,
+    DateTime? createTime,
+    DateTime? updateTime,
+  }) : super(
+          createTime: createTime,
+          updateTime: updateTime,
+        );
+
+  factory IdentityApplyInfo.fromJson(Map<String, dynamic> map) {
+    final identityCardData = map['IdentityCard'];
+    final licenseCardData = map['LicenseCard'];
+    return IdentityApplyInfo(
+      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;
+  }
+}

+ 14 - 101
lib/services/management.dart

@@ -20,8 +20,8 @@ class ManagementService extends JsonRpcClientBase {
 		/// 注册响应实体反序列化处理器
 		FJsonConvert.setDecoder((map) => PageCollection<AdminAccountInfo>.fromJson(map));
 		FJsonConvert.setDecoder((map) => AdminAccountInfo.fromJson(map));
-		FJsonConvert.setDecoder((map) => PageCollection<ManageUserInfo>.fromJson(map));
-		FJsonConvert.setDecoder((map) => ManageUserInfo.fromJson(map));
+		FJsonConvert.setDecoder((map) => PageCollection<UserInfo>.fromJson(map));
+		FJsonConvert.setDecoder((map) => UserInfo.fromJson(map));
 		FJsonConvert.setDecoder((map) => PageCollection<ReportInfo>.fromJson(map));
 		FJsonConvert.setDecoder((map) => ReportInfo.fromJson(map));
 		FJsonConvert.setDecoder((map) => PageCollection<RecordInfo>.fromJson(map));
@@ -32,11 +32,6 @@ class ManagementService extends JsonRpcClientBase {
 		FJsonConvert.setDecoder((map) => PatientInfo.fromJson(map));
 		FJsonConvert.setDecoder((map) => PageCollection<MenuInfo>.fromJson(map));
 		FJsonConvert.setDecoder((map) => MenuInfo.fromJson(map));
-		FJsonConvert.setDecoder((map) => UserFeatureItem.fromJson(map));
-		FJsonConvert.setDecoder((map) => SelectItem.fromJson(map));
-		FJsonConvert.setDecoder((map) => PageCollection<ManageRoleInfo>.fromJson(map));
-		FJsonConvert.setDecoder((map) => ManageRoleInfo.fromJson(map));
-		FJsonConvert.setDecoder((map) => ManageRoleDetail.fromJson(map));
 	}
 
 	Future<String> adminLogin(String adminName,String passwd) async {
@@ -76,19 +71,14 @@ class ManagementService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
-	Future<bool> modifyUserPasswordAsync(String sessionId,String userCode,String passWord) async {
-		var rpcRst = await call("ModifyUserPasswordAsync", [sessionId,userCode,passWord]);
-		return rpcRst;
-	}
-
 	Future<bool> createUserAccountAsync(String sessionId,UserInfo userInfo,String extensionData) async {
 		var rpcRst = await call("CreateUserAccountAsync", [sessionId,userInfo,extensionData]);
 		return rpcRst;
 	}
 
-	Future<PageCollection<ManageUserInfo>> getUserAccountPagesAsync(UserInfoListQueryRequest queryRequest) async {
+	Future<PageCollection<UserInfo>> getUserAccountPagesAsync(UserInfoListQueryRequest queryRequest) async {
 		var rpcRst = await call("GetUserAccountPagesAsync", queryRequest);
-		var result = PageCollection<ManageUserInfo>.fromJson(rpcRst as Map<String, dynamic>);
+		var result = PageCollection<UserInfo>.fromJson(rpcRst as Map<String, dynamic>);
 		return result;
 	}
 
@@ -97,9 +87,9 @@ class ManagementService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
-	Future<ManageUserInfo> findUserAccountByCodeAsync(String sessionId,String userCode) async {
+	Future<UserInfo> findUserAccountByCodeAsync(String sessionId,String userCode) async {
 		var rpcRst = await call("FindUserAccountByCodeAsync", [sessionId,userCode]);
-		var result = ManageUserInfo.fromJson(rpcRst as Map<String, dynamic>);
+		var result = UserInfo.fromJson(rpcRst as Map<String, dynamic>);
 		return result;
 	}
 
@@ -243,23 +233,23 @@ class ManagementService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
-	Future<bool> reject(String sessionId,String identityApplyCode,String rejectReason) async {
-		var rpcRst = await call("Reject", [sessionId,identityApplyCode,rejectReason]);
+	Future<bool> reject(String sessionId,String identityApplyCode) async {
+		var rpcRst = await call("Reject", [sessionId,identityApplyCode]);
 		return rpcRst;
 	}
 
-	Future<bool> addUserAuthorityGroups(String sessionId,UserAuthorityGroupInfo userAuthorityGroupInfo,String extensionData) async {
-		var rpcRst = await call("AddUserAuthorityGroups", [sessionId,userAuthorityGroupInfo,extensionData]);
+	Future<bool> addFrontAuthorityGroups(String sessionId,FrontAuthorityGroupInfo frontAuthorityGroupInfo,String extensionData) async {
+		var rpcRst = await call("AddFrontAuthorityGroups", [sessionId,frontAuthorityGroupInfo,extensionData]);
 		return rpcRst;
 	}
 
-	Future<bool> deleteUserAuthorityGroups(String sessionId,String userAuthorityGroupCode) async {
-		var rpcRst = await call("DeleteUserAuthorityGroups", [sessionId,userAuthorityGroupCode]);
+	Future<bool> deleteFrontAuthorityGroups(String sessionId,String frontAuthorityGroupCode) async {
+		var rpcRst = await call("DeleteFrontAuthorityGroups", [sessionId,frontAuthorityGroupCode]);
 		return rpcRst;
 	}
 
-	Future<bool> updateUserAuthorityGroups(String sessionId,String userAuthorityGroupCode,UserAuthorityGroupInfo userAuthorityGroupInfo,String extensionData) async {
-		var rpcRst = await call("UpdateUserAuthorityGroups", [sessionId,userAuthorityGroupCode,userAuthorityGroupInfo,extensionData]);
+	Future<bool> updateFrontAuthorityGroups(String sessionId,String frontAuthorityGroupCode,FrontAuthorityGroupInfo frontAuthorityGroupInfo,String extensionData) async {
+		var rpcRst = await call("UpdateFrontAuthorityGroups", [sessionId,frontAuthorityGroupCode,frontAuthorityGroupInfo,extensionData]);
 		return rpcRst;
 	}
 
@@ -279,82 +269,5 @@ class ManagementService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
-	Future<List<UserFeatureItem>> getUserFeatureList(String sessionId) async {
-		var rpcRst = await call("GetUserFeatureList", sessionId);
-		var result = (rpcRst as List).map((e)=>UserFeatureItem.fromJson(e as Map<String, dynamic>)).toList();
-		return result;
-	}
-
-	Future<bool> createUserFeature(String sessionId,UserFeatureInfo userFeature) async {
-		var rpcRst = await call("CreateUserFeature", [sessionId,userFeature]);
-		return rpcRst;
-	}
-
-	Future<bool> modifyUserFeature(String sessionId,UserFeatureInfo userFeature) async {
-		var rpcRst = await call("ModifyUserFeature", [sessionId,userFeature]);
-		return rpcRst;
-	}
-
-	Future<bool> deleteUserFeature(String sessionId,String userFeatureCode) async {
-		var rpcRst = await call("DeleteUserFeature", [sessionId,userFeatureCode]);
-		return rpcRst;
-	}
-
-	Future<List<SelectItem>> getUserFeatureSelectList(String sessionId) async {
-		var rpcRst = await call("GetUserFeatureSelectList", sessionId);
-		var result = (rpcRst as List).map((e)=>SelectItem.fromJson(e as Map<String, dynamic>)).toList();
-		return result;
-	}
-
-	Future<List<SelectItem>> getRoleSelectList(String sessionId) async {
-		var rpcRst = await call("GetRoleSelectList", sessionId);
-		var result = (rpcRst as List).map((e)=>SelectItem.fromJson(e as Map<String, dynamic>)).toList();
-		return result;
-	}
-
-	Future<PageCollection<ManageRoleInfo>> getRolePagesAsync(String sessionId,String roleName,int page,int limit) async {
-		var rpcRst = await call("GetRolePagesAsync", [sessionId,roleName,page,limit]);
-		var result = PageCollection<ManageRoleInfo>.fromJson(rpcRst as Map<String, dynamic>);
-		return result;
-	}
-
-	Future<bool> createRole(String sessionId,ManageRoleInfo roleInfo) async {
-		var rpcRst = await call("CreateRole", [sessionId,roleInfo]);
-		return rpcRst;
-	}
-
-	Future<ManageRoleDetail> roleDetail(String sessionId,String roleCode) async {
-		var rpcRst = await call("RoleDetail", [sessionId,roleCode]);
-		var result = ManageRoleDetail.fromJson(rpcRst as Map<String, dynamic>);
-		return result;
-	}
-
-	Future<bool> modifyRole(String sessionId,ManageRoleInfo roleInfo) async {
-		var rpcRst = await call("ModifyRole", [sessionId,roleInfo]);
-		return rpcRst;
-	}
-
-	Future<bool> deleteRole(String sessionId,String roleCode) async {
-		var rpcRst = await call("DeleteRole", [sessionId,roleCode]);
-		return rpcRst;
-	}
-
-	Future<int> queryRoleUserNum(String sessionId,String roleCode) async {
-		var rpcRst = await call("QueryRoleUserNum", [sessionId,roleCode]);
-		return rpcRst;
-	}
-
-	Future<List<SelectItem>> getOrganizationSelectList(String sessionId) async {
-		var rpcRst = await call("GetOrganizationSelectList", sessionId);
-		var result = (rpcRst as List).map((e)=>SelectItem.fromJson(e as Map<String, dynamic>)).toList();
-		return result;
-	}
-
-	Future<PageCollection<AdminAccountInfo>> getLogPagesAsync(String sessionId,String keyword,int page,int limit) async {
-		var rpcRst = await call("GetLogPagesAsync", [sessionId,keyword,page,limit]);
-		var result = PageCollection<AdminAccountInfo>.fromJson(rpcRst as Map<String, dynamic>);
-		return result;
-	}
-
 }
 

+ 650 - 1160
lib/services/management.m.dart

@@ -1,1160 +1,650 @@
-import 'package:fis_jsonrpc/utils.dart';
-
-import 'package:fis_common/json_convert.dart';
-
-class AdminAccountInfo {
-	String? adminCode;
-	String? fatherCode;
-	String? adminName;
-	String? secretPassword;
-	String? headImageToken;
-	String? licenseKey;
-	String? lastIP;
-	String? phone;
-	String? email;
-
-	AdminAccountInfo({
-		this.adminCode,
-		this.fatherCode,
-		this.adminName,
-		this.secretPassword,
-		this.headImageToken,
-		this.licenseKey,
-		this.lastIP,
-		this.phone,
-		this.email,
-	});
-
-	factory AdminAccountInfo.fromJson(Map<String, dynamic> map) {
-		return AdminAccountInfo( 
-			adminCode: map['AdminCode'],
-			fatherCode: map['FatherCode'],
-			adminName: map['AdminName'],
-			secretPassword: map['SecretPassword'],
-			headImageToken: map['HeadImageToken'],
-			licenseKey: map['LicenseKey'],
-			lastIP: map['LastIP'],
-			phone: map['Phone'],
-			email: map['Email'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(adminCode != null)
-			map['AdminCode'] = adminCode;
-		if(fatherCode != null)
-			map['FatherCode'] = fatherCode;
-		if(adminName != null)
-			map['AdminName'] = adminName;
-		if(secretPassword != null)
-			map['SecretPassword'] = secretPassword;
-		if(headImageToken != null)
-			map['HeadImageToken'] = headImageToken;
-		if(licenseKey != null)
-			map['LicenseKey'] = licenseKey;
-		if(lastIP != null)
-			map['LastIP'] = lastIP;
-		if(phone != null)
-			map['Phone'] = phone;
-		if(email != null)
-			map['Email'] = email;
-		return map;
-	}
-}
-
-class PageCollection<T> {
-	int currentPage;
-	int pageSize;
-	int dataCount;
-	List<T>? pageData;
-
-	PageCollection({
-		this.currentPage = 0,
-		this.pageSize = 0,
-		this.dataCount = 0,
-		this.pageData,
-	});
-
-	factory PageCollection.fromJson(Map<String, dynamic> map) {
-		List<T> pageDataList = [];
-		if (map['PageData'] != null) {
-			pageDataList.addAll(
-					(map['PageData'] as List).map((e) => FJsonConvert.fromJson<T>(e)!));
-		}
-		return PageCollection( 
-			currentPage: map['CurrentPage'],
-			pageSize: map['PageSize'],
-			dataCount: map['DataCount'],
-			pageData: pageDataList,
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		map['CurrentPage'] = currentPage;
-		map['PageSize'] = pageSize;
-		map['DataCount'] = dataCount;
-		if(pageData != null)
-			map['PageData'] = pageData;
-		return map;
-	}
-}
-
-class BaseEntity {
-	DateTime? createTime;
-	DateTime? updateTime;
-
-	BaseEntity({
-		this.createTime,
-		this.updateTime,
-	});
-
-	factory BaseEntity.fromJson(Map<String, dynamic> map) {
-		return BaseEntity( 
-			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 UserInfo extends BaseEntity{
-	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;
-
-	UserInfo({
-		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 UserInfo.fromJson(Map<String, dynamic> map) {
-		return UserInfo( 
-			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 ManageUserInfo extends UserInfo{
-	String? roleName;
-	String? rankName;
-	String? departmentName;
-	String? hospitalName;
-	String? identityApplyCode;
-	List<String>? identityCard;
-	List<String>? licenseCard;
-
-	ManageUserInfo({
-		this.roleName,
-		this.rankName,
-		this.departmentName,
-		this.hospitalName,
-		this.identityApplyCode,
-		this.identityCard,
-		this.licenseCard,
-		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 ManageUserInfo.fromJson(Map<String, dynamic> map) {
-		final identityCardData = map['IdentityCard'];
-		final licenseCardData = map['LicenseCard'];
-		return ManageUserInfo( 
-			roleName: map['RoleName'],
-			rankName: map['RankName'],
-			departmentName: map['DepartmentName'],
-			hospitalName: map['HospitalName'],
-			identityApplyCode: map['IdentityApplyCode'],
-			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,
-			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(roleName != null)
-			map['RoleName'] = roleName;
-		if(rankName != null)
-			map['RankName'] = rankName;
-		if(departmentName != null)
-			map['DepartmentName'] = departmentName;
-		if(hospitalName != null)
-			map['HospitalName'] = hospitalName;
-		if(identityApplyCode != null)
-			map['IdentityApplyCode'] = identityApplyCode;
-		if(identityCard != null)
-			map['IdentityCard'] = identityCard;
-		if(licenseCard != null)
-			map['LicenseCard'] = licenseCard;
-		return map;
-	}
-}
-
-class BaseSessionRequest {
-	String? sessionId;
-
-	BaseSessionRequest({
-		this.sessionId,
-	});
-
-	factory BaseSessionRequest.fromJson(Map<String, dynamic> map) {
-		return BaseSessionRequest( 
-			sessionId: map['SessionId'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(sessionId != null)
-			map['SessionId'] = sessionId;
-		return map;
-	}
-}
-
-class BasePagingRequest extends BaseSessionRequest{
-	int page;
-	int limit;
-
-	BasePagingRequest({
-		this.page = 0,
-		this.limit = 0,
-		String? sessionId,
-	}) : super(
-			sessionId: sessionId,
-		);
-
-	factory BasePagingRequest.fromJson(Map<String, dynamic> map) {
-		return BasePagingRequest( 
-			page: map['Page'],
-			limit: map['Limit'],
-			sessionId: map['SessionId'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		map['Page'] = page;
-		map['Limit'] = limit;
-		return map;
-	}
-}
-
-class UserInfoListQueryRequest extends BasePagingRequest{
-	String? queryType;
-	String? keyword;
-	String? queryState;
-
-	UserInfoListQueryRequest({
-		this.queryType,
-		this.keyword,
-		this.queryState,
-		int page = 0,
-		int limit = 0,
-		String? sessionId,
-	}) : super(
-			page: page,
-			limit: limit,
-			sessionId: sessionId,
-		);
-
-	factory UserInfoListQueryRequest.fromJson(Map<String, dynamic> map) {
-		return UserInfoListQueryRequest( 
-			queryType: map['QueryType'],
-			keyword: map['Keyword'],
-			queryState: map['QueryState'],
-			page: map['Page'],
-			limit: map['Limit'],
-			sessionId: map['SessionId'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(queryType != null)
-			map['QueryType'] = queryType;
-		if(keyword != null)
-			map['Keyword'] = keyword;
-		if(queryState != null)
-			map['QueryState'] = queryState;
-		return map;
-	}
-}
-
-class ReportInfo {
-	String? reportCode;
-	String? snapShotReportTemplate;
-	String? reportValuesJson;
-	String? recordCode;
-	String? reportUser;
-	String? tags;
-	String? reportImageUrl;
-	String? reportHtmlRaw;
-
-	ReportInfo({
-		this.reportCode,
-		this.snapShotReportTemplate,
-		this.reportValuesJson,
-		this.recordCode,
-		this.reportUser,
-		this.tags,
-		this.reportImageUrl,
-		this.reportHtmlRaw,
-	});
-
-	factory ReportInfo.fromJson(Map<String, dynamic> map) {
-		return ReportInfo( 
-			reportCode: map['ReportCode'],
-			snapShotReportTemplate: map['SnapShotReportTemplate'],
-			reportValuesJson: map['ReportValuesJson'],
-			recordCode: map['RecordCode'],
-			reportUser: map['ReportUser'],
-			tags: map['Tags'],
-			reportImageUrl: map['ReportImageUrl'],
-			reportHtmlRaw: map['ReportHtmlRaw'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(reportCode != null)
-			map['ReportCode'] = reportCode;
-		if(snapShotReportTemplate != null)
-			map['SnapShotReportTemplate'] = snapShotReportTemplate;
-		if(reportValuesJson != null)
-			map['ReportValuesJson'] = reportValuesJson;
-		if(recordCode != null)
-			map['RecordCode'] = recordCode;
-		if(reportUser != null)
-			map['ReportUser'] = reportUser;
-		if(tags != null)
-			map['Tags'] = tags;
-		if(reportImageUrl != null)
-			map['ReportImageUrl'] = reportImageUrl;
-		if(reportHtmlRaw != null)
-			map['ReportHtmlRaw'] = reportHtmlRaw;
-		return map;
-	}
-}
-
-enum RecordTypeEnum {
-	Ultrasound,
-	Electrocardio,
-}
-
-enum CheckTypeEnum {
-	Default,
-}
-
-enum RecordStatusEnum {
-	Default,
-}
-
-class RecordInfo extends BaseEntity{
-	String? recordCode;
-	String? patientCode;
-	String? patientName;
-	String? orgName;
-	RecordTypeEnum recordType;
-	CheckTypeEnum checkType;
-	String? localRecordCode;
-	RecordStatusEnum recordStatus;
-	String? recordRemark;
-	String? tags;
-
-	RecordInfo({
-		this.recordCode,
-		this.patientCode,
-		this.patientName,
-		this.orgName,
-		this.recordType = RecordTypeEnum.Ultrasound,
-		this.checkType = CheckTypeEnum.Default,
-		this.localRecordCode,
-		this.recordStatus = RecordStatusEnum.Default,
-		this.recordRemark,
-		this.tags,
-		DateTime? createTime,
-		DateTime? updateTime,
-	}) : super(
-			createTime: createTime,
-			updateTime: updateTime,
-		);
-
-	factory RecordInfo.fromJson(Map<String, dynamic> map) {
-		return RecordInfo( 
-			recordCode: map['RecordCode'],
-			patientCode: map['PatientCode'],
-			patientName: map['PatientName'],
-			orgName: map['OrgName'],
-			recordType: RecordTypeEnum.values.firstWhere((e) => e.index == map['RecordType']),
-			checkType: CheckTypeEnum.values.firstWhere((e) => e.index == map['CheckType']),
-			localRecordCode: map['LocalRecordCode'],
-			recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
-			recordRemark: map['RecordRemark'],
-			tags: map['Tags'],
-			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(recordCode != null)
-			map['RecordCode'] = recordCode;
-		if(patientCode != null)
-			map['PatientCode'] = patientCode;
-		if(patientName != null)
-			map['PatientName'] = patientName;
-		if(orgName != null)
-			map['OrgName'] = orgName;
-		map['RecordType'] = recordType.index;
-		map['CheckType'] = checkType.index;
-		if(localRecordCode != null)
-			map['LocalRecordCode'] = localRecordCode;
-		map['RecordStatus'] = recordStatus.index;
-		if(recordRemark != null)
-			map['RecordRemark'] = recordRemark;
-		if(tags != null)
-			map['Tags'] = tags;
-		return map;
-	}
-}
-
-enum DeviceDataTypeEnum {
-	Default,
-}
-
-class DeviceData extends BaseEntity{
-	String? deviceDataCode;
-	String? deviceCode;
-	String? deviceFileCode;
-	String? recordCode;
-	String? patientCode;
-	String? previewImageToken;
-	String? dataToken;
-	DeviceDataTypeEnum deviceDataType;
-	String? processResult;
-
-	DeviceData({
-		this.deviceDataCode,
-		this.deviceCode,
-		this.deviceFileCode,
-		this.recordCode,
-		this.patientCode,
-		this.previewImageToken,
-		this.dataToken,
-		this.deviceDataType = DeviceDataTypeEnum.Default,
-		this.processResult,
-		DateTime? createTime,
-		DateTime? updateTime,
-	}) : super(
-			createTime: createTime,
-			updateTime: updateTime,
-		);
-
-	factory DeviceData.fromJson(Map<String, dynamic> map) {
-		return DeviceData( 
-			deviceDataCode: map['DeviceDataCode'],
-			deviceCode: map['DeviceCode'],
-			deviceFileCode: map['DeviceFileCode'],
-			recordCode: map['RecordCode'],
-			patientCode: map['PatientCode'],
-			previewImageToken: map['PreviewImageToken'],
-			dataToken: map['DataToken'],
-			deviceDataType: DeviceDataTypeEnum.values.firstWhere((e) => e.index == map['DeviceDataType']),
-			processResult: map['ProcessResult'],
-			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(deviceDataCode != null)
-			map['DeviceDataCode'] = deviceDataCode;
-		if(deviceCode != null)
-			map['DeviceCode'] = deviceCode;
-		if(deviceFileCode != null)
-			map['DeviceFileCode'] = deviceFileCode;
-		if(recordCode != null)
-			map['RecordCode'] = recordCode;
-		if(patientCode != null)
-			map['PatientCode'] = patientCode;
-		if(previewImageToken != null)
-			map['PreviewImageToken'] = previewImageToken;
-		if(dataToken != null)
-			map['DataToken'] = dataToken;
-		map['DeviceDataType'] = deviceDataType.index;
-		if(processResult != null)
-			map['ProcessResult'] = processResult;
-		return map;
-	}
-}
-
-enum GenderTypeEnum {
-	Male,
-	Female,
-}
-
-enum PatientTypeEnum {
-	Default,
-}
-
-class PatientInfo extends BaseEntity{
-	String? patientCode;
-	String? firstName;
-	String? lastName;
-	String? patientCardNo;
-	DateTime? birthday;
-	GenderTypeEnum genderType;
-	String? patientCaseHistory;
-	String? patientPhone;
-	PatientTypeEnum patientType;
-
-	PatientInfo({
-		this.patientCode,
-		this.firstName,
-		this.lastName,
-		this.patientCardNo,
-		this.birthday,
-		this.genderType = GenderTypeEnum.Male,
-		this.patientCaseHistory,
-		this.patientPhone,
-		this.patientType = PatientTypeEnum.Default,
-		DateTime? createTime,
-		DateTime? updateTime,
-	}) : super(
-			createTime: createTime,
-			updateTime: updateTime,
-		);
-
-	factory PatientInfo.fromJson(Map<String, dynamic> map) {
-		return PatientInfo( 
-			patientCode: map['PatientCode'],
-			firstName: map['FirstName'],
-			lastName: map['LastName'],
-			patientCardNo: map['PatientCardNo'],
-			birthday: map['Birthday'] != null ? DateTime.parse(map['Birthday']) : null,
-			genderType: GenderTypeEnum.values.firstWhere((e) => e.index == map['GenderType']),
-			patientCaseHistory: map['PatientCaseHistory'],
-			patientPhone: map['PatientPhone'],
-			patientType: PatientTypeEnum.values.firstWhere((e) => e.index == map['PatientType']),
-			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(patientCode != null)
-			map['PatientCode'] = patientCode;
-		if(firstName != null)
-			map['FirstName'] = firstName;
-		if(lastName != null)
-			map['LastName'] = lastName;
-		if(patientCardNo != null)
-			map['PatientCardNo'] = patientCardNo;
-		if(birthday != null)
-			map['Birthday'] = JsonRpcUtils.dateFormat(birthday!);
-		map['GenderType'] = genderType.index;
-		if(patientCaseHistory != null)
-			map['PatientCaseHistory'] = patientCaseHistory;
-		if(patientPhone != null)
-			map['PatientPhone'] = patientPhone;
-		map['PatientType'] = patientType.index;
-		return map;
-	}
-}
-
-class MenuInfo {
-	String? menuCode;
-	String? menuName;
-	String? menuType;
-	String? menuShowName;
-	int menuSort;
-	String? menuFatherCode;
-
-	MenuInfo({
-		this.menuCode,
-		this.menuName,
-		this.menuType,
-		this.menuShowName,
-		this.menuSort = 0,
-		this.menuFatherCode,
-	});
-
-	factory MenuInfo.fromJson(Map<String, dynamic> map) {
-		return MenuInfo( 
-			menuCode: map['MenuCode'],
-			menuName: map['MenuName'],
-			menuType: map['MenuType'],
-			menuShowName: map['MenuShowName'],
-			menuSort: map['MenuSort'],
-			menuFatherCode: map['MenuFatherCode'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(menuCode != null)
-			map['MenuCode'] = menuCode;
-		if(menuName != null)
-			map['MenuName'] = menuName;
-		if(menuType != null)
-			map['MenuType'] = menuType;
-		if(menuShowName != null)
-			map['MenuShowName'] = menuShowName;
-		map['MenuSort'] = menuSort;
-		if(menuFatherCode != null)
-			map['MenuFatherCode'] = menuFatherCode;
-		return map;
-	}
-}
-
-class UserAuthorityGroupInfo extends BaseEntity{
-	String? userGroupCode;
-	String? description;
-	List<String>? adminCodes;
-	List<String>? features;
-
-	UserAuthorityGroupInfo({
-		this.userGroupCode,
-		this.description,
-		this.adminCodes,
-		this.features,
-		DateTime? createTime,
-		DateTime? updateTime,
-	}) : super(
-			createTime: createTime,
-			updateTime: updateTime,
-		);
-
-	factory UserAuthorityGroupInfo.fromJson(Map<String, dynamic> map) {
-		return UserAuthorityGroupInfo( 
-			userGroupCode: map['UserGroupCode'],
-			description: map['Description'],
-			adminCodes: map['AdminCodes'].cast<String>().toList(),
-			features: map['Features'].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(userGroupCode != null)
-			map['UserGroupCode'] = userGroupCode;
-		if(description != null)
-			map['Description'] = description;
-		if(adminCodes != null)
-			map['AdminCodes'] = adminCodes;
-		if(features != null)
-			map['Features'] = features;
-		return map;
-	}
-}
-
-class BaseUserFeatureItem<T> {
-	String? id;
-	String? label;
-	String? fatherCode;
-	List<T>? children;
-
-	BaseUserFeatureItem({
-		this.id,
-		this.label,
-		this.fatherCode,
-		this.children,
-	});
-
-	factory BaseUserFeatureItem.fromJson(Map<String, dynamic> map) {
-		List<T> childrenList = [];
-		if (map['Children'] != null) {
-			childrenList.addAll(
-					(map['Children'] as List).map((e) => FJsonConvert.fromJson<T>(e)!));
-		}
-		return BaseUserFeatureItem( 
-			id: map['Id'],
-			label: map['Label'],
-			fatherCode: map['FatherCode'],
-			children: childrenList,
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(id != null)
-			map['Id'] = id;
-		if(label != null)
-			map['Label'] = label;
-		if(fatherCode != null)
-			map['FatherCode'] = fatherCode;
-		if(children != null)
-			map['Children'] = children;
-		return map;
-	}
-}
-
-class UserFeatureItem extends BaseUserFeatureItem<UserFeatureItem>{
-
-	UserFeatureItem({
-		String? id,
-		String? label,
-		String? fatherCode,
-		List<UserFeatureItem>? children,
-	}) : super(
-			id: id,
-			label: label,
-			fatherCode: fatherCode,
-			children: children,
-		);
-
-	factory UserFeatureItem.fromJson(Map<String, dynamic> map) {
-		List<UserFeatureItem> childrenList = [];
-		if (map['Children'] != null) {
-			childrenList.addAll(
-					(map['Children'] as List).map((e) => FJsonConvert.fromJson<UserFeatureItem>(e)!));
-		}
-		return UserFeatureItem( 
-			id: map['Id'],
-			label: map['Label'],
-			fatherCode: map['FatherCode'],
-			children: childrenList,
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		return map;
-	}
-}
-
-class UserFeatureInfo {
-	String? featureCode;
-	String? featureName;
-	String? fatherCode;
-
-	UserFeatureInfo({
-		this.featureCode,
-		this.featureName,
-		this.fatherCode,
-	});
-
-	factory UserFeatureInfo.fromJson(Map<String, dynamic> map) {
-		return UserFeatureInfo( 
-			featureCode: map['FeatureCode'],
-			featureName: map['FeatureName'],
-			fatherCode: map['FatherCode'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(featureCode != null)
-			map['FeatureCode'] = featureCode;
-		if(featureName != null)
-			map['FeatureName'] = featureName;
-		if(fatherCode != null)
-			map['FatherCode'] = fatherCode;
-		return map;
-	}
-}
-
-class SelectItem {
-	String? key;
-	String? value;
-
-	SelectItem({
-		this.key,
-		this.value,
-	});
-
-	factory SelectItem.fromJson(Map<String, dynamic> map) {
-		return SelectItem( 
-			key: map['Key'],
-			value: map['Value'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(key != null)
-			map['Key'] = key;
-		if(value != null)
-			map['Value'] = value;
-		return map;
-	}
-}
-
-enum RoleShowTypeEnum {
-	NotShow,
-	ISShow,
-}
-
-enum RoleQualificationEnum {
-	NoNeed,
-	ID,
-	DocLicense,
-	Both,
-}
-
-class RoleInfo extends BaseEntity{
-	String? roleCode;
-	String? roleName;
-	RoleShowTypeEnum roleShowType;
-	String? description;
-	String? iConUrl;
-	String? colorStart;
-	String? colorEnd;
-	RoleQualificationEnum roleQualification;
-
-	RoleInfo({
-		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 RoleInfo.fromJson(Map<String, dynamic> map) {
-		return RoleInfo( 
-			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 ManageRoleInfo extends RoleInfo{
-	List<String>? featuresCodeList;
-
-	ManageRoleInfo({
-		this.featuresCodeList,
-		String? roleCode,
-		String? roleName,
-		RoleShowTypeEnum roleShowType = RoleShowTypeEnum.NotShow,
-		String? description,
-		String? iConUrl,
-		String? colorStart,
-		String? colorEnd,
-		RoleQualificationEnum roleQualification = RoleQualificationEnum.NoNeed,
-		DateTime? createTime,
-		DateTime? updateTime,
-	}) : super(
-			roleCode: roleCode,
-			roleName: roleName,
-			roleShowType: roleShowType,
-			description: description,
-			iConUrl: iConUrl,
-			colorStart: colorStart,
-			colorEnd: colorEnd,
-			roleQualification: roleQualification,
-			createTime: createTime,
-			updateTime: updateTime,
-		);
-
-	factory ManageRoleInfo.fromJson(Map<String, dynamic> map) {
-		return ManageRoleInfo( 
-			featuresCodeList: map['FeaturesCodeList'].cast<String>().toList(),
-			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(featuresCodeList != null)
-			map['FeaturesCodeList'] = featuresCodeList;
-		return map;
-	}
-}
-
-class FeatureDetail {
-	String? id;
-
-	FeatureDetail({
-		this.id,
-	});
-
-	factory FeatureDetail.fromJson(Map<String, dynamic> map) {
-		return FeatureDetail( 
-			id: map['Id'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(id != null)
-			map['Id'] = id;
-		return map;
-	}
-}
-
-class ManageRoleDetail extends RoleInfo{
-	List<FeatureDetail>? featureList;
-
-	ManageRoleDetail({
-		this.featureList,
-		String? roleCode,
-		String? roleName,
-		RoleShowTypeEnum roleShowType = RoleShowTypeEnum.NotShow,
-		String? description,
-		String? iConUrl,
-		String? colorStart,
-		String? colorEnd,
-		RoleQualificationEnum roleQualification = RoleQualificationEnum.NoNeed,
-		DateTime? createTime,
-		DateTime? updateTime,
-	}) : super(
-			roleCode: roleCode,
-			roleName: roleName,
-			roleShowType: roleShowType,
-			description: description,
-			iConUrl: iConUrl,
-			colorStart: colorStart,
-			colorEnd: colorEnd,
-			roleQualification: roleQualification,
-			createTime: createTime,
-			updateTime: updateTime,
-		);
-
-	factory ManageRoleDetail.fromJson(Map<String, dynamic> map) {
-		return ManageRoleDetail( 
-			featureList: map['FeatureList'].map((e)=>FeatureDetail.fromJson(e as Map<String,dynamic>)).toList(),
-			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(featureList != null)
-			map['FeatureList'] = featureList;
-		return map;
-	}
-}
-
-
-
+import 'package:fis_jsonrpc/utils.dart';

import 'package:fis_common/json_convert.dart';
+
+class AdminAccountInfo {
+	String? adminCode;
+	String? fatherCode;
+	String? adminName;
+	String? secretPassword;
+	String? headImageToken;
+	String? licenseKey;
+	String? lastIP;
+	String? phone;
+	String? email;
+
+	AdminAccountInfo({
+		this.adminCode,
+		this.fatherCode,
+		this.adminName,
+		this.secretPassword,
+		this.headImageToken,
+		this.licenseKey,
+		this.lastIP,
+		this.phone,
+		this.email,
+	});
+
+	factory AdminAccountInfo.fromJson(Map<String, dynamic> map) {
+		return AdminAccountInfo( 
+			adminCode: map['AdminCode'],
+			fatherCode: map['FatherCode'],
+			adminName: map['AdminName'],
+			secretPassword: map['SecretPassword'],
+			headImageToken: map['HeadImageToken'],
+			licenseKey: map['LicenseKey'],
+			lastIP: map['LastIP'],
+			phone: map['Phone'],
+			email: map['Email'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(adminCode != null)
+			map['AdminCode'] = adminCode;
+		if(fatherCode != null)
+			map['FatherCode'] = fatherCode;
+		if(adminName != null)
+			map['AdminName'] = adminName;
+		if(secretPassword != null)
+			map['SecretPassword'] = secretPassword;
+		if(headImageToken != null)
+			map['HeadImageToken'] = headImageToken;
+		if(licenseKey != null)
+			map['LicenseKey'] = licenseKey;
+		if(lastIP != null)
+			map['LastIP'] = lastIP;
+		if(phone != null)
+			map['Phone'] = phone;
+		if(email != null)
+			map['Email'] = email;
+		return map;
+	}
+}
+
+class PageCollection<T> {
+	int currentPage;
+	int pageSize;
+	int dataCount;
+	List<T>? pageData;
+
+	PageCollection({
+		this.currentPage=0,
+		this.pageSize=0,
+		this.dataCount=0,
+		this.pageData,
+	});
+
+	factory PageCollection.fromJson(Map<String, dynamic> map) {
+		List<T> pageDataList = [];
+		if (map['PageData'] != null) {
+			pageDataList.addAll(
+					(map['PageData'] as List).map((e) => FJsonConvert.fromJson<T>(e)!));
+		}
+		return PageCollection( 
+			currentPage: map['CurrentPage'],
+			pageSize: map['PageSize'],
+			dataCount: map['DataCount'],
+			pageData: pageDataList,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		map['CurrentPage'] = currentPage;
+		map['PageSize'] = pageSize;
+		map['DataCount'] = dataCount;
+		if(pageData != null)
+			map['PageData'] = pageData;
+		return map;
+	}
+}
+
+enum UserInfoStateEnum {
+	Nonactivated,
+	Activated,
+}
+
+enum ApplyStateEnum {
+	Applying,
+	Refused,
+	Passed,
+}
+
+class UserInfo {
+	String? userCode;
+	String? userName;
+	String? phone;
+	String? email;
+	String? nickName;
+	String? fullName;
+	String? headImageUrl;
+	String? organizationCode;
+	List<String>? authorityGroups;
+	List<String>? bindDevices;
+	String? lastIP;
+	int logintimes;
+	UserInfoStateEnum userState;
+	List<String>? roleCodes;
+	List<String>? rankCodes;
+	ApplyStateEnum applyState;
+	String? roleName;
+	DateTime? createTime;
+	DateTime? updateTime;
+
+	UserInfo({
+		this.userCode,
+		this.userName,
+		this.phone,
+		this.email,
+		this.nickName,
+		this.fullName,
+		this.headImageUrl,
+		this.organizationCode,
+		this.authorityGroups,
+		this.bindDevices,
+		this.lastIP,
+		this.logintimes=0,
+		this.userState=UserInfoStateEnum.Nonactivated,
+		this.roleCodes,
+		this.rankCodes,
+		this.applyState=ApplyStateEnum.Applying,
+		this.roleName,
+		this.createTime,
+		this.updateTime,
+	});
+
+	factory UserInfo.fromJson(Map<String, dynamic> map) {
+		return UserInfo( 
+			userCode: map['UserCode'],
+			userName: map['UserName'],
+			phone: map['Phone'],
+			email: map['Email'],
+			nickName: map['NickName'],
+			fullName: map['FullName'],
+			headImageUrl: map['HeadImageUrl'],
+			organizationCode: map['OrganizationCode'],
+			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(),
+			applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
+			roleName: map['RoleName'],
+			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(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(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;
+		map['ApplyState'] = applyState.index;
+		if(roleName != null)
+			map['RoleName'] = roleName;
+		if(createTime != null)
+			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
+		if(updateTime != null)
+			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
+		return map;
+	}
+}
+
+class UserInfoListQueryRequest {
+	String? queryType;
+	String? keyword;
+	String? queryState;
+	int page;
+	int limit;
+	String? sessionId;
+
+	UserInfoListQueryRequest({
+		this.queryType,
+		this.keyword,
+		this.queryState,
+		this.page=0,
+		this.limit=0,
+		this.sessionId,
+	});
+
+	factory UserInfoListQueryRequest.fromJson(Map<String, dynamic> map) {
+		return UserInfoListQueryRequest( 
+			queryType: map['QueryType'],
+			keyword: map['Keyword'],
+			queryState: map['QueryState'],
+			page: map['Page'],
+			limit: map['Limit'],
+			sessionId: map['SessionId'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(queryType != null)
+			map['QueryType'] = queryType;
+		if(keyword != null)
+			map['Keyword'] = keyword;
+		if(queryState != null)
+			map['QueryState'] = queryState;
+		map['Page'] = page;
+		map['Limit'] = limit;
+		if(sessionId != null)
+			map['SessionId'] = sessionId;
+		return map;
+	}
+}
+
+class ReportInfo {
+	String? reportCode;
+	String? snapShotReportTemplate;
+	String? reportValuesJson;
+	String? recordCode;
+	String? reportUser;
+	String? tags;
+	String? reportImageUrl;
+	String? reportHtmlRaw;
+
+	ReportInfo({
+		this.reportCode,
+		this.snapShotReportTemplate,
+		this.reportValuesJson,
+		this.recordCode,
+		this.reportUser,
+		this.tags,
+		this.reportImageUrl,
+		this.reportHtmlRaw,
+	});
+
+	factory ReportInfo.fromJson(Map<String, dynamic> map) {
+		return ReportInfo( 
+			reportCode: map['ReportCode'],
+			snapShotReportTemplate: map['SnapShotReportTemplate'],
+			reportValuesJson: map['ReportValuesJson'],
+			recordCode: map['RecordCode'],
+			reportUser: map['ReportUser'],
+			tags: map['Tags'],
+			reportImageUrl: map['ReportImageUrl'],
+			reportHtmlRaw: map['ReportHtmlRaw'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(reportCode != null)
+			map['ReportCode'] = reportCode;
+		if(snapShotReportTemplate != null)
+			map['SnapShotReportTemplate'] = snapShotReportTemplate;
+		if(reportValuesJson != null)
+			map['ReportValuesJson'] = reportValuesJson;
+		if(recordCode != null)
+			map['RecordCode'] = recordCode;
+		if(reportUser != null)
+			map['ReportUser'] = reportUser;
+		if(tags != null)
+			map['Tags'] = tags;
+		if(reportImageUrl != null)
+			map['ReportImageUrl'] = reportImageUrl;
+		if(reportHtmlRaw != null)
+			map['ReportHtmlRaw'] = reportHtmlRaw;
+		return map;
+	}
+}
+
+enum RecordTypeEnum {
+	Ultrasound,
+	Electrocardio,
+}
+
+enum CheckTypeEnum {
+	Default,
+}
+
+enum RecordStatusEnum {
+	Default,
+}
+
+class RecordInfo {
+	String? recordCode;
+	String? patientCode;
+	String? patientName;
+	String? orgName;
+	RecordTypeEnum recordType;
+	CheckTypeEnum checkType;
+	String? localRecordCode;
+	RecordStatusEnum recordStatus;
+	String? recordRemark;
+	String? tags;
+	DateTime? createTime;
+	DateTime? updateTime;
+
+	RecordInfo({
+		this.recordCode,
+		this.patientCode,
+		this.patientName,
+		this.orgName,
+		this.recordType=RecordTypeEnum.Ultrasound,
+		this.checkType=CheckTypeEnum.Default,
+		this.localRecordCode,
+		this.recordStatus=RecordStatusEnum.Default,
+		this.recordRemark,
+		this.tags,
+		this.createTime,
+		this.updateTime,
+	});
+
+	factory RecordInfo.fromJson(Map<String, dynamic> map) {
+		return RecordInfo( 
+			recordCode: map['RecordCode'],
+			patientCode: map['PatientCode'],
+			patientName: map['PatientName'],
+			orgName: map['OrgName'],
+			recordType: RecordTypeEnum.values.firstWhere((e) => e.index == map['RecordType']),
+			checkType: CheckTypeEnum.values.firstWhere((e) => e.index == map['CheckType']),
+			localRecordCode: map['LocalRecordCode'],
+			recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
+			recordRemark: map['RecordRemark'],
+			tags: map['Tags'],
+			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(recordCode != null)
+			map['RecordCode'] = recordCode;
+		if(patientCode != null)
+			map['PatientCode'] = patientCode;
+		if(patientName != null)
+			map['PatientName'] = patientName;
+		if(orgName != null)
+			map['OrgName'] = orgName;
+		map['RecordType'] = recordType.index;
+		map['CheckType'] = checkType.index;
+		if(localRecordCode != null)
+			map['LocalRecordCode'] = localRecordCode;
+		map['RecordStatus'] = recordStatus.index;
+		if(recordRemark != null)
+			map['RecordRemark'] = recordRemark;
+		if(tags != null)
+			map['Tags'] = tags;
+		if(createTime != null)
+			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
+		if(updateTime != null)
+			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
+		return map;
+	}
+}
+
+enum DeviceDataTypeEnum {
+	Default,
+}
+
+class DeviceData {
+	String? deviceDataCode;
+	String? deviceCode;
+	String? deviceFileCode;
+	String? recordCode;
+	String? patientCode;
+	String? previewImageToken;
+	String? dataToken;
+	DeviceDataTypeEnum deviceDataType;
+	String? processResult;
+	DateTime? createTime;
+	DateTime? updateTime;
+
+	DeviceData({
+		this.deviceDataCode,
+		this.deviceCode,
+		this.deviceFileCode,
+		this.recordCode,
+		this.patientCode,
+		this.previewImageToken,
+		this.dataToken,
+		this.deviceDataType=DeviceDataTypeEnum.Default,
+		this.processResult,
+		this.createTime,
+		this.updateTime,
+	});
+
+	factory DeviceData.fromJson(Map<String, dynamic> map) {
+		return DeviceData( 
+			deviceDataCode: map['DeviceDataCode'],
+			deviceCode: map['DeviceCode'],
+			deviceFileCode: map['DeviceFileCode'],
+			recordCode: map['RecordCode'],
+			patientCode: map['PatientCode'],
+			previewImageToken: map['PreviewImageToken'],
+			dataToken: map['DataToken'],
+			deviceDataType: DeviceDataTypeEnum.values.firstWhere((e) => e.index == map['DeviceDataType']),
+			processResult: map['ProcessResult'],
+			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(deviceDataCode != null)
+			map['DeviceDataCode'] = deviceDataCode;
+		if(deviceCode != null)
+			map['DeviceCode'] = deviceCode;
+		if(deviceFileCode != null)
+			map['DeviceFileCode'] = deviceFileCode;
+		if(recordCode != null)
+			map['RecordCode'] = recordCode;
+		if(patientCode != null)
+			map['PatientCode'] = patientCode;
+		if(previewImageToken != null)
+			map['PreviewImageToken'] = previewImageToken;
+		if(dataToken != null)
+			map['DataToken'] = dataToken;
+		map['DeviceDataType'] = deviceDataType.index;
+		if(processResult != null)
+			map['ProcessResult'] = processResult;
+		if(createTime != null)
+			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
+		if(updateTime != null)
+			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
+		return map;
+	}
+}
+
+enum GenderTypeEnum {
+	Male,
+	Female,
+}
+
+enum PatientTypeEnum {
+	Default,
+}
+
+class PatientInfo {
+	String? patientCode;
+	String? firstName;
+	String? lastName;
+	String? patientCardNo;
+	DateTime? birthday;
+	GenderTypeEnum genderType;
+	String? patientCaseHistory;
+	String? patientPhone;
+	PatientTypeEnum patientType;
+	DateTime? createTime;
+	DateTime? updateTime;
+
+	PatientInfo({
+		this.patientCode,
+		this.firstName,
+		this.lastName,
+		this.patientCardNo,
+		this.birthday,
+		this.genderType=GenderTypeEnum.Male,
+		this.patientCaseHistory,
+		this.patientPhone,
+		this.patientType=PatientTypeEnum.Default,
+		this.createTime,
+		this.updateTime,
+	});
+
+	factory PatientInfo.fromJson(Map<String, dynamic> map) {
+		return PatientInfo( 
+			patientCode: map['PatientCode'],
+			firstName: map['FirstName'],
+			lastName: map['LastName'],
+			patientCardNo: map['PatientCardNo'],
+			birthday: map['Birthday'] != null ? DateTime.parse(map['Birthday']) : null,
+			genderType: GenderTypeEnum.values.firstWhere((e) => e.index == map['GenderType']),
+			patientCaseHistory: map['PatientCaseHistory'],
+			patientPhone: map['PatientPhone'],
+			patientType: PatientTypeEnum.values.firstWhere((e) => e.index == map['PatientType']),
+			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(patientCode != null)
+			map['PatientCode'] = patientCode;
+		if(firstName != null)
+			map['FirstName'] = firstName;
+		if(lastName != null)
+			map['LastName'] = lastName;
+		if(patientCardNo != null)
+			map['PatientCardNo'] = patientCardNo;
+		if(birthday != null)
+			map['Birthday'] = JsonRpcUtils.dateFormat(birthday!);
+		map['GenderType'] = genderType.index;
+		if(patientCaseHistory != null)
+			map['PatientCaseHistory'] = patientCaseHistory;
+		if(patientPhone != null)
+			map['PatientPhone'] = patientPhone;
+		map['PatientType'] = patientType.index;
+		if(createTime != null)
+			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
+		if(updateTime != null)
+			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
+		return map;
+	}
+}
+
+class MenuInfo {
+	String? menuCode;
+	String? menuName;
+	String? menuType;
+	String? menuShowName;
+	int menuSort;
+	String? menuFatherCode;
+
+	MenuInfo({
+		this.menuCode,
+		this.menuName,
+		this.menuType,
+		this.menuShowName,
+		this.menuSort=0,
+		this.menuFatherCode,
+	});
+
+	factory MenuInfo.fromJson(Map<String, dynamic> map) {
+		return MenuInfo( 
+			menuCode: map['MenuCode'],
+			menuName: map['MenuName'],
+			menuType: map['MenuType'],
+			menuShowName: map['MenuShowName'],
+			menuSort: map['MenuSort'],
+			menuFatherCode: map['MenuFatherCode'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(menuCode != null)
+			map['MenuCode'] = menuCode;
+		if(menuName != null)
+			map['MenuName'] = menuName;
+		if(menuType != null)
+			map['MenuType'] = menuType;
+		if(menuShowName != null)
+			map['MenuShowName'] = menuShowName;
+		map['MenuSort'] = menuSort;
+		if(menuFatherCode != null)
+			map['MenuFatherCode'] = menuFatherCode;
+		return map;
+	}
+}
+
+class FrontAuthorityGroupInfo {
+	String? frontGroupCode;
+	String? description;
+	List<String>? adminCodes;
+	List<String>? features;
+	DateTime? createTime;
+	DateTime? updateTime;
+
+	FrontAuthorityGroupInfo({
+		this.frontGroupCode,
+		this.description,
+		this.adminCodes,
+		this.features,
+		this.createTime,
+		this.updateTime,
+	});
+
+	factory FrontAuthorityGroupInfo.fromJson(Map<String, dynamic> map) {
+		return FrontAuthorityGroupInfo( 
+			frontGroupCode: map['FrontGroupCode'],
+			description: map['Description'],
+			adminCodes: map['AdminCodes'].cast<String>().toList(),
+			features: map['Features'].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 = Map<String, dynamic>();
+		if(frontGroupCode != null)
+			map['FrontGroupCode'] = frontGroupCode;
+		if(description != null)
+			map['Description'] = description;
+		if(adminCodes != null)
+			map['AdminCodes'] = adminCodes;
+		if(features != null)
+			map['Features'] = features;
+		if(createTime != null)
+			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
+		if(updateTime != null)
+			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
+		return map;
+	}
+}
+
+

+ 23 - 115
lib/services/storage.m.dart

@@ -1,134 +1,42 @@
-class UploadResultInfo {
-	String? fileToken;
-	String? fileUrl;
-
-	UploadResultInfo({
-		this.fileToken,
-		this.fileUrl,
-	});
-
-	factory UploadResultInfo.fromJson(Map<String, dynamic> map) {
-		return UploadResultInfo( 
-			fileToken: map['FileToken'],
-			fileUrl: map['FileUrl'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(fileToken != null)
-			map['FileToken'] = fileToken;
-		if(fileUrl != null)
-			map['FileUrl'] = fileUrl;
-		return map;
-	}
-}
-
-enum UploadFileType {
-	Unknown,
-	EXE,
-	APK,
-	IPA,
-	ZIP,
-	DAT,
-	RAR,
-	PNG,
-	ICON,
-	BMP,
-	JPEG,
-	PDF,
-	DOC,
-	DOCX,
-	XLS,
-	XLSX,
-	MP4,
-	MSI,
-	VID,
+enum UploadDataType {
+	Base64String,
+	ByteArray,
 }
 
 class StorageFileInfo {
-	String? signature;
-	String? fileToken;
-	int nextAppendPosition;
-	UploadFileType fileType;
+	UploadDataType uploadDataCategory;
+	List<int>? fileData;
+	String? fileBase64String;
+	String? fileName;
 
 	StorageFileInfo({
-		this.signature,
-		this.fileToken,
-		this.nextAppendPosition = 0,
-		this.fileType = UploadFileType.Unknown,
+		this.uploadDataCategory=UploadDataType.Base64String,
+		this.fileData,
+		this.fileBase64String,
+		this.fileName,
 	});
 
 	factory StorageFileInfo.fromJson(Map<String, dynamic> map) {
+		final fileDataData = map['FileData'];
 		return StorageFileInfo( 
-			signature: map['Signature'],
-			fileToken: map['FileToken'],
-			nextAppendPosition: map['NextAppendPosition'],
-			fileType: UploadFileType.values.firstWhere((e) => e.index == map['FileType']),
+			uploadDataCategory: UploadDataType.values.firstWhere((e) => e.index == map['UploadDataCategory']),
+			fileData: fileDataData != null ? (fileDataData as List).map((e) => e as int).toList(): null,
+			fileBase64String: map['FileBase64String'],
+			fileName: map['FileName'],
 		);
 	}
 
 	Map<String, dynamic> toJson() {
 		final map = Map<String, dynamic>();
-		if(signature != null)
-			map['Signature'] = signature;
-		if(fileToken != null)
-			map['FileToken'] = fileToken;
-		map['NextAppendPosition'] = nextAppendPosition;
-		map['FileType'] = fileType.index;
+		map['UploadDataCategory'] = uploadDataCategory.index;
+		if(fileData != null)
+			map['FileData'] = fileData;
+		if(fileBase64String != null)
+			map['FileBase64String'] = fileBase64String;
+		if(fileName != null)
+			map['FileName'] = fileName;
 		return map;
 	}
 }
 
-class UploadFilePartInfo extends StorageFileInfo{
-	String? uploadId;
-	String? partNumber;
-	List<int>? fileContent;
-	String? fileOffset;
-
-	UploadFilePartInfo({
-		this.uploadId,
-		this.partNumber,
-		this.fileContent,
-		this.fileOffset,
-		String? signature,
-		String? fileToken,
-		int nextAppendPosition = 0,
-		UploadFileType fileType = UploadFileType.Unknown,
-	}) : super(
-			signature: signature,
-			fileToken: fileToken,
-			nextAppendPosition: nextAppendPosition,
-			fileType: fileType,
-		);
-
-	factory UploadFilePartInfo.fromJson(Map<String, dynamic> map) {
-		final fileContentData = map['FileContent'];
-		return UploadFilePartInfo( 
-			uploadId: map['UploadId'],
-			partNumber: map['PartNumber'],
-			fileContent: fileContentData != null ? (fileContentData as List).map((e) => e as int).toList(): null,
-			fileOffset: map['FileOffset'],
-			signature: map['Signature'],
-			fileToken: map['FileToken'],
-			nextAppendPosition: map['NextAppendPosition'],
-			fileType: UploadFileType.values.firstWhere((e) => e.index == map['FileType']),
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(uploadId != null)
-			map['UploadId'] = uploadId;
-		if(partNumber != null)
-			map['PartNumber'] = partNumber;
-		if(fileContent != null)
-			map['FileContent'] = fileContent;
-		if(fileOffset != null)
-			map['FileOffset'] = fileOffset;
-		return map;
-	}
-}
-
-