|
@@ -13,6 +13,7 @@ import com.zskk.model.Doctors;
|
|
|
import com.zskk.model.Exams;
|
|
|
import com.zskk.model.PatientInfos;
|
|
|
import com.zskk.model.Report;
|
|
|
+import com.zskk.model.Studies;
|
|
|
//import com.zskk.model.Studies;
|
|
|
import com.zskk.service.WeixinService;
|
|
|
|
|
@@ -22,10 +23,10 @@ public class DataTask implements ITask {
|
|
|
public void run() {
|
|
|
// TODO Auto-generated method stub
|
|
|
try {
|
|
|
- List<Exams> exams = Exams.dao.use("zskk").find("SELECT * FROM pacsonline.exams where exam_status=3 and institution_id=51000001 order by createdAt desc limit 30");
|
|
|
+ List<Exams> exams = Exams.dao.use("zskk").find("SELECT * FROM pacsonline.exams where exam_status=3 and institution_id=47600001 order by createdAt desc limit 30");
|
|
|
for (Exams exams2 : exams) {
|
|
|
-// Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
|
- Record record = Db.use("connected").findFirst("select * from reportinfo where studyuid=?",exams2.getPatientNum());
|
|
|
+ Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
|
+ Record record = Db.use("connected").findFirst("select * from V_EXAMREQUESTS where studyuid=?",studies.getStudyuid());
|
|
|
if (record == null) {
|
|
|
continue;
|
|
|
}
|
|
@@ -78,7 +79,7 @@ public class DataTask implements ITask {
|
|
|
if (name == null) {
|
|
|
return null;
|
|
|
}
|
|
|
- Doctors doctors = Doctors.dao.use("zskk").findFirst("SELECT * FROM doctors where instr(?,realname) and institution_id=51000001",name);
|
|
|
+ Doctors doctors = Doctors.dao.use("zskk").findFirst("SELECT * FROM doctors where instr(?,realname) and institution_id=47600001",name);
|
|
|
if (doctors == null) {
|
|
|
return null;
|
|
|
}
|
|
@@ -89,7 +90,7 @@ public class DataTask implements ITask {
|
|
|
if (dateStr == null) {
|
|
|
return new Date();
|
|
|
}
|
|
|
- SimpleDateFormat sdf= new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
|
|
|
+ SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
Date date = null;
|
|
|
try {
|
|
|
date = sdf.parse(dateStr);
|