|
@@ -55,14 +55,11 @@ public class ViewController extends Controller {
|
|
|
DataService dService = ServiceFactory.getService(DataService.class);
|
|
|
Map<String, String> dateparams = new HashMap<>();
|
|
|
dateparams.put("datetime", parseStringToDate());
|
|
|
- String aaa = "";
|
|
|
JSONArray jsonArray = dService.getReport(dateparams);
|
|
|
for (Object object : jsonArray) {
|
|
|
JSONObject jsonObject = JSON.parseObject(object.toString());
|
|
|
String REPORT_ID = jsonObject.getString("REPORT_ID");
|
|
|
-
|
|
|
- aaa=aaa+REPORT_ID;
|
|
|
-// Record record = Db.use("crb").findFirst("select * from DC_PACS_REPORT where ID=?", jsonObject.getString("ID"));
|
|
|
+ // Record record = Db.use("crb").findFirst("select * from DC_PACS_REPORT where ID=?", jsonObject.getString("ID"));
|
|
|
// if (record == null) {
|
|
|
// Record DC_PACS_REPORT = new Record()
|
|
|
// .set("ID", jsonObject.getString("ID"))
|
|
@@ -95,21 +92,20 @@ public class ViewController extends Controller {
|
|
|
// .set("STATE", "0");
|
|
|
// Db.use("crb").save("DC_PACS_REPORT", DC_PACS_REPORT);
|
|
|
// }
|
|
|
-// Record record2 = Db.use("crb").findFirst("select * from DC_PACS_XML where REPORT_ID=?", REPORT_ID);
|
|
|
- this.renderText(aaa);
|
|
|
-// if (record2 == null) {
|
|
|
-// Record DC_PACS_XML = new Record()
|
|
|
-// .set("REPORT_ID", REPORT_ID)
|
|
|
-// .set("PAT_FROM_TYPE", "门诊")
|
|
|
-// .set("PAT_NUM", jsonObject.getString("PAT_NUM")==null?"":jsonObject.getString("PAT_NUM"))
|
|
|
-// .set("ORG_CODE", "371728007")
|
|
|
-// .set("ORG_NAME", "东明县第二人民医院")
|
|
|
-// .set("REPORT_XML", jsonObject.getString("FINDING")+jsonObject.getString("CONCLUSION"))
|
|
|
-// .set("SYSTEMTIME", jsonObject.getDate("SYSTEMTIME"));
|
|
|
-// Db.use("crb").save("DC_PACS_XML", DC_PACS_XML);
|
|
|
+ Record record3 = Db.use("crb").findFirst("select * from DC_PACS_XML where REPORT_ID=?", REPORT_ID);
|
|
|
+ if (record3 == null) {
|
|
|
+ Record DC_PACS_XML = new Record()
|
|
|
+ .set("REPORT_ID", REPORT_ID)
|
|
|
+ .set("PAT_FROM_TYPE", "门诊")
|
|
|
+ .set("PAT_NUM", jsonObject.getString("PAT_NUM")==null?"":jsonObject.getString("PAT_NUM"))
|
|
|
+ .set("ORG_CODE", "371728007")
|
|
|
+ .set("ORG_NAME", "东明县第二人民医院")
|
|
|
+ .set("REPORT_XML", jsonObject.getString("FINDING")+jsonObject.getString("CONCLUSION"))
|
|
|
+ .set("SYSTEMTIME", jsonObject.getDate("SYSTEMTIME"));
|
|
|
+ Db.use("crb").save("DC_PACS_XML", DC_PACS_XML);
|
|
|
// this.renderJson(DC_PACS_XML);
|
|
|
-//
|
|
|
-// }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|