|
@@ -23,8 +23,9 @@ public class UpdateTask 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 80");
|
|
|
+ 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 50");
|
|
|
for (Exams exams2 : exams) {
|
|
|
+ try {
|
|
|
Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
|
Record record = Db.use("connected2").findFirst("select * from reportinfo where STUDYUID=?",studies.getStudyuid());
|
|
|
if (record == null) {
|
|
@@ -48,8 +49,8 @@ public class UpdateTask implements ITask {
|
|
|
report.save();
|
|
|
PatientInfos patientInfos = PatientInfos.dao.use("zskk").findById(exams2.getPatientId());
|
|
|
patientInfos.setName(record.getStr("PATIENTNAME"));
|
|
|
- patientInfos.setPhone(record.getStr("PHONE"));
|
|
|
- patientInfos.setCardNum(record.getStr("IDCARD"));
|
|
|
+ patientInfos.setPhone(record.getStr("PHONE")==null?"":record.getStr("PHONE"));
|
|
|
+ patientInfos.setCardNum(record.getStr("IDCARD")==null?"":record.getStr("IDCARD"));
|
|
|
patientInfos.update();
|
|
|
exams2.setApplicationDepartment(record.getStr("DEPARTMENT"));
|
|
|
exams2.setApplicationDoctor(record.getStr("CLINICALDOCTOR"));
|
|
@@ -57,6 +58,10 @@ public class UpdateTask implements ITask {
|
|
|
exams2.update();
|
|
|
WeixinService wService = ServiceFactory.getService(WeixinService.class);
|
|
|
wService.requestWeixinQrcode(report.getId());
|
|
|
+ } catch (Exception e) {
|
|
|
+ // TODO: handle exception
|
|
|
+ continue;
|
|
|
+ }
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
// TODO: handle exception
|