Browse Source

同步最新接口更改

loki.wu 2 years ago
parent
commit
90d1f8f90b

+ 47 - 43
lib/rpc.dart

@@ -5,14 +5,12 @@ import 'dart:collection';
 import 'package:fis_common/extensions/type.dart';
 
 import 'client_base.dart';
+
 import 'interceptor.dart';
+
 import 'services/index.dart';
 
 export 'services/index.dart';
-export 'request.dart';
-export 'exception.dart';
-export 'interceptor.dart';
-export 'listener/listener.dart';
 
 typedef T ServiceBuilder<T extends JsonRpcClientBase>();
 
@@ -54,63 +52,68 @@ class JsonRpcProxy {
     return _platformService!;
   }
 
-  AuthenticationService get authentication =>
-      findService(() => new AuthenticationService(currentHostAddress));
+	AuthenticationService get authentication =>
+	findService(() => new AuthenticationService(currentHostAddress));
+
+	ClientLogService get clientLog =>
+	findService(() => new ClientLogService(currentHostAddress));
 
-  ClientLogService get clientLog =>
-      findService(() => new ClientLogService(currentHostAddress));
+	ConnectService get connect =>
+	findService(() => new ConnectService(currentHostAddress));
 
-  ConnectService get connect =>
-      findService(() => new ConnectService(currentHostAddress));
+	DeviceService get device =>
+	findService(() => new DeviceService(currentHostAddress));
 
-  DeviceService get device =>
-      findService(() => new DeviceService(currentHostAddress));
+	EmailService get email =>
+	findService(() => new EmailService(currentHostAddress));
 
-  EmailService get email =>
-      findService(() => new EmailService(currentHostAddress));
+	IdentityApplyService get identityApply =>
+	findService(() => new IdentityApplyService(currentHostAddress));
 
-  IdentityApplyService get identityApply =>
-      findService(() => new IdentityApplyService(currentHostAddress));
+	LoginService get login =>
+	findService(() => new LoginService(currentHostAddress));
 
-  LoginService get login =>
-      findService(() => new LoginService(currentHostAddress));
+	NotificationService get notification =>
+	findService(() => new NotificationService(currentHostAddress));
 
-  NotificationService get notification =>
-      findService(() => new NotificationService(currentHostAddress));
+	OrganizationService get organization =>
+	findService(() => new OrganizationService(currentHostAddress));
 
-  OrganizationService get organization =>
-      findService(() => new OrganizationService(currentHostAddress));
+	PatientService get patient =>
+	findService(() => new PatientService(currentHostAddress));
 
-  PatientService get patient =>
-      findService(() => new PatientService(currentHostAddress));
+	PositionService get position =>
+	findService(() => new PositionService(currentHostAddress));
 
-  PositionService get position =>
-      findService(() => new PositionService(currentHostAddress));
+	RankService get rank =>
+	findService(() => new RankService(currentHostAddress));
 
-  RankService get rank =>
-      findService(() => new RankService(currentHostAddress));
+	RecordInfoService get recordInfo =>
+	findService(() => new RecordInfoService(currentHostAddress));
 
-  RecordInfoService get recordInfo =>
-      findService(() => new RecordInfoService(currentHostAddress));
+	RegionService get region =>
+	findService(() => new RegionService(currentHostAddress));
 
-  RegionService get region =>
-      findService(() => new RegionService(currentHostAddress));
+	RemedicalService get remedical =>
+	findService(() => new RemedicalService(currentHostAddress));
 
-  RemedicalService get remedical =>
-      findService(() => new RemedicalService(currentHostAddress));
+	RoleService get role =>
+	findService(() => new RoleService(currentHostAddress));
 
-  RoleService get role =>
-      findService(() => new RoleService(currentHostAddress));
+	SMSService get sMS =>
+	findService(() => new SMSService(currentHostAddress));
 
-  SMSService get sMS => findService(() => new SMSService(currentHostAddress));
+	StorageService get storage =>
+	findService(() => new StorageService(currentHostAddress));
 
