|
@@ -6,7 +6,6 @@ import com.jfinal.plugin.cron4j.ITask;
|
|
import com.zskk.model.*;
|
|
import com.zskk.model.*;
|
|
import com.zskk.service.ServiceFactory;
|
|
import com.zskk.service.ServiceFactory;
|
|
import com.zskk.service.WeixinService;
|
|
import com.zskk.service.WeixinService;
|
|
-
|
|
|
|
import java.text.ParseException;
|
|
import java.text.ParseException;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
@@ -24,18 +23,20 @@ public class DataTask implements ITask {
|
|
for (Exams exams2 : exams) {
|
|
for (Exams exams2 : exams) {
|
|
try {
|
|
try {
|
|
// Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
// Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
- Record record = Db.use("connected").findFirst("select * from (select * from zlhis.zskk_reportinfo_1 order by REPORTDATE desc) where ACCESSIONNUMBER=?",exams2.getAccessionNum());
|
|
|
|
|
|
+ Record record3 = Db.use("connected").findFirst("SELECT * FROM zlhis.zskk_reportinfo where 类型='诊断意见' and ACCESSIONNUMBER=?",exams2.getAccessionNum());
|
|
|
|
+ Record record2 = Db.use("connected").findFirst("SELECT * FROM zlhis.zskk_reportinfo where 类型='检查所见' and ACCESSIONNUMBER=?",exams2.getAccessionNum());
|
|
|
|
+ Record record = Db.use("connected").findFirst("SELECT * FROM zlhis.zskk_reportinfo_1 where ACCESSIONNUMBER=?",exams2.getAccessionNum());
|
|
if (record == null) {
|
|
if (record == null) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
Report report = new Report().use("zskk");
|
|
Report report = new Report().use("zskk");
|
|
report.setId(creatId());
|
|
report.setId(creatId());
|
|
report.setReportDatetime(parseStringToDate(record.getStr("REPORTDATE")));
|
|
report.setReportDatetime(parseStringToDate(record.getStr("REPORTDATE")));
|
|
- if (record.getStr("IMPRESSION") == null && record.getStr("DESCRIPTION") == null) {
|
|
|
|
|
|
+ if (record2.getStr("内容") == null && record3.getStr("内容") == null) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- report.setImpression(record.getStr("IMPRESSION"));
|
|
|
|
- report.setDescription(record.getStr("DESCRIPTION"));
|
|
|
|
|
|
+ report.setImpression(record3.getStr("内容"));
|
|
|
|
+ report.setDescription(record2.getStr("内容"));
|
|
report.setExamId(exams2.getId());
|
|
report.setExamId(exams2.getId());
|
|
report.setCreatedAt(new Date());
|
|
report.setCreatedAt(new Date());
|
|
report.setReportDoctorId(getDoctorIdByName(record.getStr("REPORTDOCTOR")));
|
|
report.setReportDoctorId(getDoctorIdByName(record.getStr("REPORTDOCTOR")));
|