刘韬 6 yıl önce
ebeveyn
işleme
c06257e1df

+ 4 - 4
DataFusion/src/com/zskk/control/ViewController.java

@@ -50,7 +50,7 @@ public class ViewController extends Controller {
 				if (report == null) {
 					continue;
 				}
-				if (report.getReportDoctorId() == null) {
+				if (report.getReportDoctorId() == null || report.getReportDoctorId().equals("1")) {
 					Record record = Db.use("connected").findFirst("select * from reportinfo where patientid=?",exams2.getPatientNum());
 					report.setReportDoctorId(getDoctorIdByName(record.getStr("reportDoctor")));
 					report.update();
@@ -70,11 +70,11 @@ public class ViewController extends Controller {
 	
 	private String getDoctorIdByName(String name) {
 		if (name == null) {
-			return "1";
+			return null;
 		}
-		Doctors doctors = Doctors.dao.use("zskk").findFirst("SELECT * FROM doctors where instr(?,realname) and institution_id=73090001",name);
+		Doctors doctors = Doctors.dao.use("zskk").findFirst("SELECT * FROM doctors where instr(?,realname) and institution_id=74300003",name);
 		if (doctors == null) {
-			return "1";
+			return null;
 		}
 		return doctors.getId();
 	}