-  StorageService get storage =>
-      findService(() => new StorageService(currentHostAddress));
+	UserService get user =>
+	findService(() => new UserService(currentHostAddress));
 
-  UserService get user =>
-      findService(() => new UserService(currentHostAddress));
+	VidProcessService get vidProcess =>
+	findService(() => new VidProcessService(currentHostAddress));
 
-  /* 服务代理设置 End */
+
+    /* 服务代理设置 End */
 
   /// 设置服务主机地址
   void setServerHost(String address) {
@@ -119,7 +122,7 @@ class JsonRpcProxy {
     }
     _currentHost = address;
   }
-
+  
   /// 添加拦截器
   void addInterceptor(JsonRpcInterceptor interceptor) =>
       jsonRpcInterceptHost.addInterceptor(interceptor);
@@ -136,3 +139,4 @@ class JsonRpcProxy {
     return _serviceCache[serviceType] as T;
   }
 }
+

+ 5 - 0
lib/services/authentication.dart

@@ -61,5 +61,10 @@ class AuthenticationService extends JsonRpcClientBase {
 		return result;
 	}
 
+	Future<String> getServerDefaultToken() async {
+		var rpcRst = await call("GetServerDefaultToken", );
+		return rpcRst;
+	}
+
 }
 

+ 14 - 0
lib/services/connect.dart

@@ -5,6 +5,8 @@ import 'package:fis_common/json_convert.dart';
 
 import 'connect.m.dart';
 
