Kaynağa Gözat

1、更新rpc

guanxinyi 4 ay önce
ebeveyn
işleme
45357f676f
1 değiştirilmiş dosya ile 8 ekleme ve 1 silme
  1. 8 1
      lib/services/aIDiagnosis.m.dart

+ 8 - 1
lib/services/aIDiagnosis.m.dart

@@ -3,6 +3,8 @@ import 'liveConsultation.m.dart';
 
 import 'package:fis_jsonrpc/utils.dart';
 
+import 'dart:convert';
+
 class AIDiagnosisRect {
 	int right;
 	int bottom;
@@ -2419,8 +2421,13 @@ class VetAutoTraceImageResult {
 	});
 
 	factory VetAutoTraceImageResult.fromJson(Map<String, dynamic> map) {
+		final pWTraceInfosMap= <String,PWTraceDTO>{};
+		final Map<String, dynamic> jsonpWTraceInfosMap = jsonDecode(map['PWTraceInfos']);
+		for (var key in jsonpWTraceInfosMap.keys) {
+			pWTraceInfosMap[key] = PWTraceDTO.fromJson(jsonpWTraceInfosMap[key]);
+		}
 		return VetAutoTraceImageResult( 
-			pWTraceInfos: map['PWTraceInfos'] != null ? map['PWTraceInfos'] as Map<String,PWTraceDTO> : null,
+			 pWTraceInfos : pWTraceInfosMap
 		);
 	}