刘韬 3 years ago
parent
commit
a0690e3074
1 changed files with 11 additions and 8 deletions
  1. 11 8
      DataFusion/src/com/zskk/control/ViewController.java

+ 11 - 8
DataFusion/src/com/zskk/control/ViewController.java

@@ -68,6 +68,8 @@ public class ViewController extends Controller {
 		// 创建从文件读取数据的FileInputStream流
 		FileInputStream fin;
 		String s = null;
+		String d = null;
+
 		try {
 			fin = new FileInputStream(fin_floder);
 			InputStreamReader isr = null;
@@ -77,7 +79,7 @@ public class ViewController extends Controller {
 			s = raf.readLine();
 			s = s.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>", "");
 			s = "<zskk>" + s + "</zskk>";
-			System.out.println(s);
+//			System.out.println(s);
 			XmlHelper xmlHelper = XmlHelper.of(s);
 			NodeList nodeList = xmlHelper.getNodeList("/zskk/NativeDicomModel/DicomAttribute");
 			for (int i = 0; i < nodeList.getLength(); i++) {
@@ -89,12 +91,13 @@ public class ViewController extends Controller {
 //								String b = xmlHelper.getString("/zskk/NativeDicomModel[" + i + "]/DicomAttribute[" + j + "]/Value");
 //								System.out.println(xmlHelper.getString(nodeList.item(i), "Value"));
 								String studyuidString = xmlHelper.getString(nodeList.item(i), "Value");
-								Record studyidfind = Db.use("local").findFirst("select * from study where studyuid = ?",
-										studyuidString);
-								if (studyidfind == null) {
-									Record studyinfo = new Record().set("studyuid", studyuidString);
-									Db.use("local").save("study", studyinfo);
-								}
+								d=d+studyuidString;
+//								Record studyidfind = Db.use("local").findFirst("select * from study where studyuid = ?",
+//										studyuidString);
+//								if (studyidfind == null) {
+//									Record studyinfo = new Record().set("studyuid", studyuidString);
+//									Db.use("local").save("study", studyinfo);
+//								}
 							}
 						}
 					}
@@ -105,7 +108,7 @@ public class ViewController extends Controller {
 			e.printStackTrace();
 			renderText(e.toString());
 		}
-		renderText(s);
+		renderText(d);
 
 	}