+import 'authentication.m.dart';
+
 
 class ConnectService extends JsonRpcClientBase {
 	ConnectService(
@@ -20,6 +22,7 @@ class ConnectService extends JsonRpcClientBase {
 				) {
 		/// 注册响应实体反序列化处理器
 		FJsonConvert.setDecoder((map) => ConnectResult.fromJson(map));
+		FJsonConvert.setDecoder((map) => CacheDeviceDTO.fromJson(map));
 	}
 
 	Future<ConnectResult> connect(ConnectRequest request) async {
@@ -28,5 +31,16 @@ class ConnectService extends JsonRpcClientBase {
 		return result;
 	}
 
+	Future<CacheDeviceDTO> getDeviceByToken(TokenRequest request) async {
+		var rpcRst = await call("GetDeviceByToken", request);
+		var result = CacheDeviceDTO.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<bool> disConnect(TokenRequest request) async {
+		var rpcRst = await call("DisConnect", request);
+		return rpcRst;
+	}
+
 }
 

+ 228 - 0
lib/services/connect.m.dart

@@ -1,3 +1,7 @@
+import 'authentication.m.dart';
+
+import 'package:fis_jsonrpc/utils.dart';
+
 class ConnectResult {
 	String? token;
 	String? uniqueCode;
@@ -100,4 +104,228 @@ class ConnectRequest {
 	}
 }
 
+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;
+	}
+}
+
+class DeviceInfoDTO extends BaseDTO{
+	String? deviceCode;
+	String? serialNumber;
+	String? password;
+	String? name;
+	String? description;
+	String? deviceModel;
+	String? deviceType;
+	String? headPicUrl;
+	String? deviceSoftwareVersion;
+	String? sDKSoftwareVersion;
+	String? organizationCode;
+	String? departmentCode;
+	String? shortCode;
+	bool isAutoShared;
+	DateTime? lastLoginTime;
+	String? systemVersion;
+	String? cPUModel;
+	String? systemLanguage;
+
+	DeviceInfoDTO({
+		this.deviceCode,
+		this.serialNumber,
+		this.password,
+		this.name,
+		this.description,
+		this.deviceModel,
+		this.deviceType,
+		this.headPicUrl,
+		this.deviceSoftwareVersion,
+		this.sDKSoftwareVersion,
+		this.organizationCode,
+		this.departmentCode,
+		this.shortCode,
+		this.isAutoShared = false,
+		this.lastLoginTime,
+		this.systemVersion,
+		this.cPUModel,
+		this.systemLanguage,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory DeviceInfoDTO.fromJson(Map<String, dynamic> map) {
+		return DeviceInfoDTO( 
+			deviceCode: map['DeviceCode'],
+			serialNumber: map['SerialNumber'],
+			password: map['Password'],
+			name: map['Name'],
+			description: map['Description'],
+			deviceModel: map['DeviceModel'],
+			deviceType: map['DeviceType'],
+			headPicUrl: map['HeadPicUrl'],
+			deviceSoftwareVersion: map['DeviceSoftwareVersion'],
+			sDKSoftwareVersion: map['SDKSoftwareVersion'],
+			organizationCode: map['OrganizationCode'],
+			departmentCode: map['DepartmentCode'],
+			shortCode: map['ShortCode'],
+			isAutoShared: map['IsAutoShared'],
+			lastLoginTime: map['LastLoginTime'] != null ? DateTime.parse(map['LastLoginTime']) : null,
+			systemVersion: map['SystemVersion'],
+			cPUModel: map['CPUModel'],
+			systemLanguage: map['SystemLanguage'],
+			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(password != null)
+			map['Password'] = password;
+		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(departmentCode != null)
+			map['DepartmentCode'] = departmentCode;
+		if(shortCode != null)
+			map['ShortCode'] = shortCode;
+		map['IsAutoShared'] = isAutoShared;
+		if(lastLoginTime != null)
+			map['LastLoginTime'] = JsonRpcUtils.dateFormat(lastLoginTime!);
+		if(systemVersion != null)
+			map['SystemVersion'] = systemVersion;
+		if(cPUModel != null)
+			map['CPUModel'] = cPUModel;
+		if(systemLanguage != null)
+			map['SystemLanguage'] = systemLanguage;
+		return map;
+	}
+}
+
+class CacheDeviceDTO extends DeviceInfoDTO{
+	bool isOnline;
+	String? sourceUrl;
+
+	CacheDeviceDTO({
+		this.isOnline = false,
+		this.sourceUrl,
+		String? deviceCode,
+		String? serialNumber,
+		String? password,
+		String? name,
+		String? description,
+		String? deviceModel,
+		String? deviceType,
+		String? headPicUrl,
+		String? deviceSoftwareVersion,
+		String? sDKSoftwareVersion,
+		String? organizationCode,
+		String? departmentCode,
+		String? shortCode,
+		bool isAutoShared = false,
+		DateTime? lastLoginTime,
+		String? systemVersion,
+		String? cPUModel,
+		String? systemLanguage,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			deviceCode: deviceCode,
+			serialNumber: serialNumber,
+			password: password,
+			name: name,
+			description: description,
+			deviceModel: deviceModel,
+			deviceType: deviceType,
+			headPicUrl: headPicUrl,
+			deviceSoftwareVersion: deviceSoftwareVersion,
+			sDKSoftwareVersion: sDKSoftwareVersion,
+			organizationCode: organizationCode,
+			departmentCode: departmentCode,
+			shortCode: shortCode,
+			isAutoShared: isAutoShared,
+			lastLoginTime: lastLoginTime,
+			systemVersion: systemVersion,
+			cPUModel: cPUModel,
+			systemLanguage: systemLanguage,
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory CacheDeviceDTO.fromJson(Map<String, dynamic> map) {
+		return CacheDeviceDTO( 
+			isOnline: map['IsOnline'],
+			sourceUrl: map['SourceUrl'],
+			deviceCode: map['DeviceCode'],
+			serialNumber: map['SerialNumber'],
+			password: map['Password'],
+			name: map['Name'],
+			description: map['Description'],
+			deviceModel: map['DeviceModel'],
+			deviceType: map['DeviceType'],
+			headPicUrl: map['HeadPicUrl'],
+			deviceSoftwareVersion: map['DeviceSoftwareVersion'],
+			sDKSoftwareVersion: map['SDKSoftwareVersion'],
+			organizationCode: map['OrganizationCode'],
+			departmentCode: map['DepartmentCode'],
+			shortCode: map['ShortCode'],
+			isAutoShared: map['IsAutoShared'],
+			lastLoginTime: map['LastLoginTime'] != null ? DateTime.parse(map['LastLoginTime']) : null,
+			systemVersion: map['SystemVersion'],
+			cPUModel: map['CPUModel'],
+			systemLanguage: map['SystemLanguage'],
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		map['IsOnline'] = isOnline;
+		if(sourceUrl != null)
+			map['SourceUrl'] = sourceUrl;
+		return map;
+	}
+}
+
 

+ 1 - 0
lib/services/device.dart

@@ -6,6 +6,7 @@ import 'package:fis_common/json_convert.dart';
 import 'device.m.dart';
 
 import 'authentication.m.dart';
+import 'connect.m.dart';
 
 
 class DeviceService extends JsonRpcClientBase {

+ 1 - 140
lib/services/device.m.dart

@@ -1,147 +1,8 @@
+import 'connect.m.dart';
 import 'authentication.m.dart';
 
-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;
-	}
-}
-
-class DeviceInfoDTO extends BaseDTO{
-	String? deviceCode;
-	String? serialNumber;
-	String? password;
-	String? name;
-	String? description;
-	String? deviceModel;
-	String? deviceType;
-	String? headPicUrl;
-	String? deviceSoftwareVersion;
-	String? sDKSoftwareVersion;
-	String? organizationCode;
-	String? departmentCode;
-	String? shortCode;
-	bool isAutoShared;
-	DateTime? lastLoginTime;
-	String? systemVersion;
-	String? cPUModel;
-	String? systemLanguage;
-
-	DeviceInfoDTO({
-		this.deviceCode,
-		this.serialNumber,
-		this.password,
-		this.name,
-		this.description,
-		this.deviceModel,
-		this.deviceType,
-		this.headPicUrl,
-		this.deviceSoftwareVersion,
-		this.sDKSoftwareVersion,
-		this.organizationCode,
-		this.departmentCode,
-		this.shortCode,
-		this.isAutoShared = false,
-		this.lastLoginTime,
-		this.systemVersion,
-		this.cPUModel,
-		this.systemLanguage,
-		DateTime? createTime,
-		DateTime? updateTime,
-	}) : super(
-			createTime: createTime,
-			updateTime: updateTime,
-		);
-
-	factory DeviceInfoDTO.fromJson(Map<String, dynamic> map) {
-		return DeviceInfoDTO( 
-			deviceCode: map['DeviceCode'],
-			serialNumber: map['SerialNumber'],
-			password: map['Password'],
-			name: map['Name'],
-			description: map['Description'],
-			deviceModel: map['DeviceModel'],
-			deviceType: map['DeviceType'],
-			headPicUrl: map['HeadPicUrl'],
-			deviceSoftwareVersion: map['DeviceSoftwareVersion'],
-			sDKSoftwareVersion: map['SDKSoftwareVersion'],
-			organizationCode: map['OrganizationCode'],
-			departmentCode: map['DepartmentCode'],
-			shortCode: map['ShortCode'],
-			isAutoShared: map['IsAutoShared'],
-			lastLoginTime: map['LastLoginTime'] != null ? DateTime.parse(map['LastLoginTime']) : null,
-			systemVersion: map['SystemVersion'],
-			cPUModel: map['CPUModel'],
-			systemLanguage: map['SystemLanguage'],
-			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(password != null)
-			map['Password'] = password;
-		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(departmentCode != null)
-			map['DepartmentCode'] = departmentCode;
-		if(shortCode != null)
-			map['ShortCode'] = shortCode;
-		map['IsAutoShared'] = isAutoShared;
-		if(lastLoginTime != null)
-			map['LastLoginTime'] = JsonRpcUtils.dateFormat(lastLoginTime!);
-		if(systemVersion != null)
-			map['SystemVersion'] = systemVersion;
-		if(cPUModel != null)
-			map['CPUModel'] = cPUModel;
-		if(systemLanguage != null)
-			map['SystemLanguage'] = systemLanguage;
-		return map;
-	}
-}
-
 class UploadDeviceDTO extends BaseDTO{
 	String? serialNumber;
 	String? deviceModel;

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

@@ -1,4 +1,4 @@
-import 'device.m.dart';
+import 'connect.m.dart';
 import 'authentication.m.dart';
 
 enum ApplyStateEnum {

+ 2 - 0
lib/services/index.dart

@@ -18,6 +18,7 @@ export 'role.dart';
 export 'sMS.dart';
 export 'storage.dart';
 export 'user.dart';
+export 'vidProcess.dart';
 export 'authentication.m.dart';
 export 'connect.m.dart';
 export 'device.m.dart';
@@ -35,3 +36,4 @@ export 'remedical.m.dart';
 export 'role.m.dart';
 export 'storage.m.dart';
 export 'user.m.dart';
+export 'vidProcess.m.dart';

+ 5 - 0
lib/services/login.dart

@@ -73,5 +73,10 @@ class LoginService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
+	Future<bool> modifyPasswordAsync(ModifyPasswordRequest request) async {
+		var rpcRst = await call("ModifyPasswordAsync", request);
+		return rpcRst;
+	}
+
 }
 

+ 39 - 0
lib/services/login.m.dart

@@ -299,4 +299,43 @@ class VerifyAccountRequest {
 	}
 }
 
+class ModifyPasswordRequest extends CommonSignUpRequest{
+	String? token;
+	String? newPassword;
+
+	ModifyPasswordRequest({
+		this.token,
+		this.newPassword,
+		String? anyAccount,
+		String? anyCode,
+		String? password,
+		Map<String,String>? headerMap,
+	}) : super(
+			anyAccount: anyAccount,
+			anyCode: anyCode,
+			password: password,
+			headerMap: headerMap,
+		);
+
+	factory ModifyPasswordRequest.fromJson(Map<String, dynamic> map) {
+		return ModifyPasswordRequest( 
+			token: map['Token'],
+			newPassword: map['NewPassword'],
+			anyAccount: map['AnyAccount'],
+			anyCode: map['AnyCode'],
+			password: map['Password'],
+			headerMap: map['HeaderMap'] != null ? map['HeaderMap'].cast<String,String>() : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(token != null)
+			map['Token'] = token;
+		if(newPassword != null)
+			map['NewPassword'] = newPassword;
+		return map;
+	}
+}
+
 

+ 1 - 1
lib/services/organization.m.dart

@@ -1,4 +1,4 @@
-import 'device.m.dart';
+import 'connect.m.dart';
 import 'authentication.m.dart';
 
 class OrganizationBaseDTO extends BaseDTO{

+ 1 - 1
lib/services/patient.m.dart

@@ -1,5 +1,5 @@
 import 'authentication.m.dart';
-import 'device.m.dart';
+import 'connect.m.dart';
 
 import 'package:fis_jsonrpc/utils.dart';
 

+ 1 - 1
lib/services/position.m.dart

@@ -1,4 +1,4 @@
-import 'device.m.dart';
+import 'connect.m.dart';
 import 'authentication.m.dart';
 
 class PositionDTO extends BaseDTO{

+ 1 - 1
lib/services/rank.m.dart

@@ -1,4 +1,4 @@
-import 'device.m.dart';
+import 'connect.m.dart';
 import 'authentication.m.dart';
 
 class RankDTO extends BaseDTO{

+ 8 - 6
lib/services/recordInfo.m.dart

@@ -1,6 +1,8 @@
 import 'authentication.m.dart';
 import 'patient.m.dart';
 
+import 'package:fis_jsonrpc/utils.dart';
+
 class PatientInfoExt {
 	String? patientScanType;
 	List<DataItemDTO>? content;
@@ -69,7 +71,7 @@ enum RecordStatusEnum {
 }
 
 class GetRecordsPageResult {
-	String? createTime;
+	DateTime? createTime;
 	String? deptName;
 	String? creatorName;
 	String? deviceName;
@@ -91,7 +93,7 @@ class GetRecordsPageResult {
 
 	factory GetRecordsPageResult.fromJson(Map<String, dynamic> map) {
 		return GetRecordsPageResult( 
-			createTime: map['CreateTime'],
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			deptName: map['DeptName'],
 			creatorName: map['CreatorName'],
 			deviceName: map['DeviceName'],
@@ -105,7 +107,7 @@ class GetRecordsPageResult {
 	Map<String, dynamic> toJson() {
 		final map = Map<String, dynamic>();
 		if(createTime != null)
-			map['CreateTime'] = createTime;
+			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
 		if(deptName != null)
 			map['DeptName'] = deptName;
 		if(creatorName != null)
@@ -154,7 +156,7 @@ class GetRecordsPageRequest extends PageRequest{
 }
 
 class QueryRecordResult {
-	String? createTime;
+	DateTime? createTime;
 	String? deptName;
 	String? patientName;
 	String? patientAge;
@@ -178,7 +180,7 @@ class QueryRecordResult {
 
 	factory QueryRecordResult.fromJson(Map<String, dynamic> map) {
 		return QueryRecordResult( 
-			createTime: map['CreateTime'],
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			deptName: map['DeptName'],
 			patientName: map['PatientName'],
 			patientAge: map['PatientAge'],
@@ -193,7 +195,7 @@ class QueryRecordResult {
 	Map<String, dynamic> toJson() {
 		final map = Map<String, dynamic>();
 		if(createTime != null)
-			map['CreateTime'] = createTime;
+			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
 		if(deptName != null)
 			map['DeptName'] = deptName;
 		if(patientName != null)

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

@@ -1,4 +1,4 @@
-import 'device.m.dart';
+import 'connect.m.dart';
 
 class RegionDTO extends BaseDTO{
 	String? regionVersion;

+ 6 - 0
lib/services/remedical.dart

@@ -7,6 +7,7 @@ import 'remedical.m.dart';
 
 import 'recordInfo.m.dart';
 import 'organization.m.dart';
+import 'authentication.m.dart';
 import 'patient.m.dart';
 
 
@@ -72,5 +73,10 @@ class RemedicalService extends JsonRpcClientBase {
 		return result;
 	}
 
+	Future<bool> autoUploadExamData(TokenRequest request) async {
+		var rpcRst = await call("AutoUploadExamData", request);
+		return rpcRst;
+	}
+
 }
 

+ 1 - 1
lib/services/remedical.m.dart

@@ -1,7 +1,7 @@
 import 'authentication.m.dart';
 import 'patient.m.dart';
 import 'recordInfo.m.dart';
-import 'device.m.dart';
+import 'connect.m.dart';
 import 'organization.m.dart';
 
 import 'package:fis_jsonrpc/utils.dart';

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

@@ -1,4 +1,4 @@
-import 'device.m.dart';
+import 'connect.m.dart';
 import 'authentication.m.dart';
 
 class BaseRoleDTO extends BaseDTO{

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

@@ -90,6 +90,7 @@ enum ApplicantTypeEnum {
 	Device,
 	Management,
 	ThirdParty,
+	Server,
 }
 
 class FileServiceRequest extends TokenRequest{

+ 5 - 0
lib/services/user.dart

@@ -78,5 +78,10 @@ class UserService extends JsonRpcClientBase {
 		return result;
 	}
 
+	Future<bool> isDefaultPasswordAsync(TokenRequest request) async {
+		var rpcRst = await call("IsDefaultPasswordAsync", request);
+		return rpcRst;
+	}
+
 }
 

+ 1 - 1
lib/services/user.m.dart

@@ -1,4 +1,4 @@
-import 'device.m.dart';
+import 'connect.m.dart';
 import 'patient.m.dart';
 import 'identityApply.m.dart';
 import 'authentication.m.dart';

+ 37 - 0
lib/services/vidProcess.dart

@@ -0,0 +1,37 @@
+import 'dart:core';
+
+import 'package:fis_jsonrpc/client_base.dart';
+import 'package:fis_common/json_convert.dart';
+
+import 'vidProcess.m.dart';
+
+
+class VidProcessService extends JsonRpcClientBase {
+	VidProcessService(
+		String host, {
+		String serviceName = "IVidProcessService",
+		Map<String, String>? headers,
+		int? timeout,
+	}) : super(
+						host,
+						serviceName,
+						headers: headers,
+						timeout: timeout,
+				) {
+		/// 注册响应实体反序列化处理器
+		FJsonConvert.setDecoder((map) => VidProcessResult.fromJson(map));
+	}
+
+	Future<VidProcessResult> convertToImageDataAsync(ConvertToImageDataRequest request) async {
+		var rpcRst = await call("ConvertToImageDataAsync", request);
+		var result = VidProcessResult.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<String> getThumbnailAsync(GetThumbnailRequest request) async {
+		var rpcRst = await call("GetThumbnailAsync", request);
+		return rpcRst;
+	}
+
+}
+

+ 115 - 0
lib/services/vidProcess.m.dart

@@ -0,0 +1,115 @@
+enum ImageType {
+	Jpg,
+	Mp4,
+}
+
+class VidProcessResult {
+	ImageType imageType;
+	String? fileUrl;
+
+	VidProcessResult({
+		this.imageType = ImageType.Jpg,
+		this.fileUrl,
+	});
+
+	factory VidProcessResult.fromJson(Map<String, dynamic> map) {
+		return VidProcessResult( 
+			imageType: ImageType.values.firstWhere((e) => e.index == map['ImageType']),
+			fileUrl: map['FileUrl'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		map['ImageType'] = imageType.index;
+		if(fileUrl != null)
+			map['FileUrl'] = fileUrl;
+		return map;
+	}
+}
+
+class VidFileTokenRequest {
+	String? fileToken;
+
+	VidFileTokenRequest({
+		this.fileToken,
+	});
+
+	factory VidFileTokenRequest.fromJson(Map<String, dynamic> map) {
+		return VidFileTokenRequest( 
+			fileToken: map['FileToken'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(fileToken != null)
+			map['FileToken'] = fileToken;
+		return map;
+	}
+}
+
+enum ImageQualityEnum {
+	None,
+	Low,
+	Medium,
+	High,
+}
+
+class ConvertToImageDataRequest extends VidFileTokenRequest{
+	int height;
+	ImageQualityEnum quality;
+
+	ConvertToImageDataRequest({
+		this.height = 0,
+		this.quality = ImageQualityEnum.None,
+		String? fileToken,
+	}) : super(
+			fileToken: fileToken,
+		);
+
+	factory ConvertToImageDataRequest.fromJson(Map<String, dynamic> map) {
+		return ConvertToImageDataRequest( 
+			height: map['Height'],
+			quality: ImageQualityEnum.values.firstWhere((e) => e.index == map['Quality']),
+			fileToken: map['FileToken'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		map['Height'] = height;
+		map['Quality'] = quality.index;
+		return map;
+	}
+}
+
+class GetThumbnailRequest extends VidFileTokenRequest{
+	int height;
+	int quality;
+
+	GetThumbnailRequest({
+		this.height = 0,
+		this.quality = 0,
+		String? fileToken,
+	}) : super(
+			fileToken: fileToken,
+		);
+
+	factory GetThumbnailRequest.fromJson(Map<String, dynamic> map) {
+		return GetThumbnailRequest( 
+			height: map['Height'],
+			quality: map['Quality'],
+			fileToken: map['FileToken'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		map['Height'] = height;
+		map['Quality'] = quality;
+		return map;
+	}
+}
+
+