Browse Source

跟新最新接口

loki.wu 1 year ago
parent
commit
ef6c78f537
3 changed files with 20 additions and 5 deletions
  1. 5 5
      lib/services/device.m.dart
  2. 10 0
      lib/services/notification.m.dart
  3. 5 0
      lib/services/patient.dart

+ 5 - 5
lib/services/device.m.dart

@@ -352,14 +352,14 @@ class GetPersonDeviceRequest extends PageRequest{
 	String? keyWord;
 	String? deviceType;
 	String? deviceModel;
-	String? organizationCode;
+	List<String >? organizationCodes;
 	bool? isOnline;
 
 	GetPersonDeviceRequest({
 		this.keyWord,
 		this.deviceType,
 		this.deviceModel,
-		this.organizationCode,
+		this.organizationCodes,
 		this.isOnline,
 		int pageIndex = 0,
 		int pageSize = 0,
@@ -375,7 +375,7 @@ class GetPersonDeviceRequest extends PageRequest{
 			keyWord: map['KeyWord'],
 			deviceType: map['DeviceType'],
 			deviceModel: map['DeviceModel'],
-			organizationCode: map['OrganizationCode'],
+			organizationCodes: map['OrganizationCodes'] != null ? map['OrganizationCodes'].cast<String>().toList() : null,
 			isOnline: map['IsOnline'],
 			pageIndex: map['PageIndex'],
 			pageSize: map['PageSize'],
@@ -391,8 +391,8 @@ class GetPersonDeviceRequest extends PageRequest{
 			map['DeviceType'] = deviceType;
 		if(deviceModel != null)
 			map['DeviceModel'] = deviceModel;
-		if(organizationCode != null)
-			map['OrganizationCode'] = organizationCode;
+		if(organizationCodes != null)
+			map['OrganizationCodes'] = organizationCodes;
 		if(isOnline != null)
 			map['IsOnline'] = isOnline;
 		return map;

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

@@ -1120,6 +1120,7 @@ class ConnectStatusToDeviceNotification extends NotificationDTO{
 	ControlDeviceParameterEnum controlType;
 	TransactionTypeEnum transactionType;
 	LoginSource loginSource;
+	String? deviceCode;
 
 	ConnectStatusToDeviceNotification({
 		NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
@@ -1128,6 +1129,7 @@ class ConnectStatusToDeviceNotification extends NotificationDTO{
 		this.controlType = ControlDeviceParameterEnum.Start,
 		this.transactionType = TransactionTypeEnum.Consultion,
 		this.loginSource = LoginSource.PC,
+		this.deviceCode,
 		String? code,
 		bool isResponse = false,
 	}) : super(
@@ -1144,6 +1146,7 @@ class ConnectStatusToDeviceNotification extends NotificationDTO{
 			controlType: ControlDeviceParameterEnum.values.firstWhere((e) => e.index == map['ControlType']),
 			transactionType: TransactionTypeEnum.values.firstWhere((e) => e.index == map['TransactionType']),
 			loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
+			deviceCode: map['DeviceCode'],
 			code: map['Code'],
 			isResponse: map['IsResponse'],
 		);
@@ -1158,6 +1161,8 @@ class ConnectStatusToDeviceNotification extends NotificationDTO{
 		map['ControlType'] = controlType.index;
 		map['TransactionType'] = transactionType.index;
 		map['LoginSource'] = loginSource.index;
+		if(deviceCode != null)
+			map['DeviceCode'] = deviceCode;
 		return map;
 	}
 }
@@ -3950,10 +3955,12 @@ class PushDevicePatchToDeviceNotification extends NotificationDTO{
 }
 
 class RestartDeviceNotification extends NotificationDTO{
+	String? deviceCode;
 	String? controlUserCode;
 
 	RestartDeviceNotification({
 		NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
+		this.deviceCode,
 		this.controlUserCode,
 		String? code,
 		bool isResponse = false,
@@ -3966,6 +3973,7 @@ class RestartDeviceNotification extends NotificationDTO{
 	factory RestartDeviceNotification.fromJson(Map<String, dynamic> map) {
 		return RestartDeviceNotification( 
 			notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
+			deviceCode: map['DeviceCode'],
 			controlUserCode: map['ControlUserCode'],
 			code: map['Code'],
 			isResponse: map['IsResponse'],
@@ -3974,6 +3982,8 @@ class RestartDeviceNotification extends NotificationDTO{
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
+		if(deviceCode != null)
+			map['DeviceCode'] = deviceCode;
 		if(controlUserCode != null)
 			map['ControlUserCode'] = controlUserCode;
 		return map;

+ 5 - 0
lib/services/patient.dart

@@ -36,6 +36,11 @@ class PatientService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
+	Future<String> createUnregisteredPatientAsync(CreatePatientByUnregisteredRequest request) async {
+		var rpcRst = await call("CreateUnregisteredPatientAsync", request);
+		return rpcRst;
+	}
+
 	Future<bool> updatePatientAsync(UpdatePatientRequest request) async {
 		var rpcRst = await call("UpdatePatientAsync", request);
 		return rpcRst;