Browse Source

同步Server最新接口

loki.wu 2 years ago
parent
commit
824127fe5f

+ 5 - 2
lib/services/authentication.m.dart

@@ -3231,8 +3231,8 @@ enum CustomerRpcCode {
 	ReportTemplateNameDuplication,
 	ClearSysLogParamEmpty,
 	ServerAddressIsEmpty,
-	placeHolder_3054,
-	placeHolder_3055,
+	AdminPasswordExpiredError,
+	AdminPasswordRepeatError,
 	placeHolder_3056,
 	placeHolder_3057,
 	placeHolder_3058,
@@ -6239,6 +6239,9 @@ enum CustomerRpcCode {
 	ThesaurusNameEmpty,
 	ConsultationEvaluateNotFound,
 	FollowUpVisitInfoNotFound,
+	AccountIsLocked,
+	UserPasswordExpiredError,
+	UserPasswordRepeatError,
 }
 
 class ValidateTokenResult {

+ 5 - 10
lib/services/liveConsultation.m.dart

@@ -470,6 +470,7 @@ class ConsultationDetailDTO {
 	String? scanUserName;
 	String? expertOrganizationName;
 	String? expertUserName;
+	String? deviceName;
 	String? patientName;
 	String? sex;
 	List<DataItemDTO >? patientDatas;
@@ -507,6 +508,7 @@ class ConsultationDetailDTO {
 		this.scanUserName,
 		this.expertOrganizationName,
 		this.expertUserName,
+		this.deviceName,
 		this.patientName,
 		this.sex,
 		this.patientDatas,
@@ -546,6 +548,7 @@ class ConsultationDetailDTO {
 			scanUserName: map['ScanUserName'],
 			expertOrganizationName: map['ExpertOrganizationName'],
 			expertUserName: map['ExpertUserName'],
+			deviceName: map['DeviceName'],
 			patientName: map['PatientName'],
 			sex: map['Sex'],
 			patientDatas: map['PatientDatas'] != null ? (map['PatientDatas'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
@@ -606,6 +609,8 @@ class ConsultationDetailDTO {
 			map['ExpertOrganizationName'] = expertOrganizationName;
 		if(expertUserName != null)
 			map['ExpertUserName'] = expertUserName;
+		if(deviceName != null)
+			map['DeviceName'] = deviceName;
 		if(patientName != null)
 			map['PatientName'] = patientName;
 		if(sex != null)
@@ -1061,12 +1066,6 @@ class FindConsultationPatientPageRequest extends PageRequest{
 	}
 }
 
-enum LiveProtocolEnum {
-	placeHolder_0,
-	RTMP,
-	RTC,
-}
-
 enum LiveMemberEnum {
 	placeHolder_0,
 	User,
@@ -1192,14 +1191,12 @@ class LiveConsultationMember {
 
 class InitiateLiveConsultationResult {
 	String? consultationCode;
-	LiveProtocolEnum protocol;
 	int roomNo;
 	List<LiveConsultationMember >? userLiveDatas;
 	List<LiveConsultationMember >? deviceLiveDatas;
 
 	InitiateLiveConsultationResult({
 		this.consultationCode,
-		this.protocol = LiveProtocolEnum.RTMP,
 		this.roomNo = 0,
 		this.userLiveDatas,
 		this.deviceLiveDatas,
@@ -1208,7 +1205,6 @@ class InitiateLiveConsultationResult {
 	factory InitiateLiveConsultationResult.fromJson(Map<String, dynamic> map) {
 		return InitiateLiveConsultationResult( 
 			consultationCode: map['ConsultationCode'],
-			protocol: LiveProtocolEnum.values.firstWhere((e) => e.index == map['Protocol']),
 			roomNo: map['RoomNo'],
 			userLiveDatas: map['UserLiveDatas'] != null ? (map['UserLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
 			deviceLiveDatas: map['DeviceLiveDatas'] != null ? (map['DeviceLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
@@ -1219,7 +1215,6 @@ class InitiateLiveConsultationResult {
 		final map = Map<String, dynamic>();
 		if(consultationCode != null)
 			map['ConsultationCode'] = consultationCode;
-		map['Protocol'] = protocol.index;
 		map['RoomNo'] = roomNo;
 		if(userLiveDatas != null)
 			map['UserLiveDatas'] = userLiveDatas;

+ 3 - 3
lib/services/login.dart

@@ -19,12 +19,12 @@ class LoginService extends JsonRpcClientBase {
 						timeout: timeout,
 				) {
 		/// 注册响应实体反序列化处理器
-		FJsonConvert.setDecoder((map) => UserTokenDTO.fromJson(map));
+		FJsonConvert.setDecoder((map) => LoginResult.fromJson(map));
 	}
 
-	Future<UserTokenDTO> commonLoginAsync(CommonLoginRequest request) async {
+	Future<LoginResult> commonLoginAsync(CommonLoginRequest request) async {
 		var rpcRst = await call("CommonLoginAsync", request);
-		var result = UserTokenDTO.fromJson(rpcRst as Map<String, dynamic>);
+		var result = LoginResult.fromJson(rpcRst as Map<String, dynamic>);
 		return result;
 	}
 

+ 22 - 4
lib/services/login.m.dart

@@ -1,22 +1,40 @@
 import 'authentication.m.dart';
 
-class UserTokenDTO {
+enum LoginStateEnum {
+	Succeed,
+	PasswordIncorrect,
+}
+
+class LoginResult {
+	LoginStateEnum loginState;
 	String? token;
+	int? lockRemainingTimes;
+	bool passwordExpired;
 
-	UserTokenDTO({
+	LoginResult({
+		this.loginState = LoginStateEnum.Succeed,
 		this.token,
+		this.lockRemainingTimes,
+		this.passwordExpired = false,
 	});
 
-	factory UserTokenDTO.fromJson(Map<String, dynamic> map) {
-		return UserTokenDTO( 
+	factory LoginResult.fromJson(Map<String, dynamic> map) {
+		return LoginResult( 
+			loginState: LoginStateEnum.values.firstWhere((e) => e.index == map['LoginState']),
 			token: map['Token'],
+			lockRemainingTimes: map['LockRemainingTimes'],
+			passwordExpired: map['PasswordExpired'],
 		);
 	}
 
 	Map<String, dynamic> toJson() {
 		final map = Map<String, dynamic>();
+		map['LoginState'] = loginState.index;
 		if(token != null)
 			map['Token'] = token;
+		if(lockRemainingTimes != null)
+			map['LockRemainingTimes'] = lockRemainingTimes;
+		map['PasswordExpired'] = passwordExpired;
 		return map;
 	}
 }

+ 3 - 0
lib/services/patient.m.dart

@@ -821,6 +821,7 @@ class RemedicalInfoDTO extends BaseDTO{
 	String? deviceCode;
 	String? recordCode;
 	String? patientScanType;
+	String? applicationCategory;
 	String? application;
 	TerminalImageDTO? terminalImages;
 	RemedicalFileDataTypeEnum fileDataType;
@@ -839,6 +840,7 @@ class RemedicalInfoDTO extends BaseDTO{
 		this.deviceCode,
 		this.recordCode,
 		this.patientScanType,
+		this.applicationCategory,
 		this.application,
 		this.terminalImages,
 		this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
@@ -859,6 +861,7 @@ class RemedicalInfoDTO extends BaseDTO{
 			deviceCode: map['DeviceCode'],
 			recordCode: map['RecordCode'],
 			patientScanType: map['PatientScanType'],
+			applicationCategory: map['ApplicationCategory'],
 			application: map['Application'],
 			terminalImages: map['TerminalImages'] != null ? TerminalImageDTO.fromJson(map['TerminalImages']) : null,
 			fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),

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

@@ -73,6 +73,7 @@ class UploadExamDataRequest extends TokenRequest{
 	String? previewFileToken;
 	String? fileToken;
 	String? coverImageToken;
+	String? applicationCategory;
 	String? application;
 	RemedicalFileDataTypeEnum fileDataType;
 	MeasuredResultsDTO? measuredResult;
@@ -83,6 +84,7 @@ class UploadExamDataRequest extends TokenRequest{
 		this.previewFileToken,
 		this.fileToken,
 		this.coverImageToken,
+		this.applicationCategory,
 		this.application,
 		this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
 		this.measuredResult,
@@ -98,6 +100,7 @@ class UploadExamDataRequest extends TokenRequest{
 			previewFileToken: map['PreviewFileToken'],
 			fileToken: map['FileToken'],
 			coverImageToken: map['CoverImageToken'],
+			applicationCategory: map['ApplicationCategory'],
 			application: map['Application'],
 			fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
 			measuredResult: map['MeasuredResult'] != null ? MeasuredResultsDTO.fromJson(map['MeasuredResult']) : null,
@@ -116,6 +119,8 @@ class UploadExamDataRequest extends TokenRequest{
 			map['FileToken'] = fileToken;
 		if(coverImageToken != null)
 			map['CoverImageToken'] = coverImageToken;
+		if(applicationCategory != null)
+			map['ApplicationCategory'] = applicationCategory;
 		if(application != null)
 			map['Application'] = application;
 		map['FileDataType'] = fileDataType.index;
@@ -184,12 +189,14 @@ class AddToRemedicalDiagnosisRequest extends TokenRequest{
 class RemedicalItemList {
 	String? patientScanTypeDesc;
 	List<String >? patientScanTypeList;
+	String? applicationCategory;
 	String? application;
 	List<RemedicalInfoDTO >? remedicalList;
 
 	RemedicalItemList({
 		this.patientScanTypeDesc,
 		this.patientScanTypeList,
+		this.applicationCategory,
 		this.application,
 		this.remedicalList,
 	});
@@ -198,6 +205,7 @@ class RemedicalItemList {
 		return RemedicalItemList( 
 			patientScanTypeDesc: map['PatientScanTypeDesc'],
 			patientScanTypeList: map['PatientScanTypeList'] != null ? map['PatientScanTypeList'].cast<String>().toList() : null,
+			applicationCategory: map['ApplicationCategory'],
 			application: map['Application'],
 			remedicalList: map['RemedicalList'] != null ? (map['RemedicalList'] as List).map((e)=>RemedicalInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
 		);
@@ -209,6 +217,8 @@ class RemedicalItemList {
 			map['PatientScanTypeDesc'] = patientScanTypeDesc;
 		if(patientScanTypeList != null)
 			map['PatientScanTypeList'] = patientScanTypeList;
+		if(applicationCategory != null)
+			map['ApplicationCategory'] = applicationCategory;
 		if(application != null)
 			map['Application'] = application;
 		if(remedicalList != null)

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

@@ -4,11 +4,38 @@ import 'patient.m.dart';
 import 'identityApply.m.dart';
 import 'authentication.m.dart';
 
+import 'package:fis_jsonrpc/utils.dart';
+
 enum UserInfoStateEnum {
 	Nonactivated,
 	Activated,
 }
 
+class LoginLockInfoDTO {
+	DateTime? loginDate;
+	int times;
+
+	LoginLockInfoDTO({
+		this.loginDate,
+		this.times = 0,
+	});
+
+	factory LoginLockInfoDTO.fromJson(Map<String, dynamic> map) {
+		return LoginLockInfoDTO( 
+			loginDate: map['LoginDate'] != null ? DateTime.parse(map['LoginDate']) : null,
+			times: map['Times'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(loginDate != null)
+			map['LoginDate'] = JsonRpcUtils.dateFormat(loginDate!);
+		map['Times'] = times;
+		return map;
+	}
+}
+
 class UserDTO extends UserBaseDTO{
 	String? phone;
 	String? email;
@@ -34,6 +61,7 @@ class UserDTO extends UserBaseDTO{
 	List<String >? deletePatientCodes;
 	bool isBatchExportDiagnoseData;
 	String? bindAssistantUserCode;
+	LoginLockInfoDTO? loginLockInfo;
 
 	UserDTO({
 		this.phone,
@@ -60,6 +88,7 @@ class UserDTO extends UserBaseDTO{
 		this.deletePatientCodes,
 		this.isBatchExportDiagnoseData = false,
 		this.bindAssistantUserCode,
+		this.loginLockInfo,
 		String? userCode,
 		String? userName,
 		String? headImageUrl,
@@ -99,6 +128,7 @@ class UserDTO extends UserBaseDTO{
 			deletePatientCodes: map['DeletePatientCodes'] != null ? map['DeletePatientCodes'].cast<String>().toList() : null,
 			isBatchExportDiagnoseData: map['IsBatchExportDiagnoseData'],
 			bindAssistantUserCode: map['BindAssistantUserCode'],
+			loginLockInfo: map['LoginLockInfo'] != null ? LoginLockInfoDTO.fromJson(map['LoginLockInfo']) : null,
 			userCode: map['UserCode'],
 			userName: map['UserName'],
 			headImageUrl: map['HeadImageUrl'],
@@ -152,6 +182,8 @@ class UserDTO extends UserBaseDTO{
 		map['IsBatchExportDiagnoseData'] = isBatchExportDiagnoseData;
 		if(bindAssistantUserCode != null)
 			map['BindAssistantUserCode'] = bindAssistantUserCode;
+		if(loginLockInfo != null)
+			map['LoginLockInfo'] = loginLockInfo;
 		return map;
 	}
 }