|
@@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.jfinal.kit.PropKit;
|
|
|
+import com.jfinal.plugin.activerecord.Db;
|
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
|
import com.jfinal.plugin.cron4j.ITask;
|
|
|
import com.zskk.service.DataService;
|
|
@@ -32,8 +33,26 @@ public class UpdateTask implements ITask {
|
|
|
JSONArray jsonArray = dService.getReport(params);
|
|
|
for (Object object : jsonArray) {
|
|
|
JSONObject jsonObject = JSON.parseObject(object.toString());
|
|
|
-// Record record = new Record().use("local");
|
|
|
-// record.
|
|
|
+ Record record = new Record();
|
|
|
+ record.set("name", jsonObject.getString("name"));
|
|
|
+ record.set("sex", jsonObject.getString("sex"));
|
|
|
+ record.set("phone", jsonObject.getString("phone"));
|
|
|
+ record.set("card_num", jsonObject.getString("card_num"));
|
|
|
+ record.set("hopitalized_no", jsonObject.getString("hopitalized_no"));
|
|
|
+ record.set("out_patient", jsonObject.getString("out_patient"));
|
|
|
+ record.set("accession_num", jsonObject.getString("accession_num"));
|
|
|
+ record.set("patient_num", jsonObject.getString("patient_num"));
|
|
|
+ record.set("studyuid", jsonObject.getString("studyuid"));
|
|
|
+ record.set("his_patient_id", jsonObject.getString("his_patient_id"));
|
|
|
+ record.set("impression", jsonObject.getString("impression"));
|
|
|
+ record.set("description", jsonObject.getString("description"));
|
|
|
+ record.set("report_datetime", jsonObject.getString("report_datetime"));
|
|
|
+ record.set("report_doctor_name", jsonObject.getString("report_doctor_name"));
|
|
|
+ record.set("review_doctor_name", jsonObject.getString("review_doctor_name"));
|
|
|
+ record.set("review_datetime", jsonObject.getString("review_datetime"));
|
|
|
+ record.set("report_result", jsonObject.getString("report_result"));
|
|
|
+ record.set("status", 1);
|
|
|
+ Db.use("local").save("report", record);
|
|
|
}
|
|
|
|
|
|
|