Browse Source

更新接口

loki.wu 1 year ago
parent
commit
05b1a24b33

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

@@ -101,6 +101,7 @@ enum NotificationTypeEnum {
 	ChangeShareInLiveCourseNotification,
 	CourseEntryNotification,
 	MeetingPendingMemberTimeoutNotification,
+	ConsultationAnswerTimeout,
 }
 
 class NotificationDTO {
@@ -2496,6 +2497,47 @@ class CloseConsolutionHeartRateToDeviceNotification extends NotificationDTO{
 	}
 }
 
+class ConsultationAnswerTimeoutNotification extends NotificationDTO{
+	String? consultationCode;
+	String? userCode;
+	String? userName;
+
+	ConsultationAnswerTimeoutNotification({
+		NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
+		this.consultationCode,
+		this.userCode,
+		this.userName,
+		String? code,
+		bool isResponse = false,
+	}) : super(
+			notificationType: notificationType,
+			code: code,
+			isResponse: isResponse,
+		);
+
+	factory ConsultationAnswerTimeoutNotification.fromJson(Map<String, dynamic> map) {
+		return ConsultationAnswerTimeoutNotification( 
+			notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
+			consultationCode: map['ConsultationCode'],
+			userCode: map['UserCode'],
+			userName: map['UserName'],
+			code: map['Code'],
+			isResponse: map['IsResponse'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(consultationCode != null)
+			map['ConsultationCode'] = consultationCode;
+		if(userCode != null)
+			map['UserCode'] = userCode;
+		if(userName != null)
+			map['UserName'] = userName;
+		return map;
+	}
+}
+
 class ConsultationRemindNotification extends NotificationDTO{
 	String? consultationCode;
 	int countdownTime;

+ 3 - 0
lib/services/notificationdecoder.dart

@@ -157,6 +157,9 @@ class NotificationDecoder {
 		_builders.add(NotificationTypeEnum.CloseConsolutionHeartRateToDeviceNotification,
 				(map) => CloseConsolutionHeartRateToDeviceNotification.fromJson(map));
 
+		_builders.add(NotificationTypeEnum.ConsultationAnswerTimeout,
+				(map) => ConsultationAnswerTimeoutNotification.fromJson(map));
+
 		_builders.add(NotificationTypeEnum.ConsultationRemindNotification,
 				(map) => ConsultationRemindNotification.fromJson(map));
 

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

@@ -4490,6 +4490,31 @@ class DeleteAdminRoleRequest extends TokenRequest{
 	}
 }
 
+class DeleteDeviceRequest extends TokenRequest{
+	String? deviceCode;
+
+	DeleteDeviceRequest({
+		this.deviceCode,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory DeleteDeviceRequest.fromJson(Map<String, dynamic> map) {
+		return DeleteDeviceRequest( 
+			deviceCode: map['DeviceCode'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(deviceCode != null)
+			map['DeviceCode'] = deviceCode;
+		return map;
+	}
+}
+
 class DeleteLogsRequest extends TokenRequest{
 	int daysAgo;
 	String? requestServerHost;

+ 5 - 0
lib/services/remedical.m.dart

@@ -1712,16 +1712,19 @@ class RecordData {
 
 class ReportItem {
 	String? recordCode;
+	String? reportCode;
 	String? fileToken;
 
 	ReportItem({
 		this.recordCode,
+		this.reportCode,
 		this.fileToken,
 	});
 
 	factory ReportItem.fromJson(Map<String, dynamic> map) {
 		return ReportItem( 
 			recordCode: map['RecordCode'],
+			reportCode: map['ReportCode'],
 			fileToken: map['FileToken'],
 		);
 	}
@@ -1730,6 +1733,8 @@ class ReportItem {
 		final map = Map<String, dynamic>();
 		if(recordCode != null)
 			map['RecordCode'] = recordCode;
+		if(reportCode != null)
+			map['ReportCode'] = reportCode;
 		if(fileToken != null)
 			map['FileToken'] = fileToken;
 		return map;

+ 5 - 0
lib/services/report.dart

@@ -300,5 +300,10 @@ class ReportService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
+	Future<bool> saveReportPreviewAsync(FindReportByCodeRequest request) async {
+		var rpcRst = await call("SaveReportPreviewAsync", request);
+		return rpcRst;
+	}
+
 }
 

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

@@ -994,6 +994,7 @@ enum UserMigratoryRoleEnum {
 	Role_CertifiedExpert,
 	Role_CertifiedPhysician,
 	Role_RemoteManager,
+	Role_UnSet,
 }
 
 class UserMigratoryInfo extends UserDTO{