|
@@ -25,19 +25,17 @@ public class DataTask implements ITask {
|
|
try {
|
|
try {
|
|
List<Exams> exams = Exams.dao.use("zskk").find("SELECT * FROM pacsonline.exams where exam_status=3 and institution_id=44000003 order by createdAt desc limit 50");
|
|
List<Exams> exams = Exams.dao.use("zskk").find("SELECT * FROM pacsonline.exams where exam_status=3 and institution_id=44000003 order by createdAt desc limit 50");
|
|
for (Exams exams2 : exams) {
|
|
for (Exams exams2 : exams) {
|
|
|
|
+ try {
|
|
Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
Record recordTemp = Db.use("connected").findFirst("select * from v_all_img_idx@PACSINTERFACE where F_STU_UID=?",studies.getStudyuid());
|
|
Record recordTemp = Db.use("connected").findFirst("select * from v_all_img_idx@PACSINTERFACE where F_STU_UID=?",studies.getStudyuid());
|
|
if (recordTemp == null) {
|
|
if (recordTemp == null) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- Record record;
|
|
|
|
- try {
|
|
|
|
- record = Db.use("connected").findFirst("select * from yxjK where STUDYUID=?",recordTemp.getStr("F_STU_NO"));
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ Record record = Db.use("connected").findFirst("select * from yxjK where STUDYUID=?",recordTemp.getStr("F_STU_NO"));
|
|
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- // TODO: handle exception
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
if (record == null) {
|
|
if (record == null) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
@@ -60,7 +58,7 @@ public class DataTask implements ITask {
|
|
PatientInfos patientInfos = PatientInfos.dao.use("zskk").findById(exams2.getPatientId());
|
|
PatientInfos patientInfos = PatientInfos.dao.use("zskk").findById(exams2.getPatientId());
|
|
patientInfos.setName(record.getStr("PATIENTNAME"));
|
|
patientInfos.setName(record.getStr("PATIENTNAME"));
|
|
patientInfos.setPhone(record.getStr("PHONE")==null?"":record.getStr("PHONE"));
|
|
patientInfos.setPhone(record.getStr("PHONE")==null?"":record.getStr("PHONE"));
|
|
- patientInfos.setCardNum(record.getStr("IDCARD"));
|
|
|
|
|
|
+ patientInfos.setCardNum(record.getStr("IDCARD")==null?"":record.getStr("IDCARD"));
|
|
patientInfos.update();
|
|
patientInfos.update();
|
|
exams2.setApplicationDepartment(record.getStr("DEPATMENT"));
|
|
exams2.setApplicationDepartment(record.getStr("DEPATMENT"));
|
|
exams2.setApplicationDoctor(record.getStr("CLINICALDOCTOR"));
|
|
exams2.setApplicationDoctor(record.getStr("CLINICALDOCTOR"));
|
|
@@ -68,6 +66,10 @@ public class DataTask implements ITask {
|
|
exams2.update();
|
|
exams2.update();
|
|
WeixinService wService = ServiceFactory.getService(WeixinService.class);
|
|
WeixinService wService = ServiceFactory.getService(WeixinService.class);
|
|
wService.requestWeixinQrcode(report.getId());
|
|
wService.requestWeixinQrcode(report.getId());
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ // TODO: handle exception
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
// TODO: handle exception
|
|
// TODO: handle exception
|