Forráskód Böngészése

upgrade: remove duplicated class

melon.yin 3 éve
szülő
commit
ec0791b33d
39 módosított fájl, 386 hozzáadás és 2425 törlés
  1. 1 0
      lib/services/authentication.dart
  2. 0 1
      lib/services/authentication.m.dart
  3. 0 22
      lib/services/checkSession.dart
  4. 1 0
      lib/services/clientLog.dart
  5. 0 45
      lib/services/config.dart
  6. 0 66
      lib/services/config.m.dart
  7. 0 64
      lib/services/department.dart
  8. 0 110
      lib/services/department.m.dart
  9. 1 0
      lib/services/device.dart
  10. 322 306
      lib/services/device.m.dart
  11. 0 24
      lib/services/email.dart
  12. 0 31
      lib/services/frontAuthorityGroups.dart
  13. 0 41
      lib/services/frontAuthorityGroups.m.dart
  14. 3 0
      lib/services/identityApply.dart
  15. 1 65
      lib/services/identityApply.m.dart
  16. 1 0
      lib/services/login.dart
  17. 2 3
      lib/services/login.m.dart
  18. 0 273
      lib/services/management.dart
  19. 0 650
      lib/services/management.m.dart
  20. 1 0
      lib/services/organization.dart
  21. 5 69
      lib/services/organization.m.dart
  22. 1 0
      lib/services/position.dart
  23. 8 72
      lib/services/position.m.dart
  24. 1 0
      lib/services/rank.dart
  25. 6 70
      lib/services/rank.m.dart
  26. 1 0
      lib/services/region.dart
  27. 1 28
      lib/services/region.m.dart
  28. 3 0
      lib/services/remedical.dart
  29. 2 99
      lib/services/remedical.m.dart
  30. 1 0
      lib/services/role.dart
  31. 1 65
      lib/services/role.m.dart
  32. 0 28
      lib/services/sMS.dart
  33. 0 38
      lib/services/serverLog.dart
  34. 0 35
      lib/services/session.dart
  35. 0 87
      lib/services/session.m.dart
  36. 1 0
      lib/services/storage.dart
  37. 0 42
      lib/services/storage.m.dart
  38. 1 0
      lib/services/user.dart
  39. 21 91
      lib/services/user.m.dart

+ 1 - 0
lib/services/authentication.dart

@@ -5,6 +5,7 @@ import 'package:fis_common/json_convert.dart';
 
 import 'authentication.m.dart';
 
