|
@@ -74,20 +74,26 @@ public class ViewController extends Controller {
|
|
|
}
|
|
|
|
|
|
public void sdDown() {
|
|
|
- try {
|
|
|
- DataService dService = ServiceFactory.getService(DataService.class);
|
|
|
+
|
|
|
+ DataService dService = ServiceFactory.getService(DataService.class);
|
|
|
+ List<Record> array2 = new ArrayList<Record>();
|
|
|
+ List<Record> array = Db.use("connected").find("SELECT * FROM studyinfo where ACCESSIONNUMBER=?",
|
|
|
+ this.getPara("accno"));
|
|
|
|
|
|
- List<Record> array = Db.use("connected").find("SELECT * FROM studyinfo where ACCESSIONNUMBER=?" ,this.getPara("accno"));
|
|
|
+ for (Record object : array) {
|
|
|
+ try {
|
|
|
+ String[] strings = object.getStr("YYK_PATHNAME").split("\\\\");
|
|
|
+ dService.downloadFileToFolder("smb://pacs:pacs@" + strings[2], "/" + strings[3] + "/" + strings[4],
|
|
|
+ strings[5], "/home/zskk/SMB_FILE", null);
|
|
|
+ } catch (Exception e) {
|
|
|
+ // TODO: handle exception
|
|
|
+ renderText(e.toString());
|
|
|
+ array2.add(object);
|
|
|
+ }
|
|
|
|
|
|
-// for (Record object : array) {
|
|
|
-// String[] strings = object.getStr("YYK_PATHNAME").split("\\\\");
|
|
|
-// dService.downloadFileToFolder("smb://pacs:pacs@"+strings[2], "/"+strings[3]+"/"+strings[4], strings[5],"/home/zskk/SMB_FILE",null);
|
|
|
-// }
|
|
|
- renderJson(array);
|
|
|
- } catch (Exception e) {
|
|
|
- // TODO: handle exception
|
|
|
- renderText(e.toString());
|
|
|
}
|
|
|
+ renderJson(array2);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public void ttt4() {
|