Browse Source

接口更新 同步更新

melon.yin 3 years ago
parent
commit
f6c163e82d

+ 12 - 0
lib/rpc.dart

@@ -52,12 +52,24 @@ class JsonRpcProxy {
 	ClientLogService get clientLog =>
 	findService(() => new ClientLogService(currentHostAddress));
 
+	DepartmentService get department =>
+	findService(() => new DepartmentService(currentHostAddress));
+
 	DeviceService get device =>
 	findService(() => new DeviceService(currentHostAddress));
 
+	FrontAuthorityGroupsService get frontAuthorityGroups =>
+	findService(() => new FrontAuthorityGroupsService(currentHostAddress));
+
+	IdentityApplyService get identityApply =>
+	findService(() => new IdentityApplyService(currentHostAddress));
+
 	LoginService get login =>
 	findService(() => new LoginService(currentHostAddress));
 
+	ManagementService get management =>
+	findService(() => new ManagementService(currentHostAddress));
+
 	RemedicalService get remedical =>
 	findService(() => new RemedicalService(currentHostAddress));
 

+ 64 - 0
lib/services/department.dart

@@ -0,0 +1,64 @@
+import 'dart:core';
+
+import 'package:fis_jsonrpc/client_base.dart';
+import 'package:fis_common/json_convert.dart';
+
+import 'department.m.dart';
+
+class DepartmentService extends JsonRpcClientBase {
+	DepartmentService(
+		String host, {
+		String serviceName = "IDepartmentService",
+		Map<String, String>? headers,
+		int? timeout,
+	}) : super(
+						host,
+						serviceName,
+						headers: headers,
+						timeout: timeout,
+				) {
+		/// 注册响应实体反序列化处理器
+		FJsonConvert.setDecoder((map) => DepartmentInfo.fromJson(map));
+		FJsonConvert.setDecoder((map) => PageCollection<DepartmentInfo>.fromJson(map));
+	}
+
+	Future<String> insertDepartmentAsync(DepartmentInfo adminDO,String extensionData) async {
+		var rpcRst = await call("InsertDepartmentAsync", [adminDO,extensionData]);
+		return rpcRst;
+	}
+
+	Future<DepartmentInfo> findDepartmentByNameAsync(String name) async {
+		var rpcRst = await call("FindDepartmentByNameAsync", name);
+		var result = DepartmentInfo.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<DepartmentInfo> findDepartmentByCodeAsync(String code) async {
+		var rpcRst = await call("FindDepartmentByCodeAsync", code);
+		var result = DepartmentInfo.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<PageCollection<DepartmentInfo>> findDepartmentPagesAsync(PageRequest request) async {
+		var rpcRst = await call("FindDepartmentPagesAsync", request);
+		var result = PageCollection<DepartmentInfo>.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<bool> deleteDepartmentByIdAsync(String id) async {
+		var rpcRst = await call("DeleteDepartmentByIdAsync", id);
+		return rpcRst;
+	}
+
+	Future<bool> updateDepartmentByIdAsync(String id,DepartmentInfo data) async {
+		var rpcRst = await call("UpdateDepartmentByIdAsync", [id,data]);
+		return rpcRst;
+	}
+
+	Future<bool> updateDepartmentByCodeAsync(String code,DepartmentInfo data) async {
+		var rpcRst = await call("UpdateDepartmentByCodeAsync", [code,data]);
+		return rpcRst;
+	}
+
+}
+

+ 110 - 0
lib/services/department.m.dart

@@ -0,0 +1,110 @@
+import 'package:fis_common/json_convert.dart';
+
+class DepartmentInfo {
+	String? departmentCode;
+	String? departmentName;
+	String? organizationCode;
+
+	DepartmentInfo({
+		this.departmentCode,
+		this.departmentName,
+		this.organizationCode,
+	});
+
+	factory DepartmentInfo.fromJson(Map<String, dynamic> map) {
+		return DepartmentInfo( 
+			departmentCode: map['DepartmentCode'],
+			departmentName: map['DepartmentName'],
+			organizationCode: map['OrganizationCode'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(departmentCode != null)
+			map['DepartmentCode'] = departmentCode;
+		if(departmentName != null)
+			map['DepartmentName'] = departmentName;
+		if(organizationCode != null)
+			map['OrganizationCode'] = organizationCode;
+		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 PageRequest {
+	int currentPage;
+	int pageSize;
+	Map<String,String>? filter;
+	bool isFuzzy;
+	String? sessionId;
+
+	PageRequest({
+		this.currentPage=0,
+		this.pageSize=0,
+		this.filter,
+		this.isFuzzy=false,
+		this.sessionId,
+	});
+
+	factory PageRequest.fromJson(Map<String, dynamic> map) {
+		return PageRequest( 
+			currentPage: map['CurrentPage'],
+			pageSize: map['PageSize'],
+			filter: map['Filter'].cast<String,String>(),
+			isFuzzy: map['IsFuzzy'],
+			sessionId: map['SessionId'],
+		);
+	}
+
+	Map<String, dynamic> 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;
+	}
+}
+
+

+ 4 - 9
lib/services/device.m.dart

@@ -11,10 +11,8 @@ class DeviceInfo {
 	String? sDKSoftwareVersion;
 	String? organizationCode;
 	String? shortCode;
-	String? id;
 	DateTime? createTime;
 	DateTime? updateTime;
-	bool isDelete;
 
 	DeviceInfo({
 		this.deviceCode,
@@ -27,10 +25,8 @@ class DeviceInfo {
 		this.sDKSoftwareVersion,
 		this.organizationCode,
 		this.shortCode,
-		this.id,
 		this.createTime,
 		this.updateTime,
-		this.isDelete=false,
 	});
 
 	factory DeviceInfo.fromJson(Map<String, dynamic> map) {
@@ -45,10 +41,8 @@ class DeviceInfo {
 			sDKSoftwareVersion: map['SDKSoftwareVersion'],
 			organizationCode: map['OrganizationCode'],
 			shortCode: map['ShortCode'],
-			id: map['Id'],
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-			isDelete: map['IsDelete'],
 		);
 	}
 
@@ -74,13 +68,10 @@ class DeviceInfo {
 			map['OrganizationCode'] = organizationCode;
 		if(shortCode != null)
 			map['ShortCode'] = shortCode;
-		if(id != null)
-			map['Id'] = id;
 		if(createTime != null)
 			map['CreateTime'] = createTime;
 		if(updateTime != null)
 			map['UpdateTime'] = updateTime;
-		map['IsDelete'] = isDelete;
 		return map;
 	}
 }
@@ -153,12 +144,14 @@ class PageRequest {
 	int currentPage;
 	int pageSize;
 	Map<String,String>? filter;
+	bool isFuzzy;
 	String? sessionId;
 
 	PageRequest({
 		this.currentPage=0,
 		this.pageSize=0,
 		this.filter,
+		this.isFuzzy=false,
 		this.sessionId,
 	});
 
@@ -167,6 +160,7 @@ class PageRequest {
 			currentPage: map['CurrentPage'],
 			pageSize: map['PageSize'],
 			filter: map['Filter'].cast<String,String>(),
+			isFuzzy: map['IsFuzzy'],
 			sessionId: map['SessionId'],
 		);
 	}
@@ -177,6 +171,7 @@ class PageRequest {
 		map['PageSize'] = pageSize;
 		if(filter != null)
 			map['Filter'] = filter;
+		map['IsFuzzy'] = isFuzzy;
 		if(sessionId != null)
 			map['SessionId'] = sessionId;
 		return map;

+ 31 - 0
lib/services/frontAuthorityGroups.dart

@@ -0,0 +1,31 @@
+import 'dart:core';
+
+import 'package:fis_jsonrpc/client_base.dart';
+import 'package:fis_common/json_convert.dart';
+
+import 'frontAuthorityGroups.m.dart';
+
+class FrontAuthorityGroupsService extends JsonRpcClientBase {
+	FrontAuthorityGroupsService(
+		String host, {
+		String serviceName = "IFrontAuthorityGroupsService",
+		Map<String, String>? headers,
+		int? timeout,
+	}) : super(
+						host,
+						serviceName,
+						headers: headers,
+						timeout: timeout,
+				) {
+		/// 注册响应实体反序列化处理器
+		FJsonConvert.setDecoder((map) => FrontAuthorityGroupInfo.fromJson(map));
+	}
+
+	Future<List<FrontAuthorityGroupInfo>> getNeedToDisplayAuthorityGroups(String sessionId) async {
+		var rpcRst = await call("GetNeedToDisplayAuthorityGroups", sessionId);
+		var result = (rpcRst as List).map((e)=>FrontAuthorityGroupInfo.fromJson(e as Map<String, dynamic>)).toList();
+		return result;
+	}
+
+}
+

+ 41 - 0
lib/services/frontAuthorityGroups.m.dart

@@ -0,0 +1,41 @@
+class FrontAuthorityGroupInfo {
+	String? frontGroupCode;
+	String? description;
+	List<String>? adminCodes;
+	List<String>? features;
+	bool isShow;
+
+	FrontAuthorityGroupInfo({
+		this.frontGroupCode,
+		this.description,
+		this.adminCodes,
+		this.features,
+		this.isShow=false,
+	});
+
+	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(),
+			isShow: map['IsShow'],
+		);
+	}
+
+	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;
+		map['IsShow'] = isShow;
+		return map;
+	}
+}
+
+

+ 36 - 0
lib/services/identityApply.dart

@@ -0,0 +1,36 @@
+import 'dart:core';
+
+import 'package:fis_jsonrpc/client_base.dart';
+import 'package:fis_common/json_convert.dart';
+
+import 'identityApply.m.dart';
+
+class IdentityApplyService extends JsonRpcClientBase {
+	IdentityApplyService(
+		String host, {
+		String serviceName = "IIdentityApplyService",
+		Map<String, String>? headers,
+		int? timeout,
+	}) : super(
+						host,
+						serviceName,
+						headers: headers,
+						timeout: timeout,
+				) {
+		/// 注册响应实体反序列化处理器
+		FJsonConvert.setDecoder((map) => IdentityApplyInfo.fromJson(map));
+	}
+
+	Future<List<IdentityApplyInfo>> getIdentityApplys(String sessionId,String userCode) async {
+		var rpcRst = await call("GetIdentityApplys", [sessionId,userCode]);
+		var result = (rpcRst as List).map((e)=>IdentityApplyInfo.fromJson(e as Map<String, dynamic>)).toList();
+		return result;
+	}
+
+	Future<bool> applyFor(String sessionId,IdentityApplyInfo info,String extensionData) async {
+		var rpcRst = await call("ApplyFor", [sessionId,info,extensionData]);
+		return rpcRst;
+	}
+
+}
+

+ 79 - 0
lib/services/identityApply.m.dart

@@ -0,0 +1,79 @@
+enum ApplyStateEnum {
+	Applying,
+	Refused,
+	Passed,
+}
+
+class IdentityApplyInfo {
+	String? identityApplyCode;
+	String? userCode;
+	String? realName;
+	String? emailAddress;
+	String? organizationCode;
+	String? departmentCode;
+	String? applyPosition;
+	List<String>? identityCard;
+	List<String>? licenseCard;
+	ApplyStateEnum applyState;
+	String? applyNote;
+
+	IdentityApplyInfo({
+		this.identityApplyCode,
+		this.userCode,
+		this.realName,
+		this.emailAddress,
+		this.organizationCode,
+		this.departmentCode,
+		this.applyPosition,
+		this.identityCard,
+		this.licenseCard,
+		this.applyState=ApplyStateEnum.Applying,
+		this.applyNote,
+	});
+
+	factory IdentityApplyInfo.fromJson(Map<String, dynamic> map) {
+		final identityCardData = map['IdentityCard'];
+		final licenseCardData = map['LicenseCard'];
+		return IdentityApplyInfo( 
+			identityApplyCode: map['IdentityApplyCode'],
+			userCode: map['UserCode'],
+			realName: map['RealName'],
+			emailAddress: map['EmailAddress'],
+			organizationCode: map['OrganizationCode'],
+			departmentCode: map['DepartmentCode'],
+			applyPosition: map['ApplyPosition'],
+			identityCard: identityCardData != null ? (identityCardData as List).map((e) => e as String).toList(): const [],
+			licenseCard: licenseCardData != null ? (licenseCardData as List).map((e) => e as String).toList(): const [],
+			applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
+			applyNote: map['ApplyNote'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(identityApplyCode != null)
+			map['IdentityApplyCode'] = identityApplyCode;
+		if(userCode != null)
+			map['UserCode'] = userCode;
+		if(realName != null)
+			map['RealName'] = realName;
+		if(emailAddress != null)
+			map['EmailAddress'] = emailAddress;
+		if(organizationCode != null)
+			map['OrganizationCode'] = organizationCode;
+		if(departmentCode != null)
+			map['DepartmentCode'] = departmentCode;
+		if(applyPosition != null)
+			map['ApplyPosition'] = applyPosition;
+		if(identityCard != null)
+			map['IdentityCard'] = identityCard;
+		if(licenseCard != null)
+			map['LicenseCard'] = licenseCard;
+		map['ApplyState'] = applyState.index;
+		if(applyNote != null)
+			map['ApplyNote'] = applyNote;
+		return map;
+	}
+}
+
+

+ 4 - 0
lib/services/index.dart

@@ -1,6 +1,10 @@
 export 'clientLog.dart';
+export 'department.dart';
 export 'device.dart';
+export 'frontAuthorityGroups.dart';
+export 'identityApply.dart';
 export 'login.dart';
+export 'management.dart';
 export 'platform.dart';
 export 'remedical.dart';
 export 'user.dart';

+ 28 - 2
lib/services/login.dart

@@ -27,8 +27,24 @@ class LoginService extends JsonRpcClientBase {
 		return result;
 	}
 
-	Future<bool> signInAsync(UserInfo userInfo) async {
-		var rpcRst = await call("SignInAsync", userInfo);
+	Future<UserSessionInfo> commonLoginAsync(String anyAccount,String anyCode,String password) async {
+		var rpcRst = await call("CommonLoginAsync", [anyAccount,anyCode,password]);
+		var result = UserSessionInfo.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<int> checkLoginType(String anyAccount) async {
+		var rpcRst = await call("CheckLoginType", anyAccount);
+		return rpcRst;
+	}
+
+	Future<bool> commonSignUpAsync(String anyAccount,String anyCode,String password) async {
+		var rpcRst = await call("CommonSignUpAsync", [anyAccount,anyCode,password]);
+		return rpcRst;
+	}
+
+	Future<bool> signUpAsync(UserInfo userInfo) async {
+		var rpcRst = await call("SignUpAsync", userInfo);
 		return rpcRst;
 	}
 
@@ -52,5 +68,15 @@ class LoginService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
+	Future<bool> retrievePasswordByPhone(String phone,String verifyCode,String newPassword) async {
+		var rpcRst = await call("RetrievePasswordByPhone", [phone,verifyCode,newPassword]);
+		return rpcRst;
+	}
+
+	Future<bool> retrievePasswordByEmail(String mail,String verifyCode,String newPassword) async {
+		var rpcRst = await call("RetrievePasswordByEmail", [mail,verifyCode,newPassword]);
+		return rpcRst;
+	}
+
 }
 

+ 37 - 14
lib/services/login.m.dart

@@ -32,16 +32,25 @@ class UserSessionInfo {
 enum EnumLoginProcessorType {
 	Official,
 	Wechat,
+	Phone,
+	Email,
+	Unregistered,
 }
 
 class LoginProcessorInfo {
 	String? userName;
 	String? password;
+	String? phone;
+	String? email;
+	String? verifyCode;
 	String? wechatToken;
 
 	LoginProcessorInfo({
 		this.userName,
 		this.password,
+		this.phone,
+		this.email,
+		this.verifyCode,
 		this.wechatToken,
 	});
 
@@ -49,6 +58,9 @@ class LoginProcessorInfo {
 		return LoginProcessorInfo( 
 			userName: map['UserName'],
 			password: map['Password'],
+			phone: map['Phone'],
+			email: map['Email'],
+			verifyCode: map['VerifyCode'],
 			wechatToken: map['WechatToken'],
 		);
 	}
@@ -59,6 +71,12 @@ class LoginProcessorInfo {
 			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;
@@ -131,10 +149,14 @@ class UserLoginInfo {
 	}
 }
 
+enum UserInfoStateEnum {
+	Nonactivated,
+	Activated,
+}
+
 class UserInfo {
 	String? userCode;
 	String? userName;
-	String? secretPassword;
 	String? phone;
 	String? email;
 	String? nickName;
@@ -145,15 +167,15 @@ class UserInfo {
 	List<String>? bindDevices;
 	int score;
 	String? lastIP;
-	String? id;
+	UserInfoStateEnum userState;
+	String? securityQuestion;
+	String? securityAnswers;
 	DateTime? createTime;
 	DateTime? updateTime;
-	bool isDelete;
 
 	UserInfo({
 		this.userCode,
 		this.userName,
-		this.secretPassword,
 		this.phone,
 		this.email,
 		this.nickName,
@@ -164,17 +186,17 @@ class UserInfo {
 		this.bindDevices,
 		this.score=0,
 		this.lastIP,
-		this.id,
+		this.userState=UserInfoStateEnum.Nonactivated,
+		this.securityQuestion,
+		this.securityAnswers,
 		this.createTime,
 		this.updateTime,
-		this.isDelete=false,
 	});
 
 	factory UserInfo.fromJson(Map<String, dynamic> map) {
 		return UserInfo( 
 			userCode: map['UserCode'],
 			userName: map['UserName'],
-			secretPassword: map['SecretPassword'],
 			phone: map['Phone'],
 			email: map['Email'],
 			nickName: map['NickName'],
@@ -185,10 +207,11 @@ class UserInfo {
 			bindDevices: map['BindDevices'].cast<String>().toList(),
 			score: map['Score'],
 			lastIP: map['LastIP'],
-			id: map['Id'],
+			userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
+			securityQuestion: map['SecurityQuestion'],
+			securityAnswers: map['SecurityAnswers'],
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-			isDelete: map['IsDelete'],
 		);
 	}
 
@@ -198,8 +221,6 @@ class UserInfo {
 			map['UserCode'] = userCode;
 		if(userName != null)
 			map['UserName'] = userName;
-		if(secretPassword != null)
-			map['SecretPassword'] = secretPassword;
 		if(phone != null)
 			map['Phone'] = phone;
 		if(email != null)
@@ -219,13 +240,15 @@ class UserInfo {
 		map['Score'] = score;
 		if(lastIP != null)
 			map['LastIP'] = lastIP;
-		if(id != null)
-			map['Id'] = id;
+		map['UserState'] = userState.index;
+		if(securityQuestion != null)
+			map['SecurityQuestion'] = securityQuestion;
+		if(securityAnswers != null)
+			map['SecurityAnswers'] = securityAnswers;
 		if(createTime != null)
 			map['CreateTime'] = createTime;
 		if(updateTime != null)
 			map['UpdateTime'] = updateTime;
-		map['IsDelete'] = isDelete;
 		return map;
 	}
 }

+ 257 - 0
lib/services/management.dart

@@ -0,0 +1,257 @@
+import 'dart:core';
+
+import 'package:fis_jsonrpc/client_base.dart';
+import 'package:fis_common/json_convert.dart';
+
+import 'management.m.dart';
+
+class ManagementService extends JsonRpcClientBase {
+	ManagementService(
+		String host, {
+		String serviceName = "IManagementService",
+		Map<String, String>? headers,
+		int? timeout,
+	}) : super(
+						host,
+						serviceName,
+						headers: headers,
+						timeout: timeout,
+				) {
+		/// 注册响应实体反序列化处理器
+		FJsonConvert.setDecoder((map) => PageCollection<AdminAccountInfo>.fromJson(map));
+		FJsonConvert.setDecoder((map) => AdminAccountInfo.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));
+		FJsonConvert.setDecoder((map) => RecordInfo.fromJson(map));
+		FJsonConvert.setDecoder((map) => PageCollection<DeviceData>.fromJson(map));
+		FJsonConvert.setDecoder((map) => DeviceData.fromJson(map));
+		FJsonConvert.setDecoder((map) => PageCollection<PatientInfo>.fromJson(map));
+		FJsonConvert.setDecoder((map) => PatientInfo.fromJson(map));
+		FJsonConvert.setDecoder((map) => PageCollection<MenuInfo>.fromJson(map));
+		FJsonConvert.setDecoder((map) => MenuInfo.fromJson(map));
+	}
+
+	Future<String> adminLogin(String adminName,String passwd) async {
+		var rpcRst = await call("AdminLogin", [adminName,passwd]);
+		return rpcRst;
+	}
+
+	Future<bool> modifyAdminAccountAsync(String sessionId,String adminCode,AdminAccountInfo adminAccountInfo) async {
+		var rpcRst = await call("ModifyAdminAccountAsync", [sessionId,adminCode,adminAccountInfo]);
+		return rpcRst;
+	}
+
+	Future<bool> createAdminAccountAsync(String sessionId,AdminAccountInfo adminAccountInfo,String extensionData) async {
+		var rpcRst = await call("CreateAdminAccountAsync", [sessionId,adminAccountInfo,extensionData]);
+		return rpcRst;
+	}
+
+	Future<PageCollection<AdminAccountInfo>> getAdminAccountPagesAsync(String sessionId,String keyword,int page,int limit) async {
+		var rpcRst = await call("GetAdminAccountPagesAsync", [sessionId,keyword,page,limit]);
+		var result = PageCollection<AdminAccountInfo>.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<bool> removeAdminAccountAsync(String sessionId,String adminCode) async {
+		var rpcRst = await call("RemoveAdminAccountAsync", [sessionId,adminCode]);
+		return rpcRst;
+	}
+
+	Future<AdminAccountInfo> findAdminAccountByCodeAsync(String sessionId,String adminCode) async {
+		var rpcRst = await call("FindAdminAccountByCodeAsync", [sessionId,adminCode]);
+		var result = AdminAccountInfo.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<bool> modifyUserAccountAsync(String sessionId,String userCode,UserInfo userInfo) async {
+		var rpcRst = await call("ModifyUserAccountAsync", [sessionId,userCode,userInfo]);
+		return rpcRst;
+	}
+
+	Future<bool> createUserAccountAsync(String sessionId,UserInfo userInfo,String extensionData) async {
+		var rpcRst = await call("CreateUserAccountAsync", [sessionId,userInfo,extensionData]);
+		return rpcRst;
+	}
+
+	Future<PageCollection<UserInfo>> getUserAccountPagesAsync(String sessionId,String keyword,int page,int limit) async {
+		var rpcRst = await call("GetUserAccountPagesAsync", [sessionId,keyword,page,limit]);
+		var result = PageCollection<UserInfo>.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<bool> removeUserAccountAsync(String sessionId,String userCode) async {
+		var rpcRst = await call("RemoveUserAccountAsync", [sessionId,userCode]);
+		return rpcRst;
+	}
+
+	Future<UserInfo> findUserAccountByCodeAsync(String sessionId,String userCode) async {
+		var rpcRst = await call("FindUserAccountByCodeAsync", [sessionId,userCode]);
+		var result = UserInfo.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<bool> modifyReportAsync(String sessionId,String reportCode,ReportInfo reportInfo) async {
+		var rpcRst = await call("ModifyReportAsync", [sessionId,reportCode,reportInfo]);
+		return rpcRst;
+	}
+
+	Future<bool> createReportAsync(String sessionId,ReportInfo reportInfo,String extensionData) async {
+		var rpcRst = await call("CreateReportAsync", [sessionId,reportInfo,extensionData]);
+		return rpcRst;
+	}
+
+	Future<PageCollection<ReportInfo>> getReportPagesAsync(String sessionId,String keyword,int page,int limit) async {
+		var rpcRst = await call("GetReportPagesAsync", [sessionId,keyword,page,limit]);
+		var result = PageCollection<ReportInfo>.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<bool> removeReportAsync(String sessionId,String reportCode) async {
+		var rpcRst = await call("RemoveReportAsync", [sessionId,reportCode]);
+		return rpcRst;
+	}
+
+	Future<ReportInfo> findReportByCodeAsync(String sessionId,String reportCode) async {
+		var rpcRst = await call("FindReportByCodeAsync", [sessionId,reportCode]);
+		var result = ReportInfo.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<bool> modifyRecordAsync(String sessionId,String recordCode,RecordInfo recordInfo) async {
+		var rpcRst = await call("ModifyRecordAsync", [sessionId,recordCode,recordInfo]);
+		return rpcRst;
+	}
+
+	Future<bool> createRecordAsync(String sessionId,RecordInfo recordInfo,String extensionData) async {
+		var rpcRst = await call("CreateRecordAsync", [sessionId,recordInfo,extensionData]);
+		return rpcRst;
+	}
+
+	Future<PageCollection<RecordInfo>> getRecordPagesAsync(String sessionId,String keyword,int page,int limit) async {
+		var rpcRst = await call("GetRecordPagesAsync", [sessionId,keyword,page,limit]);
+		var result = PageCollection<RecordInfo>.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<bool> removeRecordAsync(String sessionId,String recordCode) async {
+		var rpcRst = await call("RemoveRecordAsync", [sessionId,recordCode]);
+		return rpcRst;
+	}
+
+	Future<RecordInfo> findRecordByCodeAsync(String sessionId,String recordCode) async {
+		var rpcRst = await call("FindRecordByCodeAsync", [sessionId,recordCode]);
+		var result = RecordInfo.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<bool> modifyDeviceDataAsync(String sessionId,String deviceDataCode,DeviceData deviceData) async {
+		var rpcRst = await call("ModifyDeviceDataAsync", [sessionId,deviceDataCode,deviceData]);
+		return rpcRst;
+	}
+
+	Future<bool> createDeviceDataAsync(String sessionId,DeviceData deviceData,String extensionData) async {
+		var rpcRst = await call("CreateDeviceDataAsync", [sessionId,deviceData,extensionData]);
+		return rpcRst;
+	}
+
+	Future<PageCollection<DeviceData>> getDeviceDataPagesAsync(String sessionId,String keyword,int page,int limit) async {
+		var rpcRst = await call("GetDeviceDataPagesAsync", [sessionId,keyword,page,limit]);
+		var result = PageCollection<DeviceData>.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<bool> removeDeviceDataAsync(String sessionId,String deviceDataCode) async {
+		var rpcRst = await call("RemoveDeviceDataAsync", [sessionId,deviceDataCode]);
+		return rpcRst;
+	}
+
+	Future<DeviceData> findDeviceDataByCodeAsync(String sessionId,String deviceDataCode) async {
+		var rpcRst = await call("FindDeviceDataByCodeAsync", [sessionId,deviceDataCode]);
+		var result = DeviceData.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<bool> modifyPatientAsync(String sessionId,String patientCode,PatientInfo patientInfo) async {
+		var rpcRst = await call("ModifyPatientAsync", [sessionId,patientCode,patientInfo]);
+		return rpcRst;
+	}
+
+	Future<bool> createPatientAsync(String sessionId,PatientInfo patientInfo,String extensionData) async {
+		var rpcRst = await call("CreatePatientAsync", [sessionId,patientInfo,extensionData]);
+		return rpcRst;
+	}
+
+	Future<PageCollection<PatientInfo>> getPatientPagesAsync(String sessionId,String keyword,int page,int limit) async {
+		var rpcRst = await call("GetPatientPagesAsync", [sessionId,keyword,page,limit]);
+		var result = PageCollection<PatientInfo>.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<bool> removePatientAsync(String sessionId,String patientCode) async {
+		var rpcRst = await call("RemovePatientAsync", [sessionId,patientCode]);
+		return rpcRst;
+	}
+
+	Future<PatientInfo> findPatientByCodeAsync(String sessionId,String patientCode) async {
+		var rpcRst = await call("FindPatientByCodeAsync", [sessionId,patientCode]);
+		var result = PatientInfo.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<bool> modifyMenuAsync(String sessionId,String menuCode,MenuInfo menuInfo) async {
+		var rpcRst = await call("ModifyMenuAsync", [sessionId,menuCode,menuInfo]);
+		return rpcRst;
+	}
+
+	Future<bool> createMenuAsync(String sessionId,MenuInfo menuInfo,String extensionData) async {
+		var rpcRst = await call("CreateMenuAsync", [sessionId,menuInfo,extensionData]);
+		return rpcRst;
+	}
+
+	Future<PageCollection<MenuInfo>> getMenuPagesAsync(String sessionId,String keyword,int page,int limit) async {
+		var rpcRst = await call("GetMenuPagesAsync", [sessionId,keyword,page,limit]);
+		var result = PageCollection<MenuInfo>.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<bool> removeMenuAsync(String sessionId,String menuCode) async {
+		var rpcRst = await call("RemoveMenuAsync", [sessionId,menuCode]);
+		return rpcRst;
+	}
+
+	Future<MenuInfo> findMenuByCodeAsync(String sessionId,String menuCode) async {
+		var rpcRst = await call("FindMenuByCodeAsync", [sessionId,menuCode]);
+		var result = MenuInfo.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<bool> confirm(String sessionId,String identityApplyCode) async {
+		var rpcRst = await call("Confirm", [sessionId,identityApplyCode]);
+		return rpcRst;
+	}
+
+	Future<bool> reject(String sessionId,String identityApplyCode) async {
+		var rpcRst = await call("Reject", [sessionId,identityApplyCode]);
+		return rpcRst;
+	}
+
+	Future<bool> addFrontAuthorityGroups(String sessionId,FrontAuthorityGroupInfo frontAuthorityGroupInfo,String extensionData) async {
+		var rpcRst = await call("AddFrontAuthorityGroups", [sessionId,frontAuthorityGroupInfo,extensionData]);
+		return rpcRst;
+	}
+
+	Future<bool> deleteFrontAuthorityGroups(String sessionId,String frontAuthorityGroupCode) async {
+		var rpcRst = await call("DeleteFrontAuthorityGroups", [sessionId,frontAuthorityGroupCode]);
+		return rpcRst;
+	}
+
+	Future<bool> updateFrontAuthorityGroups(String sessionId,String frontAuthorityGroupCode,FrontAuthorityGroupInfo frontAuthorityGroupInfo,String extensionData) async {
+		var rpcRst = await call("UpdateFrontAuthorityGroups", [sessionId,frontAuthorityGroupCode,frontAuthorityGroupInfo,extensionData]);
+		return rpcRst;
+	}
+
+}
+

+ 585 - 0
lib/services/management.m.dart

@@ -0,0 +1,585 @@
+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,
+}
+
+class UserInfo {
+	String? userCode;
+	String? userName;
+	String? phone;
+	String? email;
+	String? nickName;
+	String? fullName;
+	String? headImageToken;
+	String? organizationCode;
+	List<String>? authorityGroups;
+	List<String>? bindDevices;
+	int score;
+	String? lastIP;
+	UserInfoStateEnum userState;
+	String? securityQuestion;
+	String? securityAnswers;
+	DateTime? createTime;
+	DateTime? updateTime;
+
+	UserInfo({
+		this.userCode,
+		this.userName,
+		this.phone,
+		this.email,
+		this.nickName,
+		this.fullName,
+		this.headImageToken,
+		this.organizationCode,
+		this.authorityGroups,
+		this.bindDevices,
+		this.score=0,
+		this.lastIP,
+		this.userState=UserInfoStateEnum.Nonactivated,
+		this.securityQuestion,
+		this.securityAnswers,
+		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'],
+			headImageToken: map['HeadImageToken'],
+			organizationCode: map['OrganizationCode'],
+			authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
+			bindDevices: map['BindDevices'].cast<String>().toList(),
+			score: map['Score'],
+			lastIP: map['LastIP'],
+			userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
+			securityQuestion: map['SecurityQuestion'],
+			securityAnswers: map['SecurityAnswers'],
+			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(headImageToken != null)
+			map['HeadImageToken'] = headImageToken;
+		if(organizationCode != null)
+			map['OrganizationCode'] = organizationCode;
+		if(authorityGroups != null)
+			map['AuthorityGroups'] = authorityGroups;
+		if(bindDevices != null)
+			map['BindDevices'] = bindDevices;
+		map['Score'] = score;
+		if(lastIP != null)
+			map['LastIP'] = lastIP;
+		map['UserState'] = userState.index;
+		if(securityQuestion != null)
+			map['SecurityQuestion'] = securityQuestion;
+		if(securityAnswers != null)
+			map['SecurityAnswers'] = securityAnswers;
+		if(createTime != null)
+			map['CreateTime'] = createTime;
+		if(updateTime != null)
+			map['UpdateTime'] = updateTime;
+		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'] = createTime;
+		if(updateTime != null)
+			map['UpdateTime'] = 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'] = createTime;
+		if(updateTime != null)
+			map['UpdateTime'] = 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'] = 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'] = createTime;
+		if(updateTime != null)
+			map['UpdateTime'] = 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;
+	bool isShow;
+
+	FrontAuthorityGroupInfo({
+		this.frontGroupCode,
+		this.description,
+		this.adminCodes,
+		this.features,
+		this.isShow=false,
+	});
+
+	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(),
+			isShow: map['IsShow'],
+		);
+	}
+
+	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;
+		map['IsShow'] = isShow;
+		return map;
+	}
+}
+
+

+ 0 - 6
lib/services/remedical.dart

@@ -51,12 +51,6 @@ class RemedicalService extends JsonRpcClientBase {
 		return result;
 	}
 
-	Future<List<DeviceData>> getDeviceDataListAsync(GetDeviceDataListRequest request) async {
-		var rpcRst = await call("GetDeviceDataListAsync", request);
-		var result = (rpcRst as List).map((e)=>DeviceData.fromJson(e as Map<String, dynamic>)).toList();
-		return result;
-	}
-
 	Future<PageCollection<RecordInfo>> getRecordInfoPageAsync(PageRequest request) async {
 		var rpcRst = await call("GetRecordInfoPageAsync", request);
 		var result = PageCollection<RecordInfo>.fromJson(rpcRst as Map<String, dynamic>);

+ 4 - 53
lib/services/remedical.m.dart

@@ -19,10 +19,8 @@ class PatientInfo {
 	String? patientCaseHistory;
 	String? patientPhone;
 	PatientTypeEnum patientType;
-	String? id;
 	DateTime? createTime;
 	DateTime? updateTime;
-	bool isDelete;
 
 	PatientInfo({
 		this.patientCode,
@@ -34,10 +32,8 @@ class PatientInfo {
 		this.patientCaseHistory,
 		this.patientPhone,
 		this.patientType=PatientTypeEnum.Default,
-		this.id,
 		this.createTime,
 		this.updateTime,
-		this.isDelete=false,
 	});
 
 	factory PatientInfo.fromJson(Map<String, dynamic> map) {
@@ -51,10 +47,8 @@ class PatientInfo {
 			patientCaseHistory: map['PatientCaseHistory'],
 			patientPhone: map['PatientPhone'],
 			patientType: PatientTypeEnum.values.firstWhere((e) => e.index == map['PatientType']),
-			id: map['Id'],
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-			isDelete: map['IsDelete'],
 		);
 	}
 
@@ -76,13 +70,10 @@ class PatientInfo {
 		if(patientPhone != null)
 			map['PatientPhone'] = patientPhone;
 		map['PatientType'] = patientType.index;
-		if(id != null)
-			map['Id'] = id;
 		if(createTime != null)
 			map['CreateTime'] = createTime;
 		if(updateTime != null)
 			map['UpdateTime'] = updateTime;
-		map['IsDelete'] = isDelete;
 		return map;
 	}
 }
@@ -127,10 +118,8 @@ class DeviceData {
 	String? dataToken;
 	DeviceDataTypeEnum deviceDataType;
 	String? processResult;
-	String? id;
 	DateTime? createTime;
 	DateTime? updateTime;
-	bool isDelete;
 
 	DeviceData({
 		this.deviceDataCode,
@@ -142,10 +131,8 @@ class DeviceData {
 		this.dataToken,
 		this.deviceDataType=DeviceDataTypeEnum.Default,
 		this.processResult,
-		this.id,
 		this.createTime,
 		this.updateTime,
-		this.isDelete=false,
 	});
 
 	factory DeviceData.fromJson(Map<String, dynamic> map) {
@@ -159,10 +146,8 @@ class DeviceData {
 			dataToken: map['DataToken'],
 			deviceDataType: DeviceDataTypeEnum.values.firstWhere((e) => e.index == map['DeviceDataType']),
 			processResult: map['ProcessResult'],
-			id: map['Id'],
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-			isDelete: map['IsDelete'],
 		);
 	}
 
@@ -185,13 +170,10 @@ class DeviceData {
 		map['DeviceDataType'] = deviceDataType.index;
 		if(processResult != null)
 			map['ProcessResult'] = processResult;
-		if(id != null)
-			map['Id'] = id;
 		if(createTime != null)
 			map['CreateTime'] = createTime;
 		if(updateTime != null)
 			map['UpdateTime'] = updateTime;
-		map['IsDelete'] = isDelete;
 		return map;
 	}
 }
@@ -246,10 +228,8 @@ class RecordInfo {
 	RecordStatusEnum recordStatus;
 	String? recordRemark;
 	String? tags;
-	String? id;
 	DateTime? createTime;
 	DateTime? updateTime;
-	bool isDelete;
 
 	RecordInfo({
 		this.recordCode,
@@ -262,10 +242,8 @@ class RecordInfo {
 		this.recordStatus=RecordStatusEnum.Default,
 		this.recordRemark,
 		this.tags,
-		this.id,
 		this.createTime,
 		this.updateTime,
-		this.isDelete=false,
 	});
 
 	factory RecordInfo.fromJson(Map<String, dynamic> map) {
@@ -280,10 +258,8 @@ class RecordInfo {
 			recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
 			recordRemark: map['RecordRemark'],
 			tags: map['Tags'],
-			id: map['Id'],
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-			isDelete: map['IsDelete'],
 		);
 	}
 
@@ -306,13 +282,10 @@ class RecordInfo {
 			map['RecordRemark'] = recordRemark;
 		if(tags != null)
 			map['Tags'] = tags;
-		if(id != null)
-			map['Id'] = id;
 		if(createTime != null)
 			map['CreateTime'] = createTime;
 		if(updateTime != null)
 			map['UpdateTime'] = updateTime;
-		map['IsDelete'] = isDelete;
 		return map;
 	}
 }
@@ -395,32 +368,6 @@ class GetRecordInfoDetailRequest {
 	}
 }
 
-class GetDeviceDataListRequest {
-	String? recordCode;
-	String? sessionId;
-
-	GetDeviceDataListRequest({
-		this.recordCode,
-		this.sessionId,
-	});
-
-	factory GetDeviceDataListRequest.fromJson(Map<String, dynamic> map) {
-		return GetDeviceDataListRequest( 
-			recordCode: map['RecordCode'],
-			sessionId: map['SessionId'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(recordCode != null)
-			map['RecordCode'] = recordCode;
-		if(sessionId != null)
-			map['SessionId'] = sessionId;
-		return map;
-	}
-}
-
 class PageCollection<T> {
 	int currentPage;
 	int pageSize;
@@ -463,12 +410,14 @@ class PageRequest {
 	int currentPage;
 	int pageSize;
 	Map<String,String>? filter;
+	bool isFuzzy;
 	String? sessionId;
 
 	PageRequest({
 		this.currentPage=0,
 		this.pageSize=0,
 		this.filter,
+		this.isFuzzy=false,
 		this.sessionId,
 	});
 
@@ -477,6 +426,7 @@ class PageRequest {
 			currentPage: map['CurrentPage'],
 			pageSize: map['PageSize'],
 			filter: map['Filter'].cast<String,String>(),
+			isFuzzy: map['IsFuzzy'],
 			sessionId: map['SessionId'],
 		);
 	}
@@ -487,6 +437,7 @@ class PageRequest {
 		map['PageSize'] = pageSize;
 		if(filter != null)
 			map['Filter'] = filter;
+		map['IsFuzzy'] = isFuzzy;
 		if(sessionId != null)
 			map['SessionId'] = sessionId;
 		return map;

+ 7 - 2
lib/services/user.dart

@@ -21,11 +21,16 @@ class UserService extends JsonRpcClientBase {
 		FJsonConvert.setDecoder((map) => UserInfo.fromJson(map));
 	}
 
-	Future<UserInfo> getUserInfoAsync(String userCode,String sessionId) async {
-		var rpcRst = await call("GetUserInfoAsync", [userCode,sessionId]);
+	Future<UserInfo> getUserInfoAsync(String sessionId) async {
+		var rpcRst = await call("GetUserInfoAsync", sessionId);
 		var result = UserInfo.fromJson(rpcRst as Map<String, dynamic>);
 		return result;
 	}
 
+	Future<bool> alterUserInfoAsync(String sessionId,UserInfo userInfo) async {
+		var rpcRst = await call("AlterUserInfoAsync", [sessionId,userInfo]);
+		return rpcRst;
+	}
+
 }
 

+ 19 - 14
lib/services/user.m.dart

@@ -1,7 +1,11 @@
+enum UserInfoStateEnum {
+	Nonactivated,
+	Activated,
+}
+
 class UserInfo {
 	String? userCode;
 	String? userName;
-	String? secretPassword;
 	String? phone;
 	String? email;
 	String? nickName;
@@ -12,15 +16,15 @@ class UserInfo {
 	List<String>? bindDevices;
 	int score;
 	String? lastIP;
-	String? id;
+	UserInfoStateEnum userState;
+	String? securityQuestion;
+	String? securityAnswers;
 	DateTime? createTime;
 	DateTime? updateTime;
-	bool isDelete;
 
 	UserInfo({
 		this.userCode,
 		this.userName,
-		this.secretPassword,
 		this.phone,
 		this.email,
 		this.nickName,
@@ -31,17 +35,17 @@ class UserInfo {
 		this.bindDevices,
 		this.score=0,
 		this.lastIP,
-		this.id,
+		this.userState=UserInfoStateEnum.Nonactivated,
+		this.securityQuestion,
+		this.securityAnswers,
 		this.createTime,
 		this.updateTime,
-		this.isDelete=false,
 	});
 
 	factory UserInfo.fromJson(Map<String, dynamic> map) {
 		return UserInfo( 
 			userCode: map['UserCode'],
 			userName: map['UserName'],
-			secretPassword: map['SecretPassword'],
 			phone: map['Phone'],
 			email: map['Email'],
 			nickName: map['NickName'],
@@ -52,10 +56,11 @@ class UserInfo {
 			bindDevices: map['BindDevices'].cast<String>().toList(),
 			score: map['Score'],
 			lastIP: map['LastIP'],
-			id: map['Id'],
+			userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
+			securityQuestion: map['SecurityQuestion'],
+			securityAnswers: map['SecurityAnswers'],
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-			isDelete: map['IsDelete'],
 		);
 	}
 
@@ -65,8 +70,6 @@ class UserInfo {
 			map['UserCode'] = userCode;
 		if(userName != null)
 			map['UserName'] = userName;
-		if(secretPassword != null)
-			map['SecretPassword'] = secretPassword;
 		if(phone != null)
 			map['Phone'] = phone;
 		if(email != null)
@@ -86,13 +89,15 @@ class UserInfo {
 		map['Score'] = score;
 		if(lastIP != null)
 			map['LastIP'] = lastIP;
-		if(id != null)
-			map['Id'] = id;
+		map['UserState'] = userState.index;
+		if(securityQuestion != null)
+			map['SecurityQuestion'] = securityQuestion;
+		if(securityAnswers != null)
+			map['SecurityAnswers'] = securityAnswers;
 		if(createTime != null)
 			map['CreateTime'] = createTime;
 		if(updateTime != null)
 			map['UpdateTime'] = updateTime;
-		map['IsDelete'] = isDelete;
 		return map;
 	}
 }