+
 class AuthenticationService extends JsonRpcClientBase {
 	AuthenticationService(
 		String host, {

+ 0 - 1
lib/services/authentication.m.dart

@@ -57,4 +57,3 @@ enum UploadFileType {
 }
 
 
-

+ 0 - 22
lib/services/checkSession.dart

@@ -1,22 +0,0 @@
-import 'dart:core';
-
-import 'package:fis_jsonrpc/client_base.dart';
-
-class CheckSessionService extends JsonRpcClientBase {
-  CheckSessionService(
-    String host, {
-    String serviceName = "ICheckSessionService",
-    Map<String, String>? headers,
-    int? timeout,
-  }) : super(
-          host,
-          serviceName,
-          headers: headers,
-          timeout: timeout,
-        );
-
-  Future<bool> checkSessionIdAsync(String sessionId) async {
-    var rpcRst = await call("CheckSessionIdAsync", sessionId);
-    return rpcRst;
-  }
-}

+ 1 - 0
lib/services/clientLog.dart

@@ -3,6 +3,7 @@ import 'dart:core';
 import 'package:fis_jsonrpc/client_base.dart';
 
 
+
 class ClientLogService extends JsonRpcClientBase {
 	ClientLogService(
 		String host, {

+ 0 - 45
lib/services/config.dart

@@ -1,45 +0,0 @@
-import 'dart:core';
-
-import 'package:fis_jsonrpc/client_base.dart';
-import 'package:fis_common/json_convert.dart';
-
-import 'config.m.dart';
-
-class ConfigService extends JsonRpcClientBase {
-  ConfigService(
-    String host, {
-    String serviceName = "IConfigService",
-    Map<String, String>? headers,
-    int? timeout,
-  }) : super(
-          host,
-          serviceName,
-          headers: headers,
-          timeout: timeout,
-        ) {
-    /// 注册响应实体反序列化处理器
-    FJsonConvert.setDecoder((map) => ConfigItem.fromJson(map));
-  }
-
-  Future<List<ConfigItem>> getConfigListAsync(PageParams pageParams) async {
-    var rpcRst = await call("GetConfigListAsync", pageParams);
-    var result = (rpcRst as List)
-        .map((e) => ConfigItem.fromJson(e as Map<String, dynamic>))
-        .toList();
-    return result;
-  }
-
-  Future<String> getConfigAsync(String service, String section,
-      String settingNode, String defaultValue) async {
-    var rpcRst = await call(
-        "GetConfigAsync", [service, section, settingNode, defaultValue]);
-    return rpcRst;
-  }
-
-  Future<bool> setConfigAsync(String service, String section,
-      String settingNode, String settingValue) async {
-    var rpcRst = await call(
-        "SetConfigAsync", [service, section, settingNode, settingValue]);
-    return rpcRst;
-  }
-}

+ 0 - 66
lib/services/config.m.dart

@@ -1,66 +0,0 @@
-class ConfigItem {
-	String? id;
-	String? service;
-	String? section;
-	String? settingNode;
-	String? settingValue;
-
-	ConfigItem({
-		this.id,
-		this.service,
-		this.section,
-		this.settingNode,
-		this.settingValue,
-	});
-
-	factory ConfigItem.fromJson(Map<String, dynamic> map) {
-		return ConfigItem( 
-			id: map['Id'],
-			service: map['Service'],
-			section: map['Section'],
-			settingNode: map['SettingNode'],
-			settingValue: map['SettingValue'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(id != null)
-			map['Id'] = id;
-		if(service != null)
-			map['Service'] = service;
-		if(section != null)
-			map['Section'] = section;
-		if(settingNode != null)
-			map['SettingNode'] = settingNode;
-		if(settingValue != null)
-			map['SettingValue'] = settingValue;
-		return map;
-	}
-}
-
-class PageParams {
-	int currentPage;
-	int pageSize;
-
-	PageParams({
-		this.currentPage=0,
-		this.pageSize=0,
-	});
-
-	factory PageParams.fromJson(Map<String, dynamic> map) {
-		return PageParams( 
-			currentPage: map['CurrentPage'],
-			pageSize: map['PageSize'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		map['CurrentPage'] = currentPage;
-		map['PageSize'] = pageSize;
-		return map;
-	}
-}
-
-

+ 0 - 64
lib/services/department.dart

@@ -1,64 +0,0 @@
-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;
-	}
-
-}
-

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

@@ -1,110 +0,0 @@
-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;
-	}
-}
-
-

+ 1 - 0
lib/services/device.dart

@@ -5,6 +5,7 @@ import 'package:fis_common/json_convert.dart';
 
 import 'device.m.dart';
 
+
 class DeviceService extends JsonRpcClientBase {
 	DeviceService(
 		String host, {

+ 322 - 306
lib/services/device.m.dart

@@ -3,330 +3,346 @@ import 'package:fis_jsonrpc/utils.dart';
 import 'package:fis_common/json_convert.dart';
 
 class BaseDTO {
-  DateTime? createTime;
-  DateTime? updateTime;
-
-  BaseDTO({
-    this.createTime,
-    this.updateTime,
-  });
-
-  factory BaseDTO.fromJson(Map<String, dynamic> map) {
-    return BaseDTO(
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    if (createTime != null)
-      map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
-    if (updateTime != null)
-      map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
-    return map;
-  }
+	DateTime? createTime;
+	DateTime? updateTime;
+
+	BaseDTO({
+		this.createTime,
+		this.updateTime,
+	});
+
+	factory BaseDTO.fromJson(Map<String, dynamic> map) {
+		return BaseDTO( 
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(createTime != null)
+			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
+		if(updateTime != null)
+			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
+		return map;
+	}
 }
 
-class DeviceInfoDTO extends BaseDTO {
-  String? deviceCode;
-  String? serialNumber;
-  String? name;
-  String? description;
-  String? deviceModel;
-  String? deviceType;
-  String? headPicUrl;
-  String? deviceSoftwareVersion;
-  String? sDKSoftwareVersion;
-  String? organizationCode;
-  String? shortCode;
-
-  DeviceInfoDTO({
-    this.deviceCode,
-    this.serialNumber,
-    this.name,
-    this.description,
-    this.deviceModel,
-    this.deviceType,
-    this.headPicUrl,
-    this.deviceSoftwareVersion,
-    this.sDKSoftwareVersion,
-    this.organizationCode,
-    this.shortCode,
-    DateTime? createTime,
-    DateTime? updateTime,
-  }) : super(
-          createTime: createTime,
-          updateTime: updateTime,
-        );
-
-  factory DeviceInfoDTO.fromJson(Map<String, dynamic> map) {
-    return DeviceInfoDTO(
-      deviceCode: map['DeviceCode'],
-      serialNumber: map['SerialNumber'],
-      name: map['Name'],
-      description: map['Description'],
-      deviceModel: map['DeviceModel'],
-      deviceType: map['DeviceType'],
-      headPicUrl: map['HeadPicUrl'],
-      deviceSoftwareVersion: map['DeviceSoftwareVersion'],
-      sDKSoftwareVersion: map['SDKSoftwareVersion'],
-      organizationCode: map['OrganizationCode'],
-      shortCode: map['ShortCode'],
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (deviceCode != null) map['DeviceCode'] = deviceCode;
-    if (serialNumber != null) map['SerialNumber'] = serialNumber;
-    if (name != null) map['Name'] = name;
-    if (description != null) map['Description'] = description;
-    if (deviceModel != null) map['DeviceModel'] = deviceModel;
-    if (deviceType != null) map['DeviceType'] = deviceType;
-    if (headPicUrl != null) map['HeadPicUrl'] = headPicUrl;
-    if (deviceSoftwareVersion != null)
-      map['DeviceSoftwareVersion'] = deviceSoftwareVersion;
-    if (sDKSoftwareVersion != null)
-      map['SDKSoftwareVersion'] = sDKSoftwareVersion;
-    if (organizationCode != null) map['OrganizationCode'] = organizationCode;
-    if (shortCode != null) map['ShortCode'] = shortCode;
-    return map;
-  }
+class DeviceInfoDTO extends BaseDTO{
+	String? deviceCode;
+	String? serialNumber;
+	String? name;
+	String? description;
+	String? deviceModel;
+	String? deviceType;
+	String? headPicUrl;
+	String? deviceSoftwareVersion;
+	String? sDKSoftwareVersion;
+	String? organizationCode;
+	String? shortCode;
+
+	DeviceInfoDTO({
+		this.deviceCode,
+		this.serialNumber,
+		this.name,
+		this.description,
+		this.deviceModel,
+		this.deviceType,
+		this.headPicUrl,
+		this.deviceSoftwareVersion,
+		this.sDKSoftwareVersion,
+		this.organizationCode,
+		this.shortCode,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory DeviceInfoDTO.fromJson(Map<String, dynamic> map) {
+		return DeviceInfoDTO( 
+			deviceCode: map['DeviceCode'],
+			serialNumber: map['SerialNumber'],
+			name: map['Name'],
+			description: map['Description'],
+			deviceModel: map['DeviceModel'],
+			deviceType: map['DeviceType'],
+			headPicUrl: map['HeadPicUrl'],
+			deviceSoftwareVersion: map['DeviceSoftwareVersion'],
+			sDKSoftwareVersion: map['SDKSoftwareVersion'],
+			organizationCode: map['OrganizationCode'],
+			shortCode: map['ShortCode'],
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(deviceCode != null)
+			map['DeviceCode'] = deviceCode;
+		if(serialNumber != null)
+			map['SerialNumber'] = serialNumber;
+		if(name != null)
+			map['Name'] = name;
+		if(description != null)
+			map['Description'] = description;
+		if(deviceModel != null)
+			map['DeviceModel'] = deviceModel;
+		if(deviceType != null)
+			map['DeviceType'] = deviceType;
+		if(headPicUrl != null)
+			map['HeadPicUrl'] = headPicUrl;
+		if(deviceSoftwareVersion != null)
+			map['DeviceSoftwareVersion'] = deviceSoftwareVersion;
+		if(sDKSoftwareVersion != null)
+			map['SDKSoftwareVersion'] = sDKSoftwareVersion;
+		if(organizationCode != null)
+			map['OrganizationCode'] = organizationCode;
+		if(shortCode != null)
+			map['ShortCode'] = shortCode;
+		return map;
+	}
 }
 
-class CreateDeviceRequest extends DeviceInfoDTO {
-  String? token;
-
-  CreateDeviceRequest({
-    this.token,
-    String? deviceCode,
-    String? serialNumber,
-    String? name,
-    String? description,
-    String? deviceModel,
-    String? deviceType,
-    String? headPicUrl,
-    String? deviceSoftwareVersion,
-    String? sDKSoftwareVersion,
-    String? organizationCode,
-    String? shortCode,
-    DateTime? createTime,
-    DateTime? updateTime,
-  }) : super(
-          deviceCode: deviceCode,
-          serialNumber: serialNumber,
-          name: name,
-          description: description,
-          deviceModel: deviceModel,
-          deviceType: deviceType,
-          headPicUrl: headPicUrl,
-          deviceSoftwareVersion: deviceSoftwareVersion,
-          sDKSoftwareVersion: sDKSoftwareVersion,
-          organizationCode: organizationCode,
-          shortCode: shortCode,
-          createTime: createTime,
-          updateTime: updateTime,
-        );
-
-  factory CreateDeviceRequest.fromJson(Map<String, dynamic> map) {
-    return CreateDeviceRequest(
-      token: map['Token'],
-      deviceCode: map['DeviceCode'],
-      serialNumber: map['SerialNumber'],
-      name: map['Name'],
-      description: map['Description'],
-      deviceModel: map['DeviceModel'],
-      deviceType: map['DeviceType'],
-      headPicUrl: map['HeadPicUrl'],
-      deviceSoftwareVersion: map['DeviceSoftwareVersion'],
-      sDKSoftwareVersion: map['SDKSoftwareVersion'],
-      organizationCode: map['OrganizationCode'],
-      shortCode: map['ShortCode'],
-      createTime:
-          map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-      updateTime:
-          map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (token != null) map['Token'] = token;
-    return map;
-  }
+class CreateDeviceRequest extends DeviceInfoDTO{
+	String? token;
+
+	CreateDeviceRequest({
+		this.token,
+		String? deviceCode,
+		String? serialNumber,
+		String? name,
+		String? description,
+		String? deviceModel,
+		String? deviceType,
+		String? headPicUrl,
+		String? deviceSoftwareVersion,
+		String? sDKSoftwareVersion,
+		String? organizationCode,
+		String? shortCode,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			deviceCode: deviceCode,
+			serialNumber: serialNumber,
+			name: name,
+			description: description,
+			deviceModel: deviceModel,
+			deviceType: deviceType,
+			headPicUrl: headPicUrl,
+			deviceSoftwareVersion: deviceSoftwareVersion,
+			sDKSoftwareVersion: sDKSoftwareVersion,
+			organizationCode: organizationCode,
+			shortCode: shortCode,
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory CreateDeviceRequest.fromJson(Map<String, dynamic> map) {
+		return CreateDeviceRequest( 
+			token: map['Token'],
+			deviceCode: map['DeviceCode'],
+			serialNumber: map['SerialNumber'],
+			name: map['Name'],
+			description: map['Description'],
+			deviceModel: map['DeviceModel'],
+			deviceType: map['DeviceType'],
+			headPicUrl: map['HeadPicUrl'],
+			deviceSoftwareVersion: map['DeviceSoftwareVersion'],
+			sDKSoftwareVersion: map['SDKSoftwareVersion'],
+			organizationCode: map['OrganizationCode'],
+			shortCode: map['ShortCode'],
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(token != null)
+			map['Token'] = token;
+		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 extends TokenRequest {
-  int currentPage;
-  int pageSize;
-  Map<String, String>? filter;
-  bool isFuzzy;
-
-  PageRequest({
-    this.currentPage = 0,
-    this.pageSize = 0,
-    this.filter,
-    this.isFuzzy = false,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory PageRequest.fromJson(Map<String, dynamic> map) {
-    return PageRequest(
-      currentPage: map['CurrentPage'],
-      pageSize: map['PageSize'],
-      filter: map['Filter'].cast<String, String>(),
-      isFuzzy: map['IsFuzzy'],
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    map['CurrentPage'] = currentPage;
-    map['PageSize'] = pageSize;
-    if (filter != null) map['Filter'] = filter;
-    map['IsFuzzy'] = isFuzzy;
-    return map;
-  }
+	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 BaseRequest {
-  BaseRequest();
-
-  factory BaseRequest.fromJson(Map<String, dynamic> map) {
-    return BaseRequest();
-  }
+	String? token;
+
+	BaseRequest({
+		this.token,
+	});
+
+	factory BaseRequest.fromJson(Map<String, dynamic> map) {
+		return BaseRequest( 
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(token != null)
+			map['Token'] = token;
+		return map;
+	}
+}
 
-  Map<String, dynamic> toJson() {
-    final map = Map<String, dynamic>();
-    return map;
-  }
+class PageRequest extends BaseRequest{
+	int currentPage;
+	int pageSize;
+	Map<String,String>? filter;
+	bool isFuzzy;
+
+	PageRequest({
+		this.currentPage = 0,
+		this.pageSize = 0,
+		this.filter,
+		this.isFuzzy = false,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory PageRequest.fromJson(Map<String, dynamic> map) {
+		return PageRequest( 
+			currentPage: map['CurrentPage'],
+			pageSize: map['PageSize'],
+			filter: map['Filter'] != null ? map['Filter'].cast<String,String>() : null,
+			isFuzzy: map['IsFuzzy'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		map['CurrentPage'] = currentPage;
+		map['PageSize'] = pageSize;
+		if(filter != null)
+			map['Filter'] = filter;
+		map['IsFuzzy'] = isFuzzy;
+		return map;
+	}
 }
 
-class TokenRequest extends BaseRequest {
-  String? token;
+class TokenRequest extends BaseRequest{
 
-  TokenRequest({
-    this.token,
-  }) : super();
+	TokenRequest({
+		String? token,
+	}) : super(
+			token: token,
+		);
 
-  factory TokenRequest.fromJson(Map<String, dynamic> map) {
-    return TokenRequest(
-      token: map['Token'],
-    );
-  }
+	factory TokenRequest.fromJson(Map<String, dynamic> map) {
+		return TokenRequest( 
+			token: map['Token'],
+		);
+	}
 
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (token != null) map['Token'] = token;
-    return map;
-  }
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		return map;
+	}
 }
 
-class CreateShareDeviceToUserRequest extends TokenRequest {
-  List<String>? userCodes;
-  String? deviceCode;
-
-  CreateShareDeviceToUserRequest({
-    this.userCodes,
-    this.deviceCode,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory CreateShareDeviceToUserRequest.fromJson(Map<String, dynamic> map) {
-    final userCodesData = map['UserCodes'];
-    return CreateShareDeviceToUserRequest(
-      userCodes: userCodesData != null
-          ? (userCodesData as List).map((e) => e as String).toList()
-          : null,
-      deviceCode: map['DeviceCode'],
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (userCodes != null) map['UserCodes'] = userCodes;
-    if (deviceCode != null) map['DeviceCode'] = deviceCode;
-    return map;
-  }
+class CreateShareDeviceToUserRequest extends TokenRequest{
+	List<String>? userCodes;
+	String? deviceCode;
+
+	CreateShareDeviceToUserRequest({
+		this.userCodes,
+		this.deviceCode,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory CreateShareDeviceToUserRequest.fromJson(Map<String, dynamic> map) {
+		final userCodesData = map['UserCodes'];
+		return CreateShareDeviceToUserRequest( 
+			userCodes: userCodesData != null ? (userCodesData as List).map((e) => e as String).toList(): null,
+			deviceCode: map['DeviceCode'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(userCodes != null)
+			map['UserCodes'] = userCodes;
+		if(deviceCode != null)
+			map['DeviceCode'] = deviceCode;
+		return map;
+	}
 }
 
-class DeleteShareDeviceToUserRequest extends TokenRequest {
-  List<String>? userCodes;
-  String? deviceCode;
-
-  DeleteShareDeviceToUserRequest({
-    this.userCodes,
-    this.deviceCode,
-    String? token,
-  }) : super(
-          token: token,
-        );
-
-  factory DeleteShareDeviceToUserRequest.fromJson(Map<String, dynamic> map) {
-    final userCodesData = map['UserCodes'];
-    return DeleteShareDeviceToUserRequest(
-      userCodes: userCodesData != null
-          ? (userCodesData as List).map((e) => e as String).toList()
-          : null,
-      deviceCode: map['DeviceCode'],
-      token: map['Token'],
-    );
-  }
-
-  Map<String, dynamic> toJson() {
-    final map = super.toJson();
-    if (userCodes != null) map['UserCodes'] = userCodes;
-    if (deviceCode != null) map['DeviceCode'] = deviceCode;
-    return map;
-  }
+class DeleteShareDeviceToUserRequest extends TokenRequest{
+	List<String>? userCodes;
+	String? deviceCode;
+
+	DeleteShareDeviceToUserRequest({
+		this.userCodes,
+		this.deviceCode,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory DeleteShareDeviceToUserRequest.fromJson(Map<String, dynamic> map) {
+		final userCodesData = map['UserCodes'];
+		return DeleteShareDeviceToUserRequest( 
+			userCodes: userCodesData != null ? (userCodesData as List).map((e) => e as String).toList(): null,
+			deviceCode: map['DeviceCode'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(userCodes != null)
+			map['UserCodes'] = userCodes;
+		if(deviceCode != null)
+			map['DeviceCode'] = deviceCode;
+		return map;
+	}
 }
+
+

+ 0 - 24
lib/services/email.dart

@@ -1,24 +0,0 @@
-import 'dart:core';
-
-import '../client_base.dart';
-
-class EmailService extends JsonRpcClientBase {
-  EmailService(
-    String host, {
-    String serviceName = "IEmailService",
-    Map<String, String>? headers,
-    int? timeout,
-  }) : super(
-          host,
-          serviceName,
-          headers: headers,
-          timeout: timeout,
-        );
-
-  Future<bool> sendEmailAsync(List<String> receivers, String templateName,
-      List<String> templateArg) async {
-    var rpcRst =
-        await call("SendEmailAsync", [receivers, templateName, templateArg]);
-    return rpcRst;
-  }
-}

+ 0 - 31
lib/services/frontAuthorityGroups.dart

@@ -1,31 +0,0 @@
-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;
-	}
-
-}
-

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

@@ -1,41 +0,0 @@
-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;
-	}
-}
-
-

+ 3 - 0
lib/services/identityApply.dart

@@ -5,6 +5,9 @@ import 'package:fis_common/json_convert.dart';
 
 import 'identityApply.m.dart';
 
+import 'device.m.dart';
+
+
 class IdentityApplyService extends JsonRpcClientBase {
 	IdentityApplyService(
 		String host, {

+ 1 - 65
lib/services/identityApply.m.dart

@@ -1,30 +1,4 @@
-import 'package:fis_jsonrpc/utils.dart';
-
-class BaseDTO {
-	DateTime? createTime;
-	DateTime? updateTime;
-
-	BaseDTO({
-		this.createTime,
-		this.updateTime,
-	});
-
-	factory BaseDTO.fromJson(Map<String, dynamic> map) {
-		return BaseDTO( 
-			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(createTime != null)
-			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
-		if(updateTime != null)
-			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
-		return map;
-	}
-}
+import 'device.m.dart';
 
 class IdentityApplyDTO extends BaseDTO{
 	String? applyPosition;
@@ -116,43 +90,6 @@ class IdentityApplyStateDTO extends IdentityApplyDTO{
 	}
 }
 
-class BaseRequest {
-
-	BaseRequest();
-
-	factory BaseRequest.fromJson(Map<String, dynamic> map) {
-		return BaseRequest( 
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		return map;
-	}
-}
-
-class TokenRequest extends BaseRequest{
-	String? token;
-
-	TokenRequest({
-		this.token,
-	}) : super(
-		);
-
-	factory TokenRequest.fromJson(Map<String, dynamic> map) {
-		return TokenRequest( 
-			token: map['Token'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(token != null)
-			map['Token'] = token;
-		return map;
-	}
-}
-
 class GetLastIdentityApplyRequest extends TokenRequest{
 	String? applyPosition;
 
@@ -223,4 +160,3 @@ class ApplyForRequest extends IdentityApplyDTO{
 }
 
 
-

+ 1 - 0
lib/services/login.dart

@@ -5,6 +5,7 @@ import 'package:fis_common/json_convert.dart';
 
 import 'login.m.dart';
 
+
 class LoginService extends JsonRpcClientBase {
 	LoginService(
 		String host, {

+ 2 - 3
lib/services/login.m.dart

@@ -47,7 +47,7 @@ class CommonLoginRequest {
 			anyAccount: map['AnyAccount'],
 			anyCode: map['AnyCode'],
 			password: map['Password'],
-			headerMap: map['HeaderMap'].cast<String,String>(),
+			headerMap: map['HeaderMap'] != null ? map['HeaderMap'].cast<String,String>() : null,
 		);
 	}
 
@@ -104,7 +104,7 @@ class CommonSignUpRequest {
 			anyAccount: map['AnyAccount'],
 			anyCode: map['AnyCode'],
 			password: map['Password'],
-			headerMap: map['HeaderMap'].cast<String,String>(),
+			headerMap: map['HeaderMap'] != null ? map['HeaderMap'].cast<String,String>() : null,
 		);
 	}
 
@@ -300,4 +300,3 @@ class VerifyAccountRequest {
 }
 
 
-

+ 0 - 273
lib/services/management.dart

@@ -1,273 +0,0 @@
-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(UserInfoListQueryRequest queryRequest) async {
-		var rpcRst = await call("GetUserAccountPagesAsync", queryRequest);
-		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;
-	}
-
-	Future<AdminAccountInfo> getLoginInfoBySessionId(String sessionId) async {
-		var rpcRst = await call("GetLoginInfoBySessionId", sessionId);
-		var result = AdminAccountInfo.fromJson(rpcRst as Map<String, dynamic>);
-		return result;
-	}
-
-	Future<bool> adminLoginOut(String sessionId) async {
-		var rpcRst = await call("AdminLoginOut", sessionId);
-		return rpcRst;
-	}
-
-	Future<bool> modifyAdminPasswordAsync(String sessionId,String adminCode,String oldPassword,String newPassword) async {
-		var rpcRst = await call("ModifyAdminPasswordAsync", [sessionId,adminCode,oldPassword,newPassword]);
-		return rpcRst;
-	}
-
-}
-

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

@@ -1,650 +0,0 @@
-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;
-	}
-}
-
-

+ 1 - 0
lib/services/organization.dart

@@ -5,6 +5,7 @@ import 'package:fis_common/json_convert.dart';
 
 import 'organization.m.dart';
 
+
 class OrganizationService extends JsonRpcClientBase {
 	OrganizationService(
 		String host, {

+ 5 - 69
lib/services/organization.m.dart

@@ -1,30 +1,4 @@
-import 'package:fis_jsonrpc/utils.dart';
-
-class BaseDTO {
-	DateTime? createTime;
-	DateTime? updateTime;
-
-	BaseDTO({
-		this.createTime,
-		this.updateTime,
-	});
-
-	factory BaseDTO.fromJson(Map<String, dynamic> map) {
-		return BaseDTO( 
-			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(createTime != null)
-			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
-		if(updateTime != null)
-			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
-		return map;
-	}
-}
+import 'device.m.dart';
 
 class OrganizationBaseDTO extends BaseDTO{
 	String? organizationCode;
@@ -154,10 +128,10 @@ class OrganizationDTO extends OrganizationBasicDTO{
 			description: map['Description'],
 			rootCode: map['RootCode'],
 			organizationType: OrganizationTypeEnum.values.firstWhere((e) => e.index == map['OrganizationType']),
-			authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
+			authorityGroups: map['AuthorityGroups'] != null ? map['AuthorityGroups'].cast<String>().toList() : null,
 			nautica: map['Nautica'],
 			state: OrganizationStateEnum.values.firstWhere((e) => e.index == map['State']),
-			directors: map['Directors'].cast<String>().toList(),
+			directors: map['Directors'] != null ? map['Directors'].cast<String>().toList() : null,
 			regionCode: map['RegionCode'],
 			parentCode: map['ParentCode'],
 			logoUrl: map['LogoUrl'],
@@ -237,43 +211,6 @@ class GetOrganizationByCodeRequest {
 	}
 }
 
-class BaseRequest {
-
-	BaseRequest();
-
-	factory BaseRequest.fromJson(Map<String, dynamic> map) {
-		return BaseRequest( 
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		return map;
-	}
-}
-
-class TokenRequest extends BaseRequest{
-	String? token;
-
-	TokenRequest({
-		this.token,
-	}) : super(
-		);
-
-	factory TokenRequest.fromJson(Map<String, dynamic> map) {
-		return TokenRequest( 
-			token: map['Token'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(token != null)
-			map['Token'] = token;
-		return map;
-	}
-}
-
 class GetParentOrganizationListRequest extends TokenRequest{
 
 	GetParentOrganizationListRequest({
@@ -400,7 +337,7 @@ class AddOrganizationsRequest extends TokenRequest{
 
 	factory AddOrganizationsRequest.fromJson(Map<String, dynamic> map) {
 		return AddOrganizationsRequest( 
-			organizationInfos: map['OrganizationInfos'].map((e)=>OrganizationItemDTO.fromJson(e as Map<String,dynamic>)).toList(),
+			organizationInfos: map['OrganizationInfos'] != null ? map['OrganizationInfos'].map((e)=>OrganizationItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
 			token: map['Token'],
 		);
 	}
@@ -425,7 +362,7 @@ class RemoveOrganizationsRequest extends TokenRequest{
 
 	factory RemoveOrganizationsRequest.fromJson(Map<String, dynamic> map) {
 		return RemoveOrganizationsRequest( 
-			organizationCodes: map['OrganizationCodes'].cast<String>().toList(),
+			organizationCodes: map['OrganizationCodes'] != null ? map['OrganizationCodes'].cast<String>().toList() : null,
 			token: map['Token'],
 		);
 	}
@@ -439,4 +376,3 @@ class RemoveOrganizationsRequest extends TokenRequest{
 }
 
 
-

+ 1 - 0
lib/services/position.dart

@@ -5,6 +5,7 @@ import 'package:fis_common/json_convert.dart';
 
 import 'position.m.dart';
 
+
 class PositionService extends JsonRpcClientBase {
 	PositionService(
 		String host, {

+ 8 - 72
lib/services/position.m.dart

@@ -1,30 +1,4 @@
-import 'package:fis_jsonrpc/utils.dart';
-
-class BaseDTO {
-	DateTime? createTime;
-	DateTime? updateTime;
-
-	BaseDTO({
-		this.createTime,
-		this.updateTime,
-	});
-
-	factory BaseDTO.fromJson(Map<String, dynamic> map) {
-		return BaseDTO( 
-			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(createTime != null)
-			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
-		if(updateTime != null)
-			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
-		return map;
-	}
-}
+import 'device.m.dart';
 
 class PositionDTO extends BaseDTO{
 	String? positionCode;
@@ -49,7 +23,7 @@ class PositionDTO extends BaseDTO{
 			positionCode: map['PositionCode'],
 			positionName: map['PositionName'],
 			organizationCode: map['OrganizationCode'],
-			underUserCodes: map['UnderUserCodes'].cast<String>().toList(),
+			underUserCodes: map['UnderUserCodes'] != null ? map['UnderUserCodes'].cast<String>().toList() : null,
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
 		);
@@ -69,43 +43,6 @@ class PositionDTO extends BaseDTO{
 	}
 }
 
-class BaseRequest {
-
-	BaseRequest();
-
-	factory BaseRequest.fromJson(Map<String, dynamic> map) {
-		return BaseRequest( 
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		return map;
-	}
-}
-
-class TokenRequest extends BaseRequest{
-	String? token;
-
-	TokenRequest({
-		this.token,
-	}) : super(
-		);
-
-	factory TokenRequest.fromJson(Map<String, dynamic> map) {
-		return TokenRequest( 
-			token: map['Token'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(token != null)
-			map['Token'] = token;
-		return map;
-	}
-}
-
 class GetPositionsRequest extends TokenRequest{
 	List<String>? positionCodes;
 	List<String>? organizationCodes;
@@ -120,8 +57,8 @@ class GetPositionsRequest extends TokenRequest{
 
 	factory GetPositionsRequest.fromJson(Map<String, dynamic> map) {
 		return GetPositionsRequest( 
-			positionCodes: map['PositionCodes'].cast<String>().toList(),
-			organizationCodes: map['OrganizationCodes'].cast<String>().toList(),
+			positionCodes: map['PositionCodes'] != null ? map['PositionCodes'].cast<String>().toList() : null,
+			organizationCodes: map['OrganizationCodes'] != null ? map['OrganizationCodes'].cast<String>().toList() : null,
 			token: map['Token'],
 		);
 	}
@@ -153,7 +90,7 @@ class PositionItemDTO {
 		return PositionItemDTO( 
 			positionName: map['PositionName'],
 			organizationCode: map['OrganizationCode'],
-			underUserCodes: map['UnderUserCodes'].cast<String>().toList(),
+			underUserCodes: map['UnderUserCodes'] != null ? map['UnderUserCodes'].cast<String>().toList() : null,
 			extendsData: map['ExtendsData'],
 		);
 	}
@@ -184,7 +121,7 @@ class AddPositionsRequest {
 	factory AddPositionsRequest.fromJson(Map<String, dynamic> map) {
 		return AddPositionsRequest( 
 			token: map['Token'],
-			positions: map['Positions'].map((e)=>PositionItemDTO.fromJson(e as Map<String,dynamic>)).toList(),
+			positions: map['Positions'] != null ? map['Positions'].map((e)=>PositionItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
 		);
 	}
 
@@ -210,7 +147,7 @@ class UpdatePositionsRequest extends TokenRequest{
 
 	factory UpdatePositionsRequest.fromJson(Map<String, dynamic> map) {
 		return UpdatePositionsRequest( 
-			positions: map['Positions'].map((e)=>PositionItemDTO.fromJson(e as Map<String,dynamic>)).toList(),
+			positions: map['Positions'] != null ? map['Positions'].map((e)=>PositionItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
 			token: map['Token'],
 		);
 	}
@@ -235,7 +172,7 @@ class RemovePositionRequest extends TokenRequest{
 
 	factory RemovePositionRequest.fromJson(Map<String, dynamic> map) {
 		return RemovePositionRequest( 
-			positionCodes: map['PositionCodes'].cast<String>().toList(),
+			positionCodes: map['PositionCodes'] != null ? map['PositionCodes'].cast<String>().toList() : null,
 			token: map['Token'],
 		);
 	}
@@ -249,4 +186,3 @@ class RemovePositionRequest extends TokenRequest{
 }
 
 
-

+ 1 - 0
lib/services/rank.dart

@@ -5,6 +5,7 @@ import 'package:fis_common/json_convert.dart';
 
 import 'rank.m.dart';
 
+
 class RankService extends JsonRpcClientBase {
 	RankService(
 		String host, {

+ 6 - 70
lib/services/rank.m.dart

@@ -1,30 +1,4 @@
-import 'package:fis_jsonrpc/utils.dart';
-
-class BaseDTO {
-	DateTime? createTime;
-	DateTime? updateTime;
-
-	BaseDTO({
-		this.createTime,
-		this.updateTime,
-	});
-
-	factory BaseDTO.fromJson(Map<String, dynamic> map) {
-		return BaseDTO( 
-			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(createTime != null)
-			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
-		if(updateTime != null)
-			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
-		return map;
-	}
-}
+import 'device.m.dart';
 
 class RankDTO extends BaseDTO{
 	String? rankCode;
@@ -59,43 +33,6 @@ class RankDTO extends BaseDTO{
 	}
 }
 
-class BaseRequest {
-
-	BaseRequest();
-
-	factory BaseRequest.fromJson(Map<String, dynamic> map) {
-		return BaseRequest( 
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		return map;
-	}
-}
-
-class TokenRequest extends BaseRequest{
-	String? token;
-
-	TokenRequest({
-		this.token,
-	}) : super(
-		);
-
-	factory TokenRequest.fromJson(Map<String, dynamic> map) {
-		return TokenRequest( 
-			token: map['Token'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(token != null)
-			map['Token'] = token;
-		return map;
-	}
-}
-
 class GetRankByCodeRequest extends TokenRequest{
 	String? rankCode;
 
@@ -135,8 +72,8 @@ class GetRanksRequest extends TokenRequest{
 
 	factory GetRanksRequest.fromJson(Map<String, dynamic> map) {
 		return GetRanksRequest( 
-			rankCodes: map['RankCodes'].cast<String>().toList(),
-			organizationCodes: map['OrganizationCodes'].cast<String>().toList(),
+			rankCodes: map['RankCodes'] != null ? map['RankCodes'].cast<String>().toList() : null,
+			organizationCodes: map['OrganizationCodes'] != null ? map['OrganizationCodes'].cast<String>().toList() : null,
 			token: map['Token'],
 		);
 	}
@@ -194,7 +131,7 @@ class AddRanksRequest extends TokenRequest{
 
 	factory AddRanksRequest.fromJson(Map<String, dynamic> map) {
 		return AddRanksRequest( 
-			rankInfos: map['RankInfos'].map((e)=>RankItemDTO.fromJson(e as Map<String,dynamic>)).toList(),
+			rankInfos: map['RankInfos'] != null ? map['RankInfos'].map((e)=>RankItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
 			token: map['Token'],
 		);
 	}
@@ -219,7 +156,7 @@ class RemoveRanksRequest extends TokenRequest{
 
 	factory RemoveRanksRequest.fromJson(Map<String, dynamic> map) {
 		return RemoveRanksRequest( 
-			rankCodes: map['RankCodes'].cast<String>().toList(),
+			rankCodes: map['RankCodes'] != null ? map['RankCodes'].cast<String>().toList() : null,
 			token: map['Token'],
 		);
 	}
@@ -244,7 +181,7 @@ class UpdateRanksRequest extends TokenRequest{
 
 	factory UpdateRanksRequest.fromJson(Map<String, dynamic> map) {
 		return UpdateRanksRequest( 
-			ranks: map['Ranks'].map((e)=>RankItemDTO.fromJson(e as Map<String,dynamic>)).toList(),
+			ranks: map['Ranks'] != null ? map['Ranks'].map((e)=>RankItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
 			token: map['Token'],
 		);
 	}
@@ -258,4 +195,3 @@ class UpdateRanksRequest extends TokenRequest{
 }
 
 
-

+ 1 - 0
lib/services/region.dart

@@ -5,6 +5,7 @@ import 'package:fis_common/json_convert.dart';
 
 import 'region.m.dart';
 
+
 class RegionService extends JsonRpcClientBase {
 	RegionService(
 		String host, {

+ 1 - 28
lib/services/region.m.dart

@@ -1,30 +1,4 @@
-import 'package:fis_jsonrpc/utils.dart';
-
-class BaseDTO {
-	DateTime? createTime;
-	DateTime? updateTime;
-
-	BaseDTO({
-		this.createTime,
-		this.updateTime,
-	});
-
-	factory BaseDTO.fromJson(Map<String, dynamic> map) {
-		return BaseDTO( 
-			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(createTime != null)
-			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
-		if(updateTime != null)
-			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
-		return map;
-	}
-}
+import 'device.m.dart';
 
 class RegionDTO extends BaseDTO{
 	String? regionVersion;
@@ -91,4 +65,3 @@ class GetRegionsRequest {
 }
 
 
-

+ 3 - 0
lib/services/remedical.dart

@@ -5,6 +5,9 @@ import 'package:fis_common/json_convert.dart';
 
 import 'remedical.m.dart';
 
+import 'device.m.dart';
+
+
 class RemedicalService extends JsonRpcClientBase {
 	RemedicalService(
 		String host, {

+ 2 - 99
lib/services/remedical.m.dart

@@ -1,27 +1,6 @@
-import 'package:fis_jsonrpc/utils.dart';
-
-import 'package:fis_common/json_convert.dart';
-
-class BaseRequest {
-	String? token;
+import 'device.m.dart';
 
-	BaseRequest({
-		this.token,
-	});
-
-	factory BaseRequest.fromJson(Map<String, dynamic> map) {
-		return BaseRequest( 
-			token: map['Token'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(token != null)
-			map['Token'] = token;
-		return map;
-	}
-}
+import 'package:fis_jsonrpc/utils.dart';
 
 class BaseEntity {
 	DateTime? createTime;
@@ -403,81 +382,6 @@ class GetRecordInfoDetailRequest extends BaseRequest{
 	}
 }
 
-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 extends BaseRequest{
-	int currentPage;
-	int pageSize;
-	Map<String,String>? filter;
-	bool isFuzzy;
-
-	PageRequest({
-		this.currentPage = 0,
-		this.pageSize = 0,
-		this.filter,
-		this.isFuzzy = false,
-		String? token,
-	}) : super(
-			token: token,
-		);
-
-	factory PageRequest.fromJson(Map<String, dynamic> map) {
-		return PageRequest( 
-			currentPage: map['CurrentPage'],
-			pageSize: map['PageSize'],
-			filter: map['Filter'].cast<String,String>(),
-			isFuzzy: map['IsFuzzy'],
-			token: map['Token'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		map['CurrentPage'] = currentPage;
-		map['PageSize'] = pageSize;
-		if(filter != null)
-			map['Filter'] = filter;
-		map['IsFuzzy'] = isFuzzy;
-		return map;
-	}
-}
-
 class GetPatientInfoRequest extends BaseRequest{
 	String? patientCode;
 
@@ -504,4 +408,3 @@ class GetPatientInfoRequest extends BaseRequest{
 }
 
 
-

+ 1 - 0
lib/services/role.dart

@@ -5,6 +5,7 @@ import 'package:fis_common/json_convert.dart';
 
 import 'role.m.dart';
 
+
 class RoleService extends JsonRpcClientBase {
 	RoleService(
 		String host, {

+ 1 - 65
lib/services/role.m.dart

@@ -1,30 +1,4 @@
-import 'package:fis_jsonrpc/utils.dart';
-
-class BaseDTO {
-	DateTime? createTime;
-	DateTime? updateTime;
-
-	BaseDTO({
-		this.createTime,
-		this.updateTime,
-	});
-
-	factory BaseDTO.fromJson(Map<String, dynamic> map) {
-		return BaseDTO( 
-			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(createTime != null)
-			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
-		if(updateTime != null)
-			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
-		return map;
-	}
-}
+import 'device.m.dart';
 
 enum RoleShowTypeEnum {
 	NotShow,
@@ -99,43 +73,6 @@ class RoleDTO extends BaseDTO{
 	}
 }
 
-class BaseRequest {
-
-	BaseRequest();
-
-	factory BaseRequest.fromJson(Map<String, dynamic> map) {
-		return BaseRequest( 
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		return map;
-	}
-}
-
-class TokenRequest extends BaseRequest{
-	String? token;
-
-	TokenRequest({
-		this.token,
-	}) : super(
-		);
-
-	factory TokenRequest.fromJson(Map<String, dynamic> map) {
-		return TokenRequest( 
-			token: map['Token'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(token != null)
-			map['Token'] = token;
-		return map;
-	}
-}
-
 class GetRoleByCodeRequest extends TokenRequest{
 	String? roleCode;
 
@@ -212,4 +149,3 @@ class FindAuthenticationRolesRequest extends TokenRequest{
 }
 
 
-

+ 0 - 28
lib/services/sMS.dart

@@ -1,28 +0,0 @@
-import 'dart:core';
-
-import '../client_base.dart';
-
-class SMSService extends JsonRpcClientBase {
-  SMSService(
-    String host, {
-    String serviceName = "ISMSService",
-    Map<String, String>? headers,
-    int? timeout,
-  }) : super(
-          host,
-          serviceName,
-          headers: headers,
-          timeout: timeout,
-        );
-
-  Future<bool> sendMessage(List<String> mobiles, String template) async {
-    var rpcRst = await call("SendMessage", [mobiles, template]);
-    return rpcRst;
-  }
-
-  Future<bool> checkVerificationCode(
-      String userPhone, String verifyCode) async {
-    var rpcRst = await call("CheckVerificationCode", [userPhone, verifyCode]);
-    return rpcRst;
-  }
-}

+ 0 - 38
lib/services/serverLog.dart

@@ -1,38 +0,0 @@
-import 'dart:core';
-
-import '../client_base.dart';
-
-class ServerLogService extends JsonRpcClientBase {
-  ServerLogService(
-    String host, {
-    String serviceName = "IServerLogService",
-    Map<String, String>? headers,
-    int? timeout,
-  }) : super(
-          host,
-          serviceName,
-          headers: headers,
-          timeout: timeout,
-        );
-
-  Future<bool> writeInfoAsync(String serviceName, String module,
-      String requestChain, String logContent) async {
-    var rpcRst = await call(
-        "WriteInfoAsync", [serviceName, module, requestChain, logContent]);
-    return rpcRst;
-  }
-
-  Future<bool> writeWarnAsync(String serviceName, String module,
-      String requestChain, String logContent) async {
-    var rpcRst = await call(
-        "WriteWarnAsync", [serviceName, module, requestChain, logContent]);
-    return rpcRst;
-  }
-
-  Future<bool> writeErrorAsync(String serviceName, String module,
-      String requestChain, String logContent) async {
-    var rpcRst = await call(
-        "WriteErrorAsync", [serviceName, module, requestChain, logContent]);
-    return rpcRst;
-  }
-}

+ 0 - 35
lib/services/session.dart

@@ -1,35 +0,0 @@
-import 'dart:core';
-
-import '../client_base.dart';
-import 'package:fis_common/json_convert.dart';
-
-import 'session.m.dart';
-
-class SessionService extends JsonRpcClientBase {
-  SessionService(
-    String host, {
-    String serviceName = "ISessionService",
-    Map<String, String>? headers,
-    int? timeout,
-  }) : super(
-          host,
-          serviceName,
-          headers: headers,
-          timeout: timeout,
-        ) {
-    /// 注册响应实体反序列化处理器
-    FJsonConvert.setDecoder((map) => SessionInfo.fromJson(map));
-  }
-
-  Future<SessionInfo> createSessionAsync(
-      String userCode, SessionClientInfo clientInfo) async {
-    var rpcRst = await call("CreateSessionAsync", [userCode, clientInfo]);
-    var result = SessionInfo.fromJson(rpcRst as Map<String, dynamic>);
-    return result;
-  }
-
-  Future<bool> removeSessionAsync(String sessionId) async {
-    var rpcRst = await call("RemoveSessionAsync", sessionId);
-    return rpcRst;
-  }
-}

+ 0 - 87
lib/services/session.m.dart

@@ -1,87 +0,0 @@
-class SessionInfo {
-	String? userCode;
-	String? deviceId;
-	String? sessionId;
-	String? id;
-	DateTime? createTime;
-	DateTime? updateTime;
-	bool isDelete;
-
-	SessionInfo({
-		this.userCode,
-		this.deviceId,
-		this.sessionId,
-		this.id,
-		this.createTime,
-		this.updateTime,
-		this.isDelete=false,
-	});
-
-	factory SessionInfo.fromJson(Map<String, dynamic> map) {
-		return SessionInfo( 
-			userCode: map['UserCode'],
-			deviceId: map['DeviceId'],
-			sessionId: map['SessionId'],
-			id: map['Id'],
-			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-			isDelete: map['IsDelete'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(userCode != null)
-			map['UserCode'] = userCode;
-		if(deviceId != null)
-			map['DeviceId'] = deviceId;
-		if(sessionId != null)
-			map['SessionId'] = sessionId;
-		if(id != null)
-			map['Id'] = id;
-		if(createTime != null)
-			map['CreateTime'] = createTime;
-		if(updateTime != null)
-			map['UpdateTime'] = updateTime;
-		map['IsDelete'] = isDelete;
-		return map;
-	}
-}
-
-class SessionClientInfo {
-	String? clientIpAndPort;
-	String? clientDeviceId;
-	String? clientSource;
-	String? clientExtensionInfo;
-
-	SessionClientInfo({
-		this.clientIpAndPort,
-		this.clientDeviceId,
-		this.clientSource,
-		this.clientExtensionInfo,
-	});
-
-	factory SessionClientInfo.fromJson(Map<String, dynamic> map) {
-		return SessionClientInfo( 
-			clientIpAndPort: map['ClientIpAndPort'],
-			clientDeviceId: map['ClientDeviceId'],
-			clientSource: map['ClientSource'],
-			clientExtensionInfo: map['ClientExtensionInfo'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(clientIpAndPort != null)
-			map['ClientIpAndPort'] = clientIpAndPort;
-		if(clientDeviceId != null)
-			map['ClientDeviceId'] = clientDeviceId;
-		if(clientSource != null)
-			map['ClientSource'] = clientSource;
-		if(clientExtensionInfo != null)
-			map['ClientExtensionInfo'] = clientExtensionInfo;
-		return map;
-	}
-}
-
-

+ 1 - 0
lib/services/storage.dart

@@ -3,6 +3,7 @@ import 'dart:core';
 import 'package:fis_jsonrpc/client_base.dart';
 
 
+
 class StorageService extends JsonRpcClientBase {
 	StorageService(
 		String host, {

+ 0 - 42
lib/services/storage.m.dart

@@ -1,42 +0,0 @@
-enum UploadDataType {
-	Base64String,
-	ByteArray,
-}
-
-class StorageFileInfo {
-	UploadDataType uploadDataCategory;
-	List<int>? fileData;
-	String? fileBase64String;
-	String? fileName;
-
-	StorageFileInfo({
-		this.uploadDataCategory=UploadDataType.Base64String,
-		this.fileData,
-		this.fileBase64String,
-		this.fileName,
-	});
-
-	factory StorageFileInfo.fromJson(Map<String, dynamic> map) {
-		final fileDataData = map['FileData'];
-		return StorageFileInfo( 
-			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>();
-		map['UploadDataCategory'] = uploadDataCategory.index;
-		if(fileData != null)
-			map['FileData'] = fileData;
-		if(fileBase64String != null)
-			map['FileBase64String'] = fileBase64String;
-		if(fileName != null)
-			map['FileName'] = fileName;
-		return map;
-	}
-}
-
-

+ 1 - 0
lib/services/user.dart

@@ -5,6 +5,7 @@ import 'package:fis_common/json_convert.dart';
 
 import 'user.m.dart';
 
+
 class UserService extends JsonRpcClientBase {
 	UserService(
 		String host, {

+ 21 - 91
lib/services/user.m.dart

@@ -1,43 +1,11 @@
-import 'package:fis_jsonrpc/utils.dart';
-
-class BaseDTO {
-	DateTime? createTime;
-	DateTime? updateTime;
-
-	BaseDTO({
-		this.createTime,
-		this.updateTime,
-	});
-
-	factory BaseDTO.fromJson(Map<String, dynamic> map) {
-		return BaseDTO( 
-			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
-			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(createTime != null)
-			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
-		if(updateTime != null)
-			map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
-		return map;
-	}
-}
+import 'device.m.dart';
+import 'identityApply.m.dart';
 
 enum UserInfoStateEnum {
 	Nonactivated,
 	Activated,
 }
 
-enum ApplyStateEnum {
-	NotApply,
-	Applying,
-	Refused,
-	Passed,
-}
-
 class UserDTO extends BaseDTO{
 	String? userCode;
 	String? userName;
@@ -95,14 +63,14 @@ class UserDTO extends BaseDTO{
 			headImageUrl: map['HeadImageUrl'],
 			organizationCode: map['OrganizationCode'],
 			rootOrganizationCode: map['RootOrganizationCode'],
-			authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
-			bindDevices: map['BindDevices'].cast<String>().toList(),
+			authorityGroups: map['AuthorityGroups'] != null ? map['AuthorityGroups'].cast<String>().toList() : null,
+			bindDevices: map['BindDevices'] != null ? map['BindDevices'].cast<String>().toList() : null,
 			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(),
+			roleCodes: map['RoleCodes'] != null ? map['RoleCodes'].cast<String>().toList() : null,
+			rankCodes: map['RankCodes'] != null ? map['RankCodes'].cast<String>().toList() : null,
+			positionCodes: map['PositionCodes'] != null ? map['PositionCodes'].cast<String>().toList() : null,
 			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,
@@ -148,43 +116,6 @@ class UserDTO extends BaseDTO{
 	}
 }
 
-class BaseRequest {
-
-	BaseRequest();
-
-	factory BaseRequest.fromJson(Map<String, dynamic> map) {
-		return BaseRequest( 
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		return map;
-	}
-}
-
-class TokenRequest extends BaseRequest{
-	String? token;
-
-	TokenRequest({
-		this.token,
-	}) : super(
-		);
-
-	factory TokenRequest.fromJson(Map<String, dynamic> map) {
-		return TokenRequest( 
-			token: map['Token'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(token != null)
-			map['Token'] = token;
-		return map;
-	}
-}
-
 class GetUserInfoRequest extends TokenRequest{
 
 	GetUserInfoRequest({
@@ -268,14 +199,14 @@ class AlterUserInfoRequest extends UserDTO{
 			headImageUrl: map['HeadImageUrl'],
 			organizationCode: map['OrganizationCode'],
 			rootOrganizationCode: map['RootOrganizationCode'],
-			authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
-			bindDevices: map['BindDevices'].cast<String>().toList(),
+			authorityGroups: map['AuthorityGroups'] != null ? map['AuthorityGroups'].cast<String>().toList() : null,
+			bindDevices: map['BindDevices'] != null ? map['BindDevices'].cast<String>().toList() : null,
 			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(),
+			roleCodes: map['RoleCodes'] != null ? map['RoleCodes'].cast<String>().toList() : null,
+			rankCodes: map['RankCodes'] != null ? map['RankCodes'].cast<String>().toList() : null,
+			positionCodes: map['PositionCodes'] != null ? map['PositionCodes'].cast<String>().toList() : null,
 			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,
@@ -344,7 +275,7 @@ class RemoveUsersFromOrganizationRequest extends TokenRequest{
 
 	factory RemoveUsersFromOrganizationRequest.fromJson(Map<String, dynamic> map) {
 		return RemoveUsersFromOrganizationRequest( 
-			userCodes: map['UserCodes'].cast<String>().toList(),
+			userCodes: map['UserCodes'] != null ? map['UserCodes'].cast<String>().toList() : null,
 			token: map['Token'],
 		);
 	}
@@ -378,9 +309,9 @@ class SetUserOrganizationInfoRequest extends TokenRequest{
 	factory SetUserOrganizationInfoRequest.fromJson(Map<String, dynamic> map) {
 		return SetUserOrganizationInfoRequest( 
 			userCode: map['UserCode'],
-			roleCodes: map['RoleCodes'].cast<String>().toList(),
-			rankCodes: map['RankCodes'].cast<String>().toList(),
-			positionCodes: map['PositionCodes'].cast<String>().toList(),
+			roleCodes: map['RoleCodes'] != null ? map['RoleCodes'].cast<String>().toList() : null,
+			rankCodes: map['RankCodes'] != null ? map['RankCodes'].cast<String>().toList() : null,
+			positionCodes: map['PositionCodes'] != null ? map['PositionCodes'].cast<String>().toList() : null,
 			organizationCode: map['OrganizationCode'],
 			token: map['Token'],
 		);
@@ -462,14 +393,14 @@ class AlterPersonInfoRequest extends UserDTO{
 			headImageUrl: map['HeadImageUrl'],
 			organizationCode: map['OrganizationCode'],
 			rootOrganizationCode: map['RootOrganizationCode'],
-			authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
-			bindDevices: map['BindDevices'].cast<String>().toList(),
+			authorityGroups: map['AuthorityGroups'] != null ? map['AuthorityGroups'].cast<String>().toList() : null,
+			bindDevices: map['BindDevices'] != null ? map['BindDevices'].cast<String>().toList() : null,
 			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(),
+			roleCodes: map['RoleCodes'] != null ? map['RoleCodes'].cast<String>().toList() : null,
+			rankCodes: map['RankCodes'] != null ? map['RankCodes'].cast<String>().toList() : null,
+			positionCodes: map['PositionCodes'] != null ? map['PositionCodes'].cast<String>().toList() : null,
 			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,
@@ -485,4 +416,3 @@ class AlterPersonInfoRequest extends UserDTO{
 }
 
 
-