Эх сурвалжийг харах

同步Server最新接口变更

loki.wu 2 жил өмнө
parent
commit
48bc7d5c94

+ 6 - 6
lib/services/authentication.m.dart

@@ -999,12 +999,12 @@ enum CustomerRpcCode {
 	ConsultationDBError,
 	NoConsultationInitiator,
 	NotCertifiedPhysician,
-	placeHolder_830,
-	placeHolder_831,
-	placeHolder_832,
-	placeHolder_833,
-	placeHolder_834,
-	placeHolder_835,
+	SaveInitiatorFailed,
+	ApplyerNotOnline,
+	NotConsultationInitiator,
+	ConsultationEnded,
+	ReservationNotReviewed,
+	ConsultationNotInProcess,
 	placeHolder_836,
 	placeHolder_837,
 	placeHolder_838,

+ 7 - 7
lib/services/liveConsultation.m.dart

@@ -466,7 +466,7 @@ class FindAssistantExpertsRequest extends TokenRequest{
 	}
 }
 
-enum ConsultationStatusEnum {
+enum TransactionStatusEnum {
 	placeHolder_0,
 	Applied,
 	Withdrawn,
@@ -486,7 +486,7 @@ enum EvaluateGradeEnum {
 
 class ConsultationPageDTO {
 	String? consultationCode;
-	ConsultationStatusEnum consultationStatus;
+	TransactionStatusEnum consultationStatus;
 	String? patientName;
 	String? phone;
 	String? sex;
@@ -498,7 +498,7 @@ class ConsultationPageDTO {
 
 	ConsultationPageDTO({
 		this.consultationCode,
-		this.consultationStatus = ConsultationStatusEnum.Applied,
+		this.consultationStatus = TransactionStatusEnum.Applied,
 		this.patientName,
 		this.phone,
 		this.sex,
@@ -512,7 +512,7 @@ class ConsultationPageDTO {
 	factory ConsultationPageDTO.fromJson(Map<String, dynamic> map) {
 		return ConsultationPageDTO( 
 			consultationCode: map['ConsultationCode'],
-			consultationStatus: ConsultationStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
+			consultationStatus: TransactionStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
 			patientName: map['PatientName'],
 			phone: map['Phone'],
 			sex: map['Sex'],
@@ -849,7 +849,7 @@ class ConsultationDetailDTO {
 	DateTime? createTime;
 	DateTime? consultationTime;
 	DateTime? consultationTimeEnd;
-	ConsultationStatusEnum consultationStatus;
+	TransactionStatusEnum consultationStatus;
 	String? applyOrganizationName;
 	String? applyUserName;
 	String? operateUserName;
@@ -889,7 +889,7 @@ class ConsultationDetailDTO {
 		this.createTime,
 		this.consultationTime,
 		this.consultationTimeEnd,
-		this.consultationStatus = ConsultationStatusEnum.Applied,
+		this.consultationStatus = TransactionStatusEnum.Applied,
 		this.applyOrganizationName,
 		this.applyUserName,
 		this.operateUserName,
@@ -931,7 +931,7 @@ class ConsultationDetailDTO {
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
 			consultationTimeEnd: map['ConsultationTimeEnd'] != null ? DateTime.parse(map['ConsultationTimeEnd']) : null,
-			consultationStatus: ConsultationStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
+			consultationStatus: TransactionStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
 			applyOrganizationName: map['ApplyOrganizationName'],
 			applyUserName: map['ApplyUserName'],
 			operateUserName: map['OperateUserName'],

+ 5 - 0
lib/services/login.dart

@@ -78,5 +78,10 @@ class LoginService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
+	Future<String> generateNewPasswordAsync(GenerateNewPasswordRequest request) async {
+		var rpcRst = await call("GenerateNewPasswordAsync", request);
+		return rpcRst;
+	}
+
 }
 

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

@@ -1,5 +1,6 @@
 import 'authentication.m.dart';
 import 'notification.m.dart';
+import 'liveConsultation.m.dart';
 
 enum LoginStateEnum {
 	Succeed,
@@ -367,4 +368,24 @@ class ModifyPasswordRequest extends CommonSignUpRequest{
 	}
 }
 
+class GenerateNewPasswordRequest extends TokenRequest{
+
+	GenerateNewPasswordRequest({
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory GenerateNewPasswordRequest.fromJson(Map<String, dynamic> map) {
+		return GenerateNewPasswordRequest( 
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		return map;
+	}
+}
+
 

+ 26 - 13
lib/services/masterInteractionCenter.m.dart

@@ -32,6 +32,7 @@ class OperationLogDTO {
 	DateTime? createTime;
 	String? code;
 	String? sourceUrl;
+	bool isSimple;
 
 	OperationLogDTO({
 		this.id = 0,
@@ -42,6 +43,7 @@ class OperationLogDTO {
 		this.createTime,
 		this.code,
 		this.sourceUrl,
+		this.isSimple = false,
 	});
 
 	factory OperationLogDTO.fromJson(Map<String, dynamic> map) {
@@ -54,6 +56,7 @@ class OperationLogDTO {
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			code: map['Code'],
 			sourceUrl: map['SourceUrl'],
+			isSimple: map['IsSimple'],
 		);
 	}
 
@@ -73,6 +76,7 @@ class OperationLogDTO {
 			map['Code'] = code;
 		if(sourceUrl != null)
 			map['SourceUrl'] = sourceUrl;
+		map['IsSimple'] = isSimple;
 		return map;
 	}
 }
@@ -132,6 +136,7 @@ class SyncOpLogToMasterRequest {
 	String? sourceUrl;
 	String? code;
 	String? serverID;
+	bool isSimple;
 
 	SyncOpLogToMasterRequest({
 		this.collectionName,
@@ -142,6 +147,7 @@ class SyncOpLogToMasterRequest {
 		this.sourceUrl,
 		this.code,
 		this.serverID,
+		this.isSimple = false,
 	});
 
 	factory SyncOpLogToMasterRequest.fromJson(Map<String, dynamic> map) {
@@ -154,6 +160,7 @@ class SyncOpLogToMasterRequest {
 			sourceUrl: map['SourceUrl'],
 			code: map['Code'],
 			serverID: map['ServerID'],
+			isSimple: map['IsSimple'],
 		);
 	}
 
@@ -174,23 +181,29 @@ class SyncOpLogToMasterRequest {
 			map['Code'] = code;
 		if(serverID != null)
 			map['ServerID'] = serverID;
+		map['IsSimple'] = isSimple;
 		return map;
 	}
 }
 
 enum SyncTypeEnum {
-	InitiateLiveConsultation,
-	AcceptLiveConsultation,
-	RejectLiveConsultation,
-	CancelInitiatorLiveConsultation,
-	LeaveLiveConsultation,
-	CloseLiveConsultation,
-	MuteLiveConsultation,
-	SwitchLiveConsultationVideo,
-	JoinLiveConsultation,
-	NewworkErrLiveConsultation,
-	CancelInvitingInLiveConsultation,
-	InviteInLiveConsultation,
+	Initiate,
+	Accept,
+	Reject,
+	CancelInitiate,
+	HeartRateJoin,
+	NetworkErr,
+	HeartRateLeave,
+	Leave,
+	Close,
+	ChangeMuteState,
+	ChangeVideoOpenState,
+	InviteIn,
+	CancelInviteIn,
+	AcceptIn,
+	RejectIn,
+	ChangeConsultationStatus,
+	Agree,
 }
 
 class SyncReceiveServiceDataRequest {
@@ -201,7 +214,7 @@ class SyncReceiveServiceDataRequest {
 	String? serverID;
 
 	SyncReceiveServiceDataRequest({
-		this.syncType = SyncTypeEnum.InitiateLiveConsultation,
+		this.syncType = SyncTypeEnum.Initiate,
 		this.serviceDataJson,
 		this.oplogs,
 		this.sourceUrl,

+ 321 - 65
lib/services/notification.m.dart

@@ -28,6 +28,12 @@ enum NotificationTypeEnum {
 	InviteeConsultationNotification,
 	InviteeApproveApplyConsultationNotification,
 	InviteeRejectApplyConsultationNotification,
+	MuteLiveConsultationNotification,
+	SwitchLiveConsultationVideoNotification,
+	HeartRateJoinConsultationNotification,
+	HeartRateLeaveConsultationNotification,
+	CloseLiveConsultationToDeviceNotification,
+	CancelLiveConsultationToDeviceNotification,
 }
 
 enum ChatCmdEnum {
@@ -197,25 +203,31 @@ class TokenReplacedNotification {
 class ApplyConsultationNotification {
 	NotificationTypeEnum notificationType;
 	String? consultationCode;
-	String? applicantName;
+	String? operatorName;
 	String? patientName;
 	DateTime? applicationTime;
+	String? applyOrganizationName;
+	DateTime? consultationTime;
 
 	ApplyConsultationNotification({
 		this.notificationType = NotificationTypeEnum.ChatMsgNotification,
 		this.consultationCode,
-		this.applicantName,
+		this.operatorName,
 		this.patientName,
 		this.applicationTime,
+		this.applyOrganizationName,
+		this.consultationTime,
 	});
 
 	factory ApplyConsultationNotification.fromJson(Map<String, dynamic> map) {
 		return ApplyConsultationNotification( 
 			notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
 			consultationCode: map['ConsultationCode'],
-			applicantName: map['ApplicantName'],
+			operatorName: map['OperatorName'],
 			patientName: map['PatientName'],
 			applicationTime: map['ApplicationTime'] != null ? DateTime.parse(map['ApplicationTime']) : null,
+			applyOrganizationName: map['ApplyOrganizationName'],
+			consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
 		);
 	}
 
@@ -224,12 +236,16 @@ class ApplyConsultationNotification {
 		map['NotificationType'] = notificationType.index;
 		if(consultationCode != null)
 			map['ConsultationCode'] = consultationCode;
-		if(applicantName != null)
-			map['ApplicantName'] = applicantName;
+		if(operatorName != null)
+			map['OperatorName'] = operatorName;
 		if(patientName != null)
 			map['PatientName'] = patientName;
 		if(applicationTime != null)
 			map['ApplicationTime'] = JsonRpcUtils.dateFormat(applicationTime!);
+		if(applyOrganizationName != null)
+			map['ApplyOrganizationName'] = applyOrganizationName;
+		if(consultationTime != null)
+			map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
 		return map;
 	}
 }
@@ -749,6 +765,199 @@ class CloseLiveConsultationNotification {
 	}
 }
 
+class CancelLiveConsultationToDeviceNotification {
+	NotificationTypeEnum notificationType;
+	String? consultationCode;
+	String? initiatorCode;
+
+	CancelLiveConsultationToDeviceNotification({
+		this.notificationType = NotificationTypeEnum.ChatMsgNotification,
+		this.consultationCode,
+		this.initiatorCode,
+	});
+
+	factory CancelLiveConsultationToDeviceNotification.fromJson(Map<String, dynamic> map) {
+		return CancelLiveConsultationToDeviceNotification( 
+			notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
+			consultationCode: map['ConsultationCode'],
+			initiatorCode: map['InitiatorCode'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		map['NotificationType'] = notificationType.index;
+		if(consultationCode != null)
+			map['ConsultationCode'] = consultationCode;
+		if(initiatorCode != null)
+			map['InitiatorCode'] = initiatorCode;
+		return map;
+	}
+}
+
+class CloseLiveConsultationToDeviceNotification {
+	NotificationTypeEnum notificationType;
+	String? consultationCode;
+	String? initiatorCode;
+
+	CloseLiveConsultationToDeviceNotification({
+		this.notificationType = NotificationTypeEnum.ChatMsgNotification,
+		this.consultationCode,
+		this.initiatorCode,
+	});
+
+	factory CloseLiveConsultationToDeviceNotification.fromJson(Map<String, dynamic> map) {
+		return CloseLiveConsultationToDeviceNotification( 
+			notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
+			consultationCode: map['ConsultationCode'],
+			initiatorCode: map['InitiatorCode'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		map['NotificationType'] = notificationType.index;
+		if(consultationCode != null)
+			map['ConsultationCode'] = consultationCode;
+		if(initiatorCode != null)
+			map['InitiatorCode'] = initiatorCode;
+		return map;
+	}
+}
+
+class LiveConsultationJoinerInfo extends LiveConsultationMemberInfo{
+	bool isOnline;
+	bool mute;
+	bool isInitiator;
+	LoginSource loginSource;
+	LiveData? liveData;
+
+	LiveConsultationJoinerInfo({
+		this.isOnline = false,
+		this.mute = false,
+		this.isInitiator = false,
+		this.loginSource = LoginSource.PC,
+		this.liveData,
+		String? id,
+		String? name,
+		String? headImageUrl,
+	}) : super(
+			id: id,
+			name: name,
+			headImageUrl: headImageUrl,
+		);
+
+	factory LiveConsultationJoinerInfo.fromJson(Map<String, dynamic> map) {
+		return LiveConsultationJoinerInfo( 
+			isOnline: map['IsOnline'],
+			mute: map['Mute'],
+			isInitiator: map['IsInitiator'],
+			loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
+			liveData: map['LiveData'] != null ? LiveData.fromJson(map['LiveData']) : null,
+			id: map['Id'],
+			name: map['Name'],
+			headImageUrl: map['HeadImageUrl'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		map['IsOnline'] = isOnline;
+		map['Mute'] = mute;
+		map['IsInitiator'] = isInitiator;
+		map['LoginSource'] = loginSource.index;
+		if(liveData != null)
+			map['LiveData'] = liveData;
+		return map;
+	}
+}
+
+class HeartRateJoinConsultationNotification {
+	NotificationTypeEnum notificationType;
+	String? consultationCode;
+	LiveConsultationJoinerInfo? joiner;
+
+	HeartRateJoinConsultationNotification({
+		this.notificationType = NotificationTypeEnum.ChatMsgNotification,
+		this.consultationCode,
+		this.joiner,
+	});
+
+	factory HeartRateJoinConsultationNotification.fromJson(Map<String, dynamic> map) {
+		return HeartRateJoinConsultationNotification( 
+			notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
+			consultationCode: map['ConsultationCode'],
+			joiner: map['Joiner'] != null ? LiveConsultationJoinerInfo.fromJson(map['Joiner']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		map['NotificationType'] = notificationType.index;
+		if(consultationCode != null)
+			map['ConsultationCode'] = consultationCode;
+		if(joiner != null)
+			map['Joiner'] = joiner;
+		return map;
+	}
+}
+
+class LiveConsultationLeaverInfo extends LiveConsultationMemberInfo{
+
+	LiveConsultationLeaverInfo({
+		String? id,
+		String? name,
+		String? headImageUrl,
+	}) : super(
+			id: id,
+			name: name,
+			headImageUrl: headImageUrl,
+		);
+
+	factory LiveConsultationLeaverInfo.fromJson(Map<String, dynamic> map) {
+		return LiveConsultationLeaverInfo( 
+			id: map['Id'],
+			name: map['Name'],
+			headImageUrl: map['HeadImageUrl'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		return map;
+	}
+}
+
+class HeartRateLeaveConsultationNotification {
+	NotificationTypeEnum notificationType;
+	String? consultationCode;
+	LiveConsultationLeaverInfo? leaverInfo;
+
+	HeartRateLeaveConsultationNotification({
+		this.notificationType = NotificationTypeEnum.ChatMsgNotification,
+		this.consultationCode,
+		this.leaverInfo,
+	});
+
+	factory HeartRateLeaveConsultationNotification.fromJson(Map<String, dynamic> map) {
+		return HeartRateLeaveConsultationNotification( 
+			notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
+			consultationCode: map['ConsultationCode'],
+			leaverInfo: map['LeaverInfo'] != null ? LiveConsultationLeaverInfo.fromJson(map['LeaverInfo']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		map['NotificationType'] = notificationType.index;
+		if(consultationCode != null)
+			map['ConsultationCode'] = consultationCode;
+		if(leaverInfo != null)
+			map['LeaverInfo'] = leaverInfo;
+		return map;
+	}
+}
+
 enum LiveMemberEnum {
 	placeHolder_0,
 	User,
@@ -969,53 +1178,6 @@ class InviteInLiveConsultationNotification {
 	}
 }
 
-class LiveConsultationJoinerInfo extends LiveConsultationMemberInfo{
-	bool isOnline;
-	bool mute;
-	bool isInitiator;
-	LoginSource loginSource;
-	LiveData? liveData;
-
-	LiveConsultationJoinerInfo({
-		this.isOnline = false,
-		this.mute = false,
-		this.isInitiator = false,
-		this.loginSource = LoginSource.PC,
-		this.liveData,
-		String? id,
-		String? name,
-		String? headImageUrl,
-	}) : super(
-			id: id,
-			name: name,
-			headImageUrl: headImageUrl,
-		);
-
-	factory LiveConsultationJoinerInfo.fromJson(Map<String, dynamic> map) {
-		return LiveConsultationJoinerInfo( 
-			isOnline: map['IsOnline'],
-			mute: map['Mute'],
-			isInitiator: map['IsInitiator'],
-			loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
-			liveData: map['LiveData'] != null ? LiveData.fromJson(map['LiveData']) : null,
-			id: map['Id'],
-			name: map['Name'],
-			headImageUrl: map['HeadImageUrl'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		map['IsOnline'] = isOnline;
-		map['Mute'] = mute;
-		map['IsInitiator'] = isInitiator;
-		map['LoginSource'] = loginSource.index;
-		if(liveData != null)
-			map['LiveData'] = liveData;
-		return map;
-	}
-}
-
 class JoinInLiveConsultationNotification {
 	NotificationTypeEnum notificationType;
 	String? consultationCode;
@@ -1192,9 +1354,39 @@ class JoinLiveConsultationNotification {
 	}
 }
 
-class LiveConsultationLeaverInfo extends LiveConsultationMemberInfo{
+class LeaveLiveConsultationNotification {
+	NotificationTypeEnum notificationType;
+	String? consultationCode;
+	LiveConsultationLeaverInfo? leaverInfo;
 
-	LiveConsultationLeaverInfo({
+	LeaveLiveConsultationNotification({
+		this.notificationType = NotificationTypeEnum.ChatMsgNotification,
+		this.consultationCode,
+		this.leaverInfo,
+	});
+
+	factory LeaveLiveConsultationNotification.fromJson(Map<String, dynamic> map) {
+		return LeaveLiveConsultationNotification( 
+			notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
+			consultationCode: map['ConsultationCode'],
+			leaverInfo: map['LeaverInfo'] != null ? LiveConsultationLeaverInfo.fromJson(map['LeaverInfo']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		map['NotificationType'] = notificationType.index;
+		if(consultationCode != null)
+			map['ConsultationCode'] = consultationCode;
+		if(leaverInfo != null)
+			map['LeaverInfo'] = leaverInfo;
+		return map;
+	}
+}
+
+class LiveConsultationMuterInfo extends LiveConsultationMemberInfo{
+
+	LiveConsultationMuterInfo({
 		String? id,
 		String? name,
 		String? headImageUrl,
@@ -1204,8 +1396,8 @@ class LiveConsultationLeaverInfo extends LiveConsultationMemberInfo{
 			headImageUrl: headImageUrl,
 		);
 
-	factory LiveConsultationLeaverInfo.fromJson(Map<String, dynamic> map) {
-		return LiveConsultationLeaverInfo( 
+	factory LiveConsultationMuterInfo.fromJson(Map<String, dynamic> map) {
+		return LiveConsultationMuterInfo( 
 			id: map['Id'],
 			name: map['Name'],
 			headImageUrl: map['HeadImageUrl'],
@@ -1218,22 +1410,25 @@ class LiveConsultationLeaverInfo extends LiveConsultationMemberInfo{
 	}
 }
 
-class LeaveLiveConsultationNotification {
+class MuteLiveConsultationNotification {
 	NotificationTypeEnum notificationType;
 	String? consultationCode;
-	LiveConsultationLeaverInfo? leaverInfo;
+	bool mute;
+	LiveConsultationMuterInfo? muterInfo;
 
-	LeaveLiveConsultationNotification({
+	MuteLiveConsultationNotification({
 		this.notificationType = NotificationTypeEnum.ChatMsgNotification,
 		this.consultationCode,
-		this.leaverInfo,
+		this.mute = false,
+		this.muterInfo,
 	});
 
-	factory LeaveLiveConsultationNotification.fromJson(Map<String, dynamic> map) {
-		return LeaveLiveConsultationNotification( 
+	factory MuteLiveConsultationNotification.fromJson(Map<String, dynamic> map) {
+		return MuteLiveConsultationNotification( 
 			notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
 			consultationCode: map['ConsultationCode'],
-			leaverInfo: map['LeaverInfo'] != null ? LiveConsultationLeaverInfo.fromJson(map['LeaverInfo']) : null,
+			mute: map['Mute'],
+			muterInfo: map['MuterInfo'] != null ? LiveConsultationMuterInfo.fromJson(map['MuterInfo']) : null,
 		);
 	}
 
@@ -1242,8 +1437,9 @@ class LeaveLiveConsultationNotification {
 		map['NotificationType'] = notificationType.index;
 		if(consultationCode != null)
 			map['ConsultationCode'] = consultationCode;
-		if(leaverInfo != null)
-			map['LeaverInfo'] = leaverInfo;
+		map['Mute'] = mute;
+		if(muterInfo != null)
+			map['MuterInfo'] = muterInfo;
 		return map;
 	}
 }
@@ -1334,4 +1530,64 @@ class RejectLiveConsultationNotification {
 	}
 }
 
+class LiveConsultationSwitcherInfo extends LiveConsultationMemberInfo{
+
+	LiveConsultationSwitcherInfo({
+		String? id,
+		String? name,
+		String? headImageUrl,
+	}) : super(
+			id: id,
+			name: name,
+			headImageUrl: headImageUrl,
+		);
+
+	factory LiveConsultationSwitcherInfo.fromJson(Map<String, dynamic> map) {
+		return LiveConsultationSwitcherInfo( 
+			id: map['Id'],
+			name: map['Name'],
+			headImageUrl: map['HeadImageUrl'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		return map;
+	}
+}
+
+class SwitchLiveConsultationVideoNotification {
+	NotificationTypeEnum notificationType;
+	String? consultationCode;
+	bool opened;
+	LiveConsultationSwitcherInfo? switcherInfo;
+
+	SwitchLiveConsultationVideoNotification({
+		this.notificationType = NotificationTypeEnum.ChatMsgNotification,
+		this.consultationCode,
+		this.opened = false,
+		this.switcherInfo,
+	});
+
+	factory SwitchLiveConsultationVideoNotification.fromJson(Map<String, dynamic> map) {
+		return SwitchLiveConsultationVideoNotification( 
+			notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
+			consultationCode: map['ConsultationCode'],
+			opened: map['Opened'],
+			switcherInfo: map['SwitcherInfo'] != null ? LiveConsultationSwitcherInfo.fromJson(map['SwitcherInfo']) : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		map['NotificationType'] = notificationType.index;
+		if(consultationCode != null)
+			map['ConsultationCode'] = consultationCode;
+		map['Opened'] = opened;
+		if(switcherInfo != null)
+			map['SwitcherInfo'] = switcherInfo;
+		return map;
+	}
+}
+
 

+ 18 - 0
lib/services/notificationdecoder.dart

@@ -70,6 +70,18 @@ class NotificationDecoder {
 		_builders.add(NotificationTypeEnum.CloseLiveConsultationNotification,
 				(map) => CloseLiveConsultationNotification.fromJson(map));
 
+		_builders.add(NotificationTypeEnum.CancelLiveConsultationToDeviceNotification,
+				(map) => CancelLiveConsultationToDeviceNotification.fromJson(map));
+
+		_builders.add(NotificationTypeEnum.CloseLiveConsultationToDeviceNotification,
+				(map) => CloseLiveConsultationToDeviceNotification.fromJson(map));
+
+		_builders.add(NotificationTypeEnum.HeartRateJoinConsultationNotification,
+				(map) => HeartRateJoinConsultationNotification.fromJson(map));
+
+		_builders.add(NotificationTypeEnum.HeartRateLeaveConsultationNotification,
+				(map) => HeartRateLeaveConsultationNotification.fromJson(map));
+
 		_builders.add(NotificationTypeEnum.InviteLiveConsultationNotification,
 				(map) => InviteLiveConsultationNotification.fromJson(map));
 
@@ -91,12 +103,18 @@ class NotificationDecoder {
 		_builders.add(NotificationTypeEnum.LeaveConsultationNotification,
 				(map) => LeaveLiveConsultationNotification.fromJson(map));
 
+		_builders.add(NotificationTypeEnum.MuteLiveConsultationNotification,
+				(map) => MuteLiveConsultationNotification.fromJson(map));
+
 		_builders.add(NotificationTypeEnum.NetworkErrConsultationNotification,
 				(map) => NetworkErrConsultationNotification.fromJson(map));
 
 		_builders.add(NotificationTypeEnum.RejectLiveConsultationNotification,
 				(map) => RejectLiveConsultationNotification.fromJson(map));
 
+		_builders.add(NotificationTypeEnum.SwitchLiveConsultationVideoNotification,
+				(map) => SwitchLiveConsultationVideoNotification.fromJson(map));
+
 	}
 }
 

+ 114 - 264
lib/services/other.m.dart

@@ -5208,13 +5208,20 @@ class ThesaurusItemRequest extends TokenRequest{
 	}
 }
 
+enum GradingConfigTypeEnum {
+	Switch,
+	Text,
+}
+
 class UpdateGradingProtectionConfigEnableRequest extends TokenRequest{
 	List<String >? codes;
-	bool enable;
+	GradingConfigTypeEnum configType;
+	String? value;
 
 	UpdateGradingProtectionConfigEnableRequest({
 		this.codes,
-		this.enable = false,
+		this.configType = GradingConfigTypeEnum.Switch,
+		this.value,
 		String? token,
 	}) : super(
 			token: token,
@@ -5223,7 +5230,8 @@ class UpdateGradingProtectionConfigEnableRequest extends TokenRequest{
 	factory UpdateGradingProtectionConfigEnableRequest.fromJson(Map<String, dynamic> map) {
 		return UpdateGradingProtectionConfigEnableRequest( 
 			codes: map['Codes'] != null ? map['Codes'].cast<String>().toList() : null,
-			enable: map['Enable'],
+			configType: GradingConfigTypeEnum.values.firstWhere((e) => e.index == map['ConfigType']),
+			value: map['Value'],
 			token: map['Token'],
 		);
 	}
@@ -5232,7 +5240,9 @@ class UpdateGradingProtectionConfigEnableRequest extends TokenRequest{
 		final map = super.toJson();
 		if(codes != null)
 			map['Codes'] = codes;
-		map['Enable'] = enable;
+		map['ConfigType'] = configType.index;
+		if(value != null)
+			map['Value'] = value;
 		return map;
 	}
 }
@@ -5295,8 +5305,10 @@ class BaseLiveConsultationJson {
 }
 
 class InitiateLiveConsultationJson extends BaseLiveConsultationJson{
+	int integerRoomId;
 
 	InitiateLiveConsultationJson({
+		this.integerRoomId = 0,
 		String? roomCode,
 		String? consultationRecordCode,
 		String? operatorCode,
@@ -5310,6 +5322,7 @@ class InitiateLiveConsultationJson extends BaseLiveConsultationJson{
 
 	factory InitiateLiveConsultationJson.fromJson(Map<String, dynamic> map) {
 		return InitiateLiveConsultationJson( 
+			integerRoomId: map['IntegerRoomId'],
 			roomCode: map['RoomCode'],
 			consultationRecordCode: map['ConsultationRecordCode'],
 			operatorCode: map['OperatorCode'],
@@ -5319,129 +5332,16 @@ class InitiateLiveConsultationJson extends BaseLiveConsultationJson{
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
+		map['IntegerRoomId'] = integerRoomId;
 		return map;
 	}
 }
 
-class AcceptLiveConsultationJson extends BaseLiveConsultationJson{
-
-	AcceptLiveConsultationJson({
-		String? roomCode,
-		String? consultationRecordCode,
-		String? operatorCode,
-		String? initatorCode,
-	}) : super(
-			roomCode: roomCode,
-			consultationRecordCode: consultationRecordCode,
-			operatorCode: operatorCode,
-			initatorCode: initatorCode,
-		);
-
-	factory AcceptLiveConsultationJson.fromJson(Map<String, dynamic> map) {
-		return AcceptLiveConsultationJson( 
-			roomCode: map['RoomCode'],
-			consultationRecordCode: map['ConsultationRecordCode'],
-			operatorCode: map['OperatorCode'],
-			initatorCode: map['InitatorCode'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		return map;
-	}
-}
-
-class RejectLiveConsultationJson extends BaseLiveConsultationJson{
-
-	RejectLiveConsultationJson({
-		String? roomCode,
-		String? consultationRecordCode,
-		String? operatorCode,
-		String? initatorCode,
-	}) : super(
-			roomCode: roomCode,
-			consultationRecordCode: consultationRecordCode,
-			operatorCode: operatorCode,
-			initatorCode: initatorCode,
-		);
-
-	factory RejectLiveConsultationJson.fromJson(Map<String, dynamic> map) {
-		return RejectLiveConsultationJson( 
-			roomCode: map['RoomCode'],
-			consultationRecordCode: map['ConsultationRecordCode'],
-			operatorCode: map['OperatorCode'],
-			initatorCode: map['InitatorCode'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		return map;
-	}
-}
-
-class CancelInitiatorLiveConsultationJson extends BaseLiveConsultationJson{
-
-	CancelInitiatorLiveConsultationJson({
-		String? roomCode,
-		String? consultationRecordCode,
-		String? operatorCode,
-		String? initatorCode,
-	}) : super(
-			roomCode: roomCode,
-			consultationRecordCode: consultationRecordCode,
-			operatorCode: operatorCode,
-			initatorCode: initatorCode,
-		);
-
-	factory CancelInitiatorLiveConsultationJson.fromJson(Map<String, dynamic> map) {
-		return CancelInitiatorLiveConsultationJson( 
-			roomCode: map['RoomCode'],
-			consultationRecordCode: map['ConsultationRecordCode'],
-			operatorCode: map['OperatorCode'],
-			initatorCode: map['InitatorCode'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		return map;
-	}
-}
-
-class CloseLiveConsultationJson extends BaseLiveConsultationJson{
-
-	CloseLiveConsultationJson({
-		String? roomCode,
-		String? consultationRecordCode,
-		String? operatorCode,
-		String? initatorCode,
-	}) : super(
-			roomCode: roomCode,
-			consultationRecordCode: consultationRecordCode,
-			operatorCode: operatorCode,
-			initatorCode: initatorCode,
-		);
-
-	factory CloseLiveConsultationJson.fromJson(Map<String, dynamic> map) {
-		return CloseLiveConsultationJson( 
-			roomCode: map['RoomCode'],
-			consultationRecordCode: map['ConsultationRecordCode'],
-			operatorCode: map['OperatorCode'],
-			initatorCode: map['InitatorCode'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		return map;
-	}
-}
-
-class JoinLiveConsultationJson extends BaseLiveConsultationJson{
+class MuteLiveConsultationJson extends BaseLiveConsultationJson{
+	bool mute;
 
-	JoinLiveConsultationJson({
+	MuteLiveConsultationJson({
+		this.mute = false,
 		String? roomCode,
 		String? consultationRecordCode,
 		String? operatorCode,
@@ -5453,8 +5353,9 @@ class JoinLiveConsultationJson extends BaseLiveConsultationJson{
 			initatorCode: initatorCode,
 		);
 
-	factory JoinLiveConsultationJson.fromJson(Map<String, dynamic> map) {
-		return JoinLiveConsultationJson( 
+	factory MuteLiveConsultationJson.fromJson(Map<String, dynamic> map) {
+		return MuteLiveConsultationJson( 
+			mute: map['Mute'],
 			roomCode: map['RoomCode'],
 			consultationRecordCode: map['ConsultationRecordCode'],
 			operatorCode: map['OperatorCode'],
@@ -5464,13 +5365,16 @@ class JoinLiveConsultationJson extends BaseLiveConsultationJson{
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
+		map['Mute'] = mute;
 		return map;
 	}
 }
 
-class NetworkErrLiveConsultationJson extends BaseLiveConsultationJson{
+class SwitchLiveConsultationVideoJson extends BaseLiveConsultationJson{
+	bool videoOpend;
 
-	NetworkErrLiveConsultationJson({
+	SwitchLiveConsultationVideoJson({
+		this.videoOpend = false,
 		String? roomCode,
 		String? consultationRecordCode,
 		String? operatorCode,
@@ -5482,8 +5386,9 @@ class NetworkErrLiveConsultationJson extends BaseLiveConsultationJson{
 			initatorCode: initatorCode,
 		);
 
-	factory NetworkErrLiveConsultationJson.fromJson(Map<String, dynamic> map) {
-		return NetworkErrLiveConsultationJson( 
+	factory SwitchLiveConsultationVideoJson.fromJson(Map<String, dynamic> map) {
+		return SwitchLiveConsultationVideoJson( 
+			videoOpend: map['VideoOpend'],
 			roomCode: map['RoomCode'],
 			consultationRecordCode: map['ConsultationRecordCode'],
 			operatorCode: map['OperatorCode'],
@@ -5493,13 +5398,16 @@ class NetworkErrLiveConsultationJson extends BaseLiveConsultationJson{
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
+		map['VideoOpend'] = videoOpend;
 		return map;
 	}
 }
 
-class LeaveLiveConsultationJson extends BaseLiveConsultationJson{
+class ChangeConsultationStatusJson extends BaseLiveConsultationJson{
+	TransactionStatusEnum status;
 
-	LeaveLiveConsultationJson({
+	ChangeConsultationStatusJson({
+		this.status = TransactionStatusEnum.Applied,
 		String? roomCode,
 		String? consultationRecordCode,
 		String? operatorCode,
@@ -5511,8 +5419,9 @@ class LeaveLiveConsultationJson extends BaseLiveConsultationJson{
 			initatorCode: initatorCode,
 		);
 
-	factory LeaveLiveConsultationJson.fromJson(Map<String, dynamic> map) {
-		return LeaveLiveConsultationJson( 
+	factory ChangeConsultationStatusJson.fromJson(Map<String, dynamic> map) {
+		return ChangeConsultationStatusJson( 
+			status: TransactionStatusEnum.values.firstWhere((e) => e.index == map['Status']),
 			roomCode: map['RoomCode'],
 			consultationRecordCode: map['ConsultationRecordCode'],
 			operatorCode: map['OperatorCode'],
@@ -5522,15 +5431,16 @@ class LeaveLiveConsultationJson extends BaseLiveConsultationJson{
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
+		map['Status'] = status.index;
 		return map;
 	}
 }
 
-class MuteLiveConsultationJson extends BaseLiveConsultationJson{
-	bool mute;
+class InviteInLiveConsultationJson extends BaseLiveConsultationJson{
+	List<String >? userCodes;
 
-	MuteLiveConsultationJson({
-		this.mute = false,
+	InviteInLiveConsultationJson({
+		this.userCodes,
 		String? roomCode,
 		String? consultationRecordCode,
 		String? operatorCode,
@@ -5542,9 +5452,9 @@ class MuteLiveConsultationJson extends BaseLiveConsultationJson{
 			initatorCode: initatorCode,
 		);
 
-	factory MuteLiveConsultationJson.fromJson(Map<String, dynamic> map) {
-		return MuteLiveConsultationJson( 
-			mute: map['Mute'],
+	factory InviteInLiveConsultationJson.fromJson(Map<String, dynamic> map) {
+		return InviteInLiveConsultationJson( 
+			userCodes: map['UserCodes'] != null ? map['UserCodes'].cast<String>().toList() : null,
 			roomCode: map['RoomCode'],
 			consultationRecordCode: map['ConsultationRecordCode'],
 			operatorCode: map['OperatorCode'],
@@ -5554,16 +5464,17 @@ class MuteLiveConsultationJson extends BaseLiveConsultationJson{
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
-		map['Mute'] = mute;
+		if(userCodes != null)
+			map['UserCodes'] = userCodes;
 		return map;
 	}
 }
 
-class SwitchLiveConsultationVideoJson extends BaseLiveConsultationJson{
-	bool videoOpend;
+class CancelInviteInLiveConsultationJson extends BaseLiveConsultationJson{
+	List<String >? userCodes;
 
-	SwitchLiveConsultationVideoJson({
-		this.videoOpend = false,
+	CancelInviteInLiveConsultationJson({
+		this.userCodes,
 		String? roomCode,
 		String? consultationRecordCode,
 		String? operatorCode,
@@ -5575,9 +5486,9 @@ class SwitchLiveConsultationVideoJson extends BaseLiveConsultationJson{
 			initatorCode: initatorCode,
 		);
 
-	factory SwitchLiveConsultationVideoJson.fromJson(Map<String, dynamic> map) {
-		return SwitchLiveConsultationVideoJson( 
-			videoOpend: map['VideoOpend'],
+	factory CancelInviteInLiveConsultationJson.fromJson(Map<String, dynamic> map) {
+		return CancelInviteInLiveConsultationJson( 
+			userCodes: map['UserCodes'] != null ? map['UserCodes'].cast<String>().toList() : null,
 			roomCode: map['RoomCode'],
 			consultationRecordCode: map['ConsultationRecordCode'],
 			operatorCode: map['OperatorCode'],
@@ -5587,7 +5498,8 @@ class SwitchLiveConsultationVideoJson extends BaseLiveConsultationJson{
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
-		map['VideoOpend'] = videoOpend;
+		if(userCodes != null)
+			map['UserCodes'] = userCodes;
 		return map;
 	}
 }
@@ -5612,58 +5524,6 @@ enum VideoProtocol {
 	Rtc,
 }
 
-class LiveConsultationMuterInfo extends LiveConsultationMemberInfo{
-
-	LiveConsultationMuterInfo({
-		String? id,
-		String? name,
-		String? headImageUrl,
-	}) : super(
-			id: id,
-			name: name,
-			headImageUrl: headImageUrl,
-		);
-
-	factory LiveConsultationMuterInfo.fromJson(Map<String, dynamic> map) {
-		return LiveConsultationMuterInfo( 
-			id: map['Id'],
-			name: map['Name'],
-			headImageUrl: map['HeadImageUrl'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		return map;
-	}
-}
-
-class LiveConsultationSwitcherInfo extends LiveConsultationMemberInfo{
-
-	LiveConsultationSwitcherInfo({
-		String? id,
-		String? name,
-		String? headImageUrl,
-	}) : super(
-			id: id,
-			name: name,
-			headImageUrl: headImageUrl,
-		);
-
-	factory LiveConsultationSwitcherInfo.fromJson(Map<String, dynamic> map) {
-		return LiveConsultationSwitcherInfo( 
-			id: map['Id'],
-			name: map['Name'],
-			headImageUrl: map['HeadImageUrl'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		return map;
-	}
-}
-
 class LiveConsultationRoomDTO {
 	String? consultationCode;
 	LiveConsultationMember? initiator;
@@ -5708,66 +5568,6 @@ class LiveConsultationRoomDTO {
 	}
 }
 
-class MuteLiveConsultationNotification {
-	String? consultationCode;
-	bool mute;
-	LiveConsultationMuterInfo? muterInfo;
-
-	MuteLiveConsultationNotification({
-		this.consultationCode,
-		this.mute = false,
-		this.muterInfo,
-	});
-
-	factory MuteLiveConsultationNotification.fromJson(Map<String, dynamic> map) {
-		return MuteLiveConsultationNotification( 
-			consultationCode: map['ConsultationCode'],
-			mute: map['Mute'],
-			muterInfo: map['MuterInfo'] != null ? LiveConsultationMuterInfo.fromJson(map['MuterInfo']) : null,
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(consultationCode != null)
-			map['ConsultationCode'] = consultationCode;
-		map['Mute'] = mute;
-		if(muterInfo != null)
-			map['MuterInfo'] = muterInfo;
-		return map;
-	}
-}
-
-class SwitchLiveConsultationVideoNotification {
-	String? consultationCode;
-	bool opened;
-	LiveConsultationSwitcherInfo? switcherInfo;
-
-	SwitchLiveConsultationVideoNotification({
-		this.consultationCode,
-		this.opened = false,
-		this.switcherInfo,
-	});
-
-	factory SwitchLiveConsultationVideoNotification.fromJson(Map<String, dynamic> map) {
-		return SwitchLiveConsultationVideoNotification( 
-			consultationCode: map['ConsultationCode'],
-			opened: map['Opened'],
-			switcherInfo: map['SwitcherInfo'] != null ? LiveConsultationSwitcherInfo.fromJson(map['SwitcherInfo']) : null,
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(consultationCode != null)
-			map['ConsultationCode'] = consultationCode;
-		map['Opened'] = opened;
-		if(switcherInfo != null)
-			map['SwitcherInfo'] = switcherInfo;
-		return map;
-	}
-}
-
 class FindConsultationSettingRequest extends TokenRequest{
 	String? version;
 
@@ -8053,6 +7853,51 @@ class LoginSuccessResult extends BaseServerResult{
 	}
 }
 
+class ScheduleDTO extends ClientScheduleDTO{
+	List<String >? userCodes;
+	String? code;
+
+	ScheduleDTO({
+		this.userCodes,
+		this.code,
+		String? title,
+		TransactionStatusEnum status = TransactionStatusEnum.Applied,
+		ScheduleTypeEnum scheduleType = ScheduleTypeEnum.Consultation,
+		DateTime? startTime,
+		DateTime? endTime,
+		String? relevanceCode,
+	}) : super(
+			title: title,
+			status: status,
+			scheduleType: scheduleType,
+			startTime: startTime,
+			endTime: endTime,
+			relevanceCode: relevanceCode,
+		);
+
+	factory ScheduleDTO.fromJson(Map<String, dynamic> map) {
+		return ScheduleDTO( 
+			userCodes: map['UserCodes'] != null ? map['UserCodes'].cast<String>().toList() : null,
+			code: map['Code'],
+			title: map['Title'],
+			status: TransactionStatusEnum.values.firstWhere((e) => e.index == map['Status']),
+			scheduleType: ScheduleTypeEnum.values.firstWhere((e) => e.index == map['ScheduleType']),
+			startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
+			endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
+			relevanceCode: map['RelevanceCode'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(userCodes != null)
+			map['UserCodes'] = userCodes;
+		if(code != null)
+			map['Code'] = code;
+		return map;
+	}
+}
+
 class ReportElementDTO {
 	String? key;
 	String? tagId;
@@ -11467,13 +11312,15 @@ class GradingProtectionConfigDTO extends BaseDTO{
 	String? moduleCode;
 	String? name;
 	String? description;
-	bool enable;
+	GradingConfigTypeEnum configType;
+	String? value;
 
 	GradingProtectionConfigDTO({
 		this.moduleCode,
 		this.name,
 		this.description,
-		this.enable = false,
+		this.configType = GradingConfigTypeEnum.Switch,
+		this.value,
 		DateTime? createTime,
 		DateTime? updateTime,
 	}) : super(
@@ -11486,7 +11333,8 @@ class GradingProtectionConfigDTO extends BaseDTO{
 			moduleCode: map['ModuleCode'],
 			name: map['Name'],
 			description: map['Description'],
-			enable: map['Enable'],
+			configType: GradingConfigTypeEnum.values.firstWhere((e) => e.index == map['ConfigType']),
+			value: map['Value'],
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
 		);
@@ -11500,7 +11348,9 @@ class GradingProtectionConfigDTO extends BaseDTO{
 			map['Name'] = name;
 		if(description != null)
 			map['Description'] = description;
-		map['Enable'] = enable;
+		map['ConfigType'] = configType.index;
+		if(value != null)
+			map['Value'] = value;
 		return map;
 	}
 }

+ 7 - 0
lib/services/user.dart

@@ -27,6 +27,7 @@ class UserService extends JsonRpcClientBase {
 		FJsonConvert.setDecoder((map) => ShareDeviceUserDTO.fromJson(map));
 		FJsonConvert.setDecoder((map) => UserFeatureInfoResult.fromJson(map));
 		FJsonConvert.setDecoder((map) => UserInfoByCodeDTO.fromJson(map));
+		FJsonConvert.setDecoder((map) => ClientScheduleDTO.fromJson(map));
 	}
 
 	Future<bool> heartRateAsync(TokenRequest request) async {
@@ -99,5 +100,11 @@ class UserService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
+	Future<List<ClientScheduleDTO>> findSchedulesAsync(FindSchedulesRequest request) async {
+		var rpcRst = await call("FindSchedulesAsync", request);
+		var result = (rpcRst as List).map((e)=>ClientScheduleDTO.fromJson(e as Map<String, dynamic>)).toList();
+		return result;
+	}
+
 }
 

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

@@ -903,4 +903,83 @@ class RefreshStaticticRecordsRequest {
 	}
 }
 
+enum ScheduleTypeEnum {
+	Consultation,
+	Training,
+}
+
+class ClientScheduleDTO {
+	String? title;
+	TransactionStatusEnum status;
+	ScheduleTypeEnum scheduleType;
+	DateTime? startTime;
+	DateTime? endTime;
+	String? relevanceCode;
+
+	ClientScheduleDTO({
+		this.title,
+		this.status = TransactionStatusEnum.Applied,
+		this.scheduleType = ScheduleTypeEnum.Consultation,
+		this.startTime,
+		this.endTime,
+		this.relevanceCode,
+	});
+
+	factory ClientScheduleDTO.fromJson(Map<String, dynamic> map) {
+		return ClientScheduleDTO( 
+			title: map['Title'],
+			status: TransactionStatusEnum.values.firstWhere((e) => e.index == map['Status']),
+			scheduleType: ScheduleTypeEnum.values.firstWhere((e) => e.index == map['ScheduleType']),
+			startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
+			endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
+			relevanceCode: map['RelevanceCode'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(title != null)
+			map['Title'] = title;
+		map['Status'] = status.index;
+		map['ScheduleType'] = scheduleType.index;
+		if(startTime != null)
+			map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
+		if(endTime != null)
+			map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
+		if(relevanceCode != null)
+			map['RelevanceCode'] = relevanceCode;
+		return map;
+	}
+}
+
+class FindSchedulesRequest extends TokenRequest{
+	DateTime? startTime;
+	DateTime? endTime;
+
+	FindSchedulesRequest({
+		this.startTime,
+		this.endTime,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory FindSchedulesRequest.fromJson(Map<String, dynamic> map) {
+		return FindSchedulesRequest( 
+			startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
+			endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(startTime != null)
+			map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
+		if(endTime != null)
+			map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
+		return map;
+	}
+}
+
 

+ 7 - 0
lib/services/vinnoServer.dart

@@ -21,6 +21,7 @@ class VinnoServerService extends JsonRpcClientBase {
 		/// 注册响应实体反序列化处理器
 		FJsonConvert.setDecoder((map) => ServerInfoDTO.fromJson(map));
 		FJsonConvert.setDecoder((map) => EchoResult.fromJson(map));
+		FJsonConvert.setDecoder((map) => PasswordRuleResult.fromJson(map));
 	}
 
 	Future<bool> updateServerInfoAsync(UpdateServerInfoRequest request) async {
@@ -45,5 +46,11 @@ class VinnoServerService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
+	Future<PasswordRuleResult> getPasswordRuleAsync() async {
+		var rpcRst = await call("GetPasswordRuleAsync", );
+		var result = PasswordRuleResult.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
 }
 

+ 36 - 0
lib/services/vinnoServer.m.dart

@@ -126,4 +126,40 @@ class UpdateServerIPListRequest {
 	}
 }
 
+class PasswordRuleResult {
+	int minSize;
+	bool uppercase;
+	bool lowercase;
+	bool numbers;
+	bool specialCharacters;
+
+	PasswordRuleResult({
+		this.minSize = 0,
+		this.uppercase = false,
+		this.lowercase = false,
+		this.numbers = false,
+		this.specialCharacters = false,
+	});
+
+	factory PasswordRuleResult.fromJson(Map<String, dynamic> map) {
+		return PasswordRuleResult( 
+			minSize: map['MinSize'],
+			uppercase: map['Uppercase'],
+			lowercase: map['Lowercase'],
+			numbers: map['Numbers'],
+			specialCharacters: map['SpecialCharacters'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		map['MinSize'] = minSize;
+		map['Uppercase'] = uppercase;
+		map['Lowercase'] = lowercase;
+		map['Numbers'] = numbers;
+		map['SpecialCharacters'] = specialCharacters;
+		return map;
+	}
+}
+