Browse Source

同步Server最新接口更改

loki.wu 2 years ago
parent
commit
337c5f4e7a

+ 0 - 3
lib/rpc.dart

@@ -65,9 +65,6 @@ class JsonRpcProxy {
 	EmailService get email =>
 	findService(() => new EmailService(currentHostAddress));
 
-	FileTransferService get fileTransfer =>
-	findService(() => new FileTransferService(currentHostAddress));
-
 	IdentityApplyService get identityApply =>
 	findService(() => new IdentityApplyService(currentHostAddress));
 

+ 1 - 1
lib/services/authentication.dart

@@ -87,7 +87,7 @@ class AuthenticationService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
-	Future<PageResult<TokenDTO>> getPagedTokensAsync(GetPagedTokensRequest request) async {
+	Future<PageResult<TokenDTO>> getPagedTokensAsync(GetPagedTokensOnlineRequest request) async {
 		var rpcRst = await call("GetPagedTokensAsync", request);
 		var result = PageResult<TokenDTO>.fromJson(rpcRst as Map<String, dynamic>);
 		return result;

+ 65 - 17
lib/services/authentication.m.dart

@@ -983,22 +983,22 @@ enum CustomerRpcCode {
 	ConsultationNorightError,
 	ConsultationUploadFileInfoIsEmpty,
 	ConsultationCodeIsEmpty,
-	placeHolder_806,
-	placeHolder_807,
-	placeHolder_808,
-	placeHolder_809,
-	placeHolder_810,
-	placeHolder_811,
-	placeHolder_812,
-	placeHolder_813,
-	placeHolder_814,
-	placeHolder_815,
-	placeHolder_816,
-	placeHolder_817,
-	placeHolder_818,
-	placeHolder_819,
-	placeHolder_820,
-	placeHolder_821,
+	DeviceNotOnline,
+	ExpertNotOnline,
+	DeviceIsBusy,
+	ExpertIsBusy,
+	IniticateIsBusy,
+	LiveConsultationCancelled,
+	LiveConsultationTimeout,
+	LivMemberNotFound,
+	ConsultationTimeGreaterThanCurrentTime,
+	ApplyUserCodeIsEmpty,
+	ConsultationExpertNotExist,
+	ExpertOrganizationCodeIsEmpty,
+	ConsultationApplyUserIllegal,
+	NoExpertFeature,
+	AssistantNotExisted,
+	NotExpertAssistant,
 	placeHolder_822,
 	placeHolder_823,
 	placeHolder_824,
@@ -4234,7 +4234,7 @@ enum CustomerRpcCode {
 	PatientWasRegistered,
 	NoValidPatientNoFoundRecord,
 	NoFoundExportList,
-	placeHolder_4057,
+	PatientPhoneIsEmpty,
 	placeHolder_4058,
 	placeHolder_4059,
 	placeHolder_4060,
@@ -6237,6 +6237,8 @@ enum CustomerRpcCode {
 	HeadImageUrlNotValid,
 	NicknameTooLong,
 	ThesaurusNameEmpty,
+	ConsultationEvaluateNotFound,
+	FollowUpVisitInfoNotFound,
 }
 
 class ValidateTokenResult {
@@ -6501,4 +6503,50 @@ class GetPagedTokensRequest extends PageRequest{
 	}
 }
 
+class GetPagedTokensOnlineRequest extends GetPagedTokensRequest{
+	int accountType;
+	int loginFrom;
+	int loginSource;
+	String? isOnline;
+
+	GetPagedTokensOnlineRequest({
+		this.accountType = 0,
+		this.loginFrom = 0,
+		this.loginSource = 0,
+		this.isOnline,
+		String? keyword,
+		int pageIndex = 0,
+		int pageSize = 0,
+		String? token,
+	}) : super(
+			keyword: keyword,
+			pageIndex: pageIndex,
+			pageSize: pageSize,
+			token: token,
+		);
+
+	factory GetPagedTokensOnlineRequest.fromJson(Map<String, dynamic> map) {
+		return GetPagedTokensOnlineRequest( 
+			accountType: map['AccountType'],
+			loginFrom: map['LoginFrom'],
+			loginSource: map['LoginSource'],
+			isOnline: map['IsOnline'],
+			keyword: map['Keyword'],
+			pageIndex: map['PageIndex'],
+			pageSize: map['PageSize'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		map['AccountType'] = accountType;
+		map['LoginFrom'] = loginFrom;
+		map['LoginSource'] = loginSource;
+		if(isOnline != null)
+			map['IsOnline'] = isOnline;
+		return map;
+	}
+}
+
 

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

@@ -97,6 +97,7 @@ class DeviceExtendInfoDTO extends DeviceInfoDTO{
 	String? organizationDirectorCode;
 	String? organizationDirectorUserName;
 	String? organizationDirectorFullName;
+	String? deviceTypeName;
 
 	DeviceExtendInfoDTO({
 		this.organizationName,
@@ -105,6 +106,7 @@ class DeviceExtendInfoDTO extends DeviceInfoDTO{
 		this.organizationDirectorCode,
 		this.organizationDirectorUserName,
 		this.organizationDirectorFullName,
+		this.deviceTypeName,
 		String? deviceCode,
 		String? serialNumber,
 		String? password,
@@ -162,6 +164,7 @@ class DeviceExtendInfoDTO extends DeviceInfoDTO{
 			organizationDirectorCode: map['OrganizationDirectorCode'],
 			organizationDirectorUserName: map['OrganizationDirectorUserName'],
 			organizationDirectorFullName: map['OrganizationDirectorFullName'],
+			deviceTypeName: map['DeviceTypeName'],
 			deviceCode: map['DeviceCode'],
 			serialNumber: map['SerialNumber'],
 			password: map['Password'],
@@ -201,6 +204,8 @@ class DeviceExtendInfoDTO extends DeviceInfoDTO{
 			map['OrganizationDirectorUserName'] = organizationDirectorUserName;
 		if(organizationDirectorFullName != null)
 			map['OrganizationDirectorFullName'] = organizationDirectorFullName;
+		if(deviceTypeName != null)
+			map['DeviceTypeName'] = deviceTypeName;
 		return map;
 	}
 }

+ 0 - 2
lib/services/index.dart

@@ -4,7 +4,6 @@ export 'connect.dart';
 export 'dBLog.dart';
 export 'device.dart';
 export 'email.dart';
-export 'fileTransfer.dart';
 export 'identityApply.dart';
 export 'login.dart';
 export 'organization.dart';
@@ -26,7 +25,6 @@ export 'authentication.m.dart';
 export 'connect.m.dart';
 export 'dBLog.m.dart';
 export 'device.m.dart';
-export 'fileTransfer.m.dart';
 export 'identityApply.m.dart';
 export 'login.m.dart';
 export 'organization.m.dart';

+ 11 - 0
lib/services/organization.m.dart

@@ -215,8 +215,10 @@ class OrganizationDTO extends OrganizationBasicDTO{
 	List<String >? assignedAdmins;
 	String? patientSettingJson;
 	String? examSettingJson;
+	String? consultationSettingJson;
 	String? patientSettingVersion;
 	String? examSettingVersion;
+	String? consultationSettingVersion;
 	String? parentOrganizationName;
 
 	OrganizationDTO({
@@ -230,8 +232,10 @@ class OrganizationDTO extends OrganizationBasicDTO{
 		this.assignedAdmins,
 		this.patientSettingJson,
 		this.examSettingJson,
+		this.consultationSettingJson,
 		this.patientSettingVersion,
 		this.examSettingVersion,
+		this.consultationSettingVersion,
 		this.parentOrganizationName,
 		String? regionCode,
 		String? parentCode,
@@ -278,8 +282,10 @@ class OrganizationDTO extends OrganizationBasicDTO{
 			assignedAdmins: map['AssignedAdmins'] != null ? map['AssignedAdmins'].cast<String>().toList() : null,
 			patientSettingJson: map['PatientSettingJson'],
 			examSettingJson: map['ExamSettingJson'],
+			consultationSettingJson: map['ConsultationSettingJson'],
 			patientSettingVersion: map['PatientSettingVersion'],
 			examSettingVersion: map['ExamSettingVersion'],
+			consultationSettingVersion: map['ConsultationSettingVersion'],
 			parentOrganizationName: map['ParentOrganizationName'],
 			regionCode: map['RegionCode'],
 			parentCode: map['ParentCode'],
@@ -319,10 +325,14 @@ class OrganizationDTO extends OrganizationBasicDTO{
 			map['PatientSettingJson'] = patientSettingJson;
 		if(examSettingJson != null)
 			map['ExamSettingJson'] = examSettingJson;
+		if(consultationSettingJson != null)
+			map['ConsultationSettingJson'] = consultationSettingJson;
 		if(patientSettingVersion != null)
 			map['PatientSettingVersion'] = patientSettingVersion;
 		if(examSettingVersion != null)
 			map['ExamSettingVersion'] = examSettingVersion;
+		if(consultationSettingVersion != null)
+			map['ConsultationSettingVersion'] = consultationSettingVersion;
 		if(parentOrganizationName != null)
 			map['ParentOrganizationName'] = parentOrganizationName;
 		return map;
@@ -702,6 +712,7 @@ class OrganizationSettingResult {
 enum OrganizationSettingTypeEnum {
 	Patient,
 	Exam,
+	Consultation,
 }
 
 class GetUserOrganizationSettingRequest extends TokenRequest{

+ 12 - 0
lib/services/report.m.dart

@@ -326,7 +326,13 @@ class FindShareContentRequest {
 	}
 }
 
+enum ReportTypeEnum {
+	RemoteDiagnosis,
+	LiveConsultation,
+}
+
 class AddReportRequest extends TokenRequest{
+	ReportTypeEnum reportType;
 	String? recordCode;
 	String? reportTemplateJson;
 	String? reportDatasJson;
@@ -338,6 +344,7 @@ class AddReportRequest extends TokenRequest{
 	String? referralRecordCode;
 
 	AddReportRequest({
+		this.reportType = ReportTypeEnum.RemoteDiagnosis,
 		this.recordCode,
 		this.reportTemplateJson,
 		this.reportDatasJson,
@@ -354,6 +361,7 @@ class AddReportRequest extends TokenRequest{
 
 	factory AddReportRequest.fromJson(Map<String, dynamic> map) {
 		return AddReportRequest( 
+			reportType: ReportTypeEnum.values.firstWhere((e) => e.index == map['ReportType']),
 			recordCode: map['RecordCode'],
 			reportTemplateJson: map['ReportTemplateJson'],
 			reportDatasJson: map['ReportDatasJson'],
@@ -369,6 +377,7 @@ class AddReportRequest extends TokenRequest{
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
+		map['ReportType'] = reportType.index;
 		if(recordCode != null)
 			map['RecordCode'] = recordCode;
 		if(reportTemplateJson != null)
@@ -395,6 +404,7 @@ class ModifyReportRequest extends AddReportRequest{
 
 	ModifyReportRequest({
 		this.reportCode,
+		ReportTypeEnum reportType = ReportTypeEnum.RemoteDiagnosis,
 		String? recordCode,
 		String? reportTemplateJson,
 		String? reportDatasJson,
@@ -406,6 +416,7 @@ class ModifyReportRequest extends AddReportRequest{
 		String? referralRecordCode,
 		String? token,
 	}) : super(
+			reportType: reportType,
 			recordCode: recordCode,
 			reportTemplateJson: reportTemplateJson,
 			reportDatasJson: reportDatasJson,
@@ -421,6 +432,7 @@ class ModifyReportRequest extends AddReportRequest{
 	factory ModifyReportRequest.fromJson(Map<String, dynamic> map) {
 		return ModifyReportRequest( 
 			reportCode: map['ReportCode'],
+			reportType: ReportTypeEnum.values.firstWhere((e) => e.index == map['ReportType']),
 			recordCode: map['RecordCode'],
 			reportTemplateJson: map['ReportTemplateJson'],
 			reportDatasJson: map['ReportDatasJson'],

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

@@ -33,6 +33,7 @@ class UserDTO extends UserBaseDTO{
 	List<String >? fieldList;
 	List<String >? deletePatientCodes;
 	bool isBatchExportDiagnoseData;
+	String? bindAssistantUserCode;
 
 	UserDTO({
 		this.phone,
@@ -58,6 +59,7 @@ class UserDTO extends UserBaseDTO{
 		this.fieldList,
 		this.deletePatientCodes,
 		this.isBatchExportDiagnoseData = false,
+		this.bindAssistantUserCode,
 		String? userCode,
 		String? userName,
 		String? headImageUrl,
@@ -96,6 +98,7 @@ class UserDTO extends UserBaseDTO{
 			fieldList: map['FieldList'] != null ? map['FieldList'].cast<String>().toList() : null,
 			deletePatientCodes: map['DeletePatientCodes'] != null ? map['DeletePatientCodes'].cast<String>().toList() : null,
 			isBatchExportDiagnoseData: map['IsBatchExportDiagnoseData'],
+			bindAssistantUserCode: map['BindAssistantUserCode'],
 			userCode: map['UserCode'],
 			userName: map['UserName'],
 			headImageUrl: map['HeadImageUrl'],
@@ -147,6 +150,8 @@ class UserDTO extends UserBaseDTO{
 		if(deletePatientCodes != null)
 			map['DeletePatientCodes'] = deletePatientCodes;
 		map['IsBatchExportDiagnoseData'] = isBatchExportDiagnoseData;
+		if(bindAssistantUserCode != null)
+			map['BindAssistantUserCode'] = bindAssistantUserCode;
 		return map;
 	}
 }