Browse Source

1、更新rpc

bakamaka.guan 2 years ago
parent
commit
d00fe13b3a

+ 11 - 0
lib/services/deployPlatform.dart

@@ -84,5 +84,16 @@ class DeployPlatformService extends JsonRpcClientBase {
 		return result;
 	}
 
+	Future<DeployRecordInfoDTO> getPackageAsync(GetPackageRequest request) async {
+		var rpcRst = await call("GetPackageAsync", request);
+		var result = DeployRecordInfoDTO.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<bool> cancelPackagingAsync(CancelPackagingRequest request) async {
+		var rpcRst = await call("CancelPackagingAsync", request);
+		return rpcRst;
+	}
+
 }
 

+ 63 - 10
lib/services/deployPlatform.m.dart

@@ -1,5 +1,7 @@
 import 'notification.m.dart';
 
+import 'package:fis_jsonrpc/utils.dart';
+
 class DeployPlatServerInfoDTO extends BaseDTO{
 	String? id;
 	String? serverID;
@@ -152,8 +154,10 @@ class DeployRecordInfoDTO extends BaseDTO{
 	String? version;
 	String? releasedBy;
 	String? internalRecord;
-	String? upgradeSetting;
-	String? upgradeFileUrl;
+	bool inProcess;
+	String? generatePackageJson;
+	String? packageLogs;
+	DateTime? lastPackageTime;
 	List<DeployRecordUpgradeInfoDTO >? upgradeInfos;
 
 	DeployRecordInfoDTO({
@@ -161,8 +165,10 @@ class DeployRecordInfoDTO extends BaseDTO{
 		this.version,
 		this.releasedBy,
 		this.internalRecord,
-		this.upgradeSetting,
-		this.upgradeFileUrl,
+		this.inProcess = false,
+		this.generatePackageJson,
+		this.packageLogs,
+		this.lastPackageTime,
 		this.upgradeInfos,
 		DateTime? createTime,
 		DateTime? updateTime,
@@ -177,8 +183,10 @@ class DeployRecordInfoDTO extends BaseDTO{
 			version: map['Version'],
 			releasedBy: map['ReleasedBy'],
 			internalRecord: map['InternalRecord'],
-			upgradeSetting: map['UpgradeSetting'],
-			upgradeFileUrl: map['UpgradeFileUrl'],
+			inProcess: map['InProcess'],
+			generatePackageJson: map['GeneratePackageJson'],
+			packageLogs: map['PackageLogs'],
+			lastPackageTime: map['LastPackageTime'] != null ? DateTime.parse(map['LastPackageTime']) : null,
 			upgradeInfos: map['UpgradeInfos'] != null ? (map['UpgradeInfos'] as List).map((e)=>DeployRecordUpgradeInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
@@ -195,10 +203,13 @@ class DeployRecordInfoDTO extends BaseDTO{
 			map['ReleasedBy'] = releasedBy;
 		if(internalRecord != null)
 			map['InternalRecord'] = internalRecord;
-		if(upgradeSetting != null)
-			map['UpgradeSetting'] = upgradeSetting;
-		if(upgradeFileUrl != null)
-			map['UpgradeFileUrl'] = upgradeFileUrl;
+		map['InProcess'] = inProcess;
+		if(generatePackageJson != null)
+			map['GeneratePackageJson'] = generatePackageJson;
+		if(packageLogs != null)
+			map['PackageLogs'] = packageLogs;
+		if(lastPackageTime != null)
+			map['LastPackageTime'] = JsonRpcUtils.dateFormat(lastPackageTime!);
 		if(upgradeInfos != null)
 			map['UpgradeInfos'] = upgradeInfos;
 		return map;
@@ -450,4 +461,46 @@ class GeneratePackageRequest {
 	}
 }
 
+class GetPackageRequest {
+	String? deployRecordId;
+
+	GetPackageRequest({
+		this.deployRecordId,
+	});
+
+	factory GetPackageRequest.fromJson(Map<String, dynamic> map) {
+		return GetPackageRequest( 
+			deployRecordId: map['DeployRecordId'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(deployRecordId != null)
+			map['DeployRecordId'] = deployRecordId;
+		return map;
+	}
+}
+
+class CancelPackagingRequest {
+	String? deployRecordId;
+
+	CancelPackagingRequest({
+		this.deployRecordId,
+	});
+
+	factory CancelPackagingRequest.fromJson(Map<String, dynamic> map) {
+		return CancelPackagingRequest( 
+			deployRecordId: map['DeployRecordId'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(deployRecordId != null)
+			map['DeployRecordId'] = deployRecordId;
+		return map;
+	}
+}
+
 

+ 7 - 2
lib/services/device.dart

@@ -402,16 +402,21 @@ class DeviceService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
-	Future<bool> sendCommandToDeviceAsync(SendCommandToDeviceRequest request) async {
+	Future<String> sendCommandToDeviceAsync(SendCommandToDeviceRequest request) async {
 		var rpcRst = await call("SendCommandToDeviceAsync", request);
 		return rpcRst;
 	}
 
-	Future<bool> sendResultToClientAsync(SendResultToClientRequest request) async {
+	Future<String> sendResultToClientAsync(SendResultToClientRequest request) async {
 		var rpcRst = await call("SendResultToClientAsync", request);
 		return rpcRst;
 	}
 
+	Future<String> getResultFromServerAsync(GetResultFromServerRequest request) async {
+		var rpcRst = await call("GetResultFromServerAsync", request);
+		return rpcRst;
+	}
+
 	Future<bool> disconnectRemoteControl(RemoteConnectStautsRequest request) async {
 		var rpcRst = await call("DisconnectRemoteControl", request);
 		return rpcRst;

+ 143 - 0
lib/services/device.m.dart

@@ -3044,6 +3044,124 @@ class ModifyEmergencyDeviceCodeRequest extends TokenRequest{
 	}
 }
 
+class NameItemSettingInfoDTO {
+	String? name;
+	String? key;
+
+	NameItemSettingInfoDTO({
+		this.name,
+		this.key,
+	});
+
+	factory NameItemSettingInfoDTO.fromJson(Map<String, dynamic> map) {
+		return NameItemSettingInfoDTO( 
+			name: map['Name'],
+			key: map['Key'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(name != null)
+			map['Name'] = name;
+		if(key != null)
+			map['Key'] = key;
+		return map;
+	}
+}
+
+class GroupSettingInfoDTO extends NameItemSettingInfoDTO{
+	List<NameItemSettingInfoDTO >? items;
+
+	GroupSettingInfoDTO({
+		this.items,
+		String? name,
+		String? key,
+	}) : super(
+			name: name,
+			key: key,
+		);
+
+	factory GroupSettingInfoDTO.fromJson(Map<String, dynamic> map) {
+		return GroupSettingInfoDTO( 
+			items: map['Items'] != null ? (map['Items'] as List).map((e)=>NameItemSettingInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
+			name: map['Name'],
+			key: map['Key'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(items != null)
+			map['Items'] = items;
+		return map;
+	}
+}
+
+class ListPageSettingInfoDTO extends NameItemSettingInfoDTO{
+	List<GroupSettingInfoDTO >? groups;
+
+	ListPageSettingInfoDTO({
+		this.groups,
+		String? name,
+		String? key,
+	}) : super(
+			name: name,
+			key: key,
+		);
+
+	factory ListPageSettingInfoDTO.fromJson(Map<String, dynamic> map) {
+		return ListPageSettingInfoDTO( 
+			groups: map['Groups'] != null ? (map['Groups'] as List).map((e)=>GroupSettingInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
+			name: map['Name'],
+			key: map['Key'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(groups != null)
+			map['Groups'] = groups;
+		return map;
+	}
+}
+
+class SystemSettingInfoDTO {
+	String? selectedListPageKey;
+	String? selectedGroupKey;
+	List<ListPageSettingInfoDTO >? listPages;
+	String? applyLicenseResult;
+
+	SystemSettingInfoDTO({
+		this.selectedListPageKey,
+		this.selectedGroupKey,
+		this.listPages,
+		this.applyLicenseResult,
+	});
+
+	factory SystemSettingInfoDTO.fromJson(Map<String, dynamic> map) {
+		return SystemSettingInfoDTO( 
+			selectedListPageKey: map['SelectedListPageKey'],
+			selectedGroupKey: map['SelectedGroupKey'],
+			listPages: map['ListPages'] != null ? (map['ListPages'] as List).map((e)=>ListPageSettingInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
+			applyLicenseResult: map['ApplyLicenseResult'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(selectedListPageKey != null)
+			map['SelectedListPageKey'] = selectedListPageKey;
+		if(selectedGroupKey != null)
+			map['SelectedGroupKey'] = selectedGroupKey;
+		if(listPages != null)
+			map['ListPages'] = listPages;
+		if(applyLicenseResult != null)
+			map['ApplyLicenseResult'] = applyLicenseResult;
+		return map;
+	}
+}
+
 class SendCommandToDeviceRequest extends TokenRequest{
 	String? deviceCode;
 	String? actionType;
@@ -3109,6 +3227,31 @@ class SendResultToClientRequest extends TokenRequest{
 	}
 }
 
+class GetResultFromServerRequest extends TokenRequest{
+	String? resultCode;
+
+	GetResultFromServerRequest({
+		this.resultCode,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory GetResultFromServerRequest.fromJson(Map<String, dynamic> map) {
+		return GetResultFromServerRequest( 
+			resultCode: map['ResultCode'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(resultCode != null)
+			map['ResultCode'] = resultCode;
+		return map;
+	}
+}
+
 class RemoteConnectStautsRequest extends TokenRequest{
 	String? userCode;
 

+ 10 - 118
lib/services/notification.m.dart

@@ -119,123 +119,15 @@ class NotificationDTO {
 	}
 }
 
-class NameItemSettingInfoDTO {
-	String? name;
-	String? key;
-
-	NameItemSettingInfoDTO({
-		this.name,
-		this.key,
-	});
-
-	factory NameItemSettingInfoDTO.fromJson(Map<String, dynamic> map) {
-		return NameItemSettingInfoDTO( 
-			name: map['Name'],
-			key: map['Key'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(name != null)
-			map['Name'] = name;
-		if(key != null)
-			map['Key'] = key;
-		return map;
-	}
-}
-
-class GroupSettingInfoDTO extends NameItemSettingInfoDTO{
-	List<NameItemSettingInfoDTO >? items;
-
-	GroupSettingInfoDTO({
-		this.items,
-		String? name,
-		String? key,
-	}) : super(
-			name: name,
-			key: key,
-		);
-
-	factory GroupSettingInfoDTO.fromJson(Map<String, dynamic> map) {
-		return GroupSettingInfoDTO( 
-			items: map['Items'] != null ? (map['Items'] as List).map((e)=>NameItemSettingInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
-			name: map['Name'],
-			key: map['Key'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(items != null)
-			map['Items'] = items;
-		return map;
-	}
-}
-
-class ListPageSettingInfoDTO extends NameItemSettingInfoDTO{
-	List<GroupSettingInfoDTO >? groups;
-
-	ListPageSettingInfoDTO({
-		this.groups,
-		String? name,
-		String? key,
-	}) : super(
-			name: name,
-			key: key,
-		);
-
-	factory ListPageSettingInfoDTO.fromJson(Map<String, dynamic> map) {
-		return ListPageSettingInfoDTO( 
-			groups: map['Groups'] != null ? (map['Groups'] as List).map((e)=>GroupSettingInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
-			name: map['Name'],
-			key: map['Key'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(groups != null)
-			map['Groups'] = groups;
-		return map;
-	}
-}
-
-class SystemSettingInfoDTO {
-	List<ListPageSettingInfoDTO >? listPages;
-	String? applyLicenseResult;
-
-	SystemSettingInfoDTO({
-		this.listPages,
-		this.applyLicenseResult,
-	});
-
-	factory SystemSettingInfoDTO.fromJson(Map<String, dynamic> map) {
-		return SystemSettingInfoDTO( 
-			listPages: map['ListPages'] != null ? (map['ListPages'] as List).map((e)=>ListPageSettingInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
-			applyLicenseResult: map['ApplyLicenseResult'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(listPages != null)
-			map['ListPages'] = listPages;
-		if(applyLicenseResult != null)
-			map['ApplyLicenseResult'] = applyLicenseResult;
-		return map;
-	}
-}
-
 class SendCommandToDeviceNotification extends NotificationDTO{
 	String? actionType;
-	SystemSettingInfoDTO? settings;
+	String? resultCode;
 	String? sender;
 
 	SendCommandToDeviceNotification({
 		NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
 		this.actionType,
-		this.settings,
+		this.resultCode,
 		this.sender,
 		String? code,
 		bool isResponse = false,
@@ -249,7 +141,7 @@ class SendCommandToDeviceNotification extends NotificationDTO{
 		return SendCommandToDeviceNotification( 
 			notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
 			actionType: map['ActionType'],
-			settings: map['Settings'] != null ? SystemSettingInfoDTO.fromJson(map['Settings']) : null,
+			resultCode: map['ResultCode'],
 			sender: map['Sender'],
 			code: map['Code'],
 			isResponse: map['IsResponse'],
@@ -260,8 +152,8 @@ class SendCommandToDeviceNotification extends NotificationDTO{
 		final map = super.toJson();
 		if(actionType != null)
 			map['ActionType'] = actionType;
-		if(settings != null)
-			map['Settings'] = settings;
+		if(resultCode != null)
+			map['ResultCode'] = resultCode;
 		if(sender != null)
 			map['Sender'] = sender;
 		return map;
@@ -269,12 +161,12 @@ class SendCommandToDeviceNotification extends NotificationDTO{
 }
 
 class SendResultToClientNotification extends NotificationDTO{
-	SystemSettingInfoDTO? settings;
+	String? resultCode;
 	String? sender;
 
 	SendResultToClientNotification({
 		NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
-		this.settings,
+		this.resultCode,
 		this.sender,
 		String? code,
 		bool isResponse = false,
@@ -287,7 +179,7 @@ class SendResultToClientNotification extends NotificationDTO{
 	factory SendResultToClientNotification.fromJson(Map<String, dynamic> map) {
 		return SendResultToClientNotification( 
 			notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
-			settings: map['Settings'] != null ? SystemSettingInfoDTO.fromJson(map['Settings']) : null,
+			resultCode: map['ResultCode'],
 			sender: map['Sender'],
 			code: map['Code'],
 			isResponse: map['IsResponse'],
@@ -296,8 +188,8 @@ class SendResultToClientNotification extends NotificationDTO{
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
-		if(settings != null)
-			map['Settings'] = settings;
+		if(resultCode != null)
+			map['ResultCode'] = resultCode;
 		if(sender != null)
 			map['Sender'] = sender;
 		return map;

+ 0 - 25
lib/services/other.m.dart

@@ -1861,31 +1861,6 @@ class TransportAfterSalesCommonRequest {
 	}
 }
 
-class GetDICOMFileFormatNotificationRequest extends TokenRequest{
-	String? receiverId;
-
-	GetDICOMFileFormatNotificationRequest({
-		this.receiverId,
-		String? token,
-	}) : super(
-			token: token,
-		);
-
-	factory GetDICOMFileFormatNotificationRequest.fromJson(Map<String, dynamic> map) {
-		return GetDICOMFileFormatNotificationRequest( 
-			receiverId: map['ReceiverId'],
-			token: map['Token'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(receiverId != null)
-			map['ReceiverId'] = receiverId;
-		return map;
-	}
-}
-
 class ConfirmAssociatedWithAccountRequest extends TokenRequest{
 	String? emailAddress;
 	String? verifyCode;