|
@@ -72,19 +72,25 @@ public class ViewController extends Controller {
|
|
}
|
|
}
|
|
|
|
|
|
public void exe() {
|
|
public void exe() {
|
|
- List<Record> records = Db.use("connected").find("select * from pacs55.V_examinfo where STUDYTIME>to_date(?, 'YYYY/MM/DD HH24:MI:SS')",this.getPara("time"));
|
|
|
|
- for (Record record : records) {
|
|
|
|
- String studyuidString = record.getStr("STUDYINSUID");
|
|
|
|
- String modalitiesString = record.getStr("MODALITY");
|
|
|
|
|
|
+ try {
|
|
|
|
+ List<Record> records = Db.use("connected").find("select * from pacs55.V_examinfo where STUDYTIME>to_date(?, 'YYYY/MM/DD HH24:MI:SS')",this.getPara("time"));
|
|
|
|
+ for (Record record : records) {
|
|
|
|
+ String studyuidString = record.getStr("STUDYINSUID");
|
|
|
|
+ String modalitiesString = record.getStr("MODALITY");
|
|
|
|
|
|
- Record studyidfind = Db.use("local").findFirst("select * from study where studyuid = ?",
|
|
|
|
- studyuidString);
|
|
|
|
- if (studyidfind == null) {
|
|
|
|
- Record studyinfo = new Record().set("studyuid", studyuidString).set("modalities", modalitiesString)
|
|
|
|
- .set("status", 1).set("createAt", parseStringToDateTime()).set("updateAt", parseStringToDateTime());
|
|
|
|
- Db.use("local").save("study", studyinfo);
|
|
|
|
|
|
+ Record studyidfind = Db.use("local").findFirst("select * from study where studyuid = ?",
|
|
|
|
+ studyuidString);
|
|
|
|
+ if (studyidfind == null) {
|
|
|
|
+ Record studyinfo = new Record().set("studyuid", studyuidString).set("modalities", modalitiesString)
|
|
|
|
+ .set("status", 1).set("createAt", parseStringToDateTime()).set("updateAt", parseStringToDateTime());
|
|
|
|
+ Db.use("local").save("study", studyinfo);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ // TODO: handle exception
|
|
|
|
+ renderText(e.toString());
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
public void testConn() {
|
|
public void testConn() {
|