|
@@ -58,6 +58,7 @@ public class ViewController extends Controller {
|
|
JSONArray jsonArray = dService.getReport(dateparams);
|
|
JSONArray jsonArray = dService.getReport(dateparams);
|
|
for (Object object : jsonArray) {
|
|
for (Object object : jsonArray) {
|
|
JSONObject jsonObject = JSON.parseObject(object.toString());
|
|
JSONObject jsonObject = JSON.parseObject(object.toString());
|
|
|
|
+ String REPORT_ID = jsonObject.getString("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) {
|
|
// if (record == null) {
|
|
// Record DC_PACS_REPORT = new Record()
|
|
// Record DC_PACS_REPORT = new Record()
|
|
@@ -91,22 +92,22 @@ public class ViewController extends Controller {
|
|
// .set("STATE", "0");
|
|
// .set("STATE", "0");
|
|
// Db.use("crb").save("DC_PACS_REPORT", DC_PACS_REPORT);
|
|
// Db.use("crb").save("DC_PACS_REPORT", DC_PACS_REPORT);
|
|
// }
|
|
// }
|
|
- Record record2 = Db.use("crb").findFirst("select * from DC_PACS_XML where REPORT_ID=?", "1");
|
|
|
|
|
|
+ Record record2 = Db.use("crb").findFirst("select * from DC_PACS_XML where REPORT_ID=?", REPORT_ID);
|
|
|
|
|
|
- this.renderText(jsonObject.getString("REPORT_ID"));
|
|
|
|
-// if (record2 == null) {
|
|
|
|
-// Record DC_PACS_XML = new Record()
|
|
|
|
-// .set("REPORT_ID", jsonObject.getString("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);
|
|
|
|
-//
|
|
|
|
-// }
|
|
|
|
|
|
+// this.renderText(jsonObject.getString("REPORT_ID"));
|
|
|
|
+ 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);
|
|
|
|
+ this.renderJson(DC_PACS_XML);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|