|
@@ -8,7 +8,6 @@ import java.util.UUID;
|
|
|
import com.jfinal.plugin.activerecord.Db;
|
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
|
import com.jfinal.plugin.cron4j.ITask;
|
|
|
-import com.zskk.service.ServiceFactory;
|
|
|
import com.zskk.model.Doctors;
|
|
|
import com.zskk.model.PatientInfos;
|
|
|
import com.zskk.model.Report;
|
|
@@ -51,11 +50,13 @@ public class DataTask implements ITask {
|
|
|
patientInfos.setPhone(record.getStr("PHONE"));
|
|
|
// patientInfos.setCardNum(record.getStr("IDCARD"));
|
|
|
patientInfos.update();
|
|
|
+ exams2.setClinDiag("DIAGNOSIS");
|
|
|
+ exams2.setClinSymp(record.getStr("SYMPTOM"));
|
|
|
exams2.setApplicationDoctor(record.getStr("CLINICALDOCTOR"));
|
|
|
exams2.setApplicationDepartment(record.getStr("DEPARTMENT"));
|
|
|
exams2.setExamStatus(9);
|
|
|
exams2.update();
|
|
|
- WeixinService wService = ServiceFactory.getService(WeixinService.class);
|
|
|
+ WeixinService wService = new WeixinService();
|
|
|
wService.requestWeixinQrcode(report.getId());
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
@@ -81,9 +82,18 @@ 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=74300002",name);
|
|
|
+ Doctors doctors = Doctors.dao.use("zskk").findFirst("SELECT * FROM doctors where instr(?,realname) and institution_id=74300002 and realname<>null",name);
|
|
|
if (doctors == null) {
|
|
|
- return null;
|
|
|
+ Doctors newDoctors = new Doctors().use("zskk");
|
|
|
+ newDoctors.setId(creatId());
|
|
|
+ newDoctors.setUsername("none");
|
|
|
+ newDoctors.setRealname(name);
|
|
|
+ newDoctors.setPassword("123456");
|
|
|
+ newDoctors.setInstitutionId("74300002");
|
|
|
+ newDoctors.setCreatedAt(new Date());
|
|
|
+ newDoctors.setUpdatedAt(new Date());
|
|
|
+ newDoctors.save();
|
|
|
+ return newDoctors.getId();
|
|
|
}
|
|
|
return doctors.getId();
|
|
|
}
|