|
@@ -526,14 +526,14 @@ public class PatientInfoDjFacade extends PatientInfoServiceImpl {
|
|
|
|
|
|
if (inquiryQuoteVO.getDoctorInfo() != null) {
|
|
if (inquiryQuoteVO.getDoctorInfo() != null) {
|
|
QueryWrapper<DoctorInfo> doctorInfoQe = new QueryWrapper<>();
|
|
QueryWrapper<DoctorInfo> doctorInfoQe = new QueryWrapper<>();
|
|
- doctorInfoQe.eq("hospital_code", inquiryQuoteVO.getHospitalCode());
|
|
|
|
|
|
+ doctorInfoQe.eq("hospital_code", hospitalCode);
|
|
doctorInfoQe.eq("code", inquiryQuoteVO.getDoctorInfo().getCode());
|
|
doctorInfoQe.eq("code", inquiryQuoteVO.getDoctorInfo().getCode());
|
|
DoctorInfo doctorInfo = doctorInfoFacade.getOne(doctorInfoQe, false);
|
|
DoctorInfo doctorInfo = doctorInfoFacade.getOne(doctorInfoQe, false);
|
|
Long doctorId = null;
|
|
Long doctorId = null;
|
|
if (doctorInfo == null) {
|
|
if (doctorInfo == null) {
|
|
doctorInfo = new DoctorInfo();
|
|
doctorInfo = new DoctorInfo();
|
|
doctorInfo.setGmtCreate(now);
|
|
doctorInfo.setGmtCreate(now);
|
|
- doctorInfo.setHospitalCode(inquiryQuoteVO.getHospitalCode());
|
|
|
|
|
|
+ doctorInfo.setHospitalCode(hospitalCode);
|
|
} else {
|
|
} else {
|
|
doctorId = doctorInfo.getId().longValue();
|
|
doctorId = doctorInfo.getId().longValue();
|
|
}
|
|
}
|
|
@@ -545,18 +545,19 @@ public class PatientInfoDjFacade extends PatientInfoServiceImpl {
|
|
}
|
|
}
|
|
|
|
|
|
QueryWrapper<PatientInfo> patientInfoQe = new QueryWrapper<>();
|
|
QueryWrapper<PatientInfo> patientInfoQe = new QueryWrapper<>();
|
|
- patientInfoQe.eq("hospital_code", inquiryQuoteVO.getHospitalCode());
|
|
|
|
- patientInfoQe.eq("name", inquiryQuoteVO.getPatientInfo().getName());
|
|
|
|
- patientInfoQe.and(a ->
|
|
|
|
- a.eq("id_no", inquiryQuoteVO.getPatientInfo().getIdNo())
|
|
|
|
- .or()
|
|
|
|
- .eq("identity_num", inquiryQuoteVO.getPatientInfo().getIdentityNum()));
|
|
|
|
|
|
+ patientInfoQe.eq("hospital_code", hospitalCode);
|
|
|
|
+ patientInfoQe.eq("code", inquiryQuoteVO.getPatientInfo().getCode());
|
|
|
|
+ // patientInfoQe.eq("name", inquiryQuoteVO.getPatientInfo().getName());
|
|
|
|
+ // patientInfoQe.and(a ->
|
|
|
|
+ // a.eq("id_no", inquiryQuoteVO.getPatientInfo().getIdNo())
|
|
|
|
+ // .or()
|
|
|
|
+ // .eq("identity_num", inquiryQuoteVO.getPatientInfo().getIdentityNum()));
|
|
PatientInfo patientInfo = getOne(patientInfoQe, false);
|
|
PatientInfo patientInfo = getOne(patientInfoQe, false);
|
|
Long patientId = null;
|
|
Long patientId = null;
|
|
if (patientInfo == null) {
|
|
if (patientInfo == null) {
|
|
patientInfo = new PatientInfo();
|
|
patientInfo = new PatientInfo();
|
|
patientInfo.setGmtCreate(now);
|
|
patientInfo.setGmtCreate(now);
|
|
- patientInfo.setHospitalCode(inquiryQuoteVO.getHospitalCode());
|
|
|
|
|
|
+ patientInfo.setHospitalCode(hospitalCode);
|
|
} else {
|
|
} else {
|
|
patientId = patientInfo.getId().longValue();
|
|
patientId = patientInfo.getId().longValue();
|
|
}
|
|
}
|