|
@@ -1,14 +1,10 @@
|
|
|
package com.zskk.task;
|
|
|
|
|
|
-import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
-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;
|
|
@@ -25,7 +21,7 @@ public class ReviewTask implements ITask {
|
|
|
DataService dService = ServiceFactory.getService(DataService.class);
|
|
|
|
|
|
List<Record> records = Db.use("connected").find(
|
|
|
- "SELECT * FROM (select * from reportinfo where REVIEWDATE>to_date(?,'YYYY-MM-DD HH24:MI:SS')and rownum < 30)ORDER BY REVIEWDATE DESC",
|
|
|
+ "SELECT * FROM (select * from reportinfo where REVIEWDATE>to_date(?,'YYYY-MM-DD HH24:MI:SS')and rownum < 50)ORDER BY REVIEWDATE DESC",
|
|
|
getNowDate());
|
|
|
if (records == null) {
|
|
|
return;
|
|
@@ -86,10 +82,10 @@ public class ReviewTask implements ITask {
|
|
|
params.put("his_patient_id", record.getStr("PATIENTID") == null ? "" : record.getStr("PATIENTID"));
|
|
|
// 检查方法
|
|
|
params.put("exam_project", record.getStr("PROIECT"));
|
|
|
-// ThreadPoolService tService = ServiceFactory.getService(ThreadPoolService.class);
|
|
|
-// tService.execute(() -> {
|
|
|
+ ThreadPoolService tService = ServiceFactory.getService(ThreadPoolService.class);
|
|
|
+ tService.execute(() -> {
|
|
|
dService.saveReport(params);
|
|
|
-// });
|
|
|
+ });
|
|
|
} catch (Exception e) {
|
|
|
// TODO: handle exception
|
|
|
continue;
|
|
@@ -114,7 +110,7 @@ public class ReviewTask implements ITask {
|
|
|
SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
Date date = new Date();
|
|
|
//4小时
|
|
|
- Date lastDate = new Date(date.getTime()-14400000);
|
|
|
+ Date lastDate = new Date(date.getTime()-7200000);
|
|
|
String timeString = null;
|
|
|
timeString = sdf.format(lastDate);
|
|
|
return timeString;
|