Bläddra i källkod

修复关注医生接口

mengkang 5 år sedan
förälder
incheckning
b654c20a28

+ 4 - 4
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -3641,11 +3641,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " JOIN base_doctor_hospital h ON h.doctor_code = d.id "+
                " Left join ( select count(id) as total,doctor from wlyy_outpatient where status = 2 GROUP BY doctor ) a on a.doctor = d.id ";
        if (isAttention.equalsIgnoreCase("1")){
            sql+=" Left join base_doctor_patient_follow follow on follow.doctor = d.id and follow.patient ='"+patientid+"' ";
        if ("1".equalsIgnoreCase(isAttention)){
            sql+=" join base_doctor_patient_follow follow on follow.doctor = d.id and follow.patient ='"+patientid+"' ";
        }
        if (isAttention.equalsIgnoreCase("0")) {
            sql += " Left join base_doctor_patient_follow follow on follow.doctor = d.id and follow.patient !='" + patientid + "' ";
        if ("0".equalsIgnoreCase(isAttention)) {
            sql += " join base_doctor_patient_follow follow on follow.doctor = d.id and follow.patient !='" + patientid + "' ";
        }
        if(StringUtils.isNotBlank(diseaseKey)){
            sql+=" left join wlyy_doctor_special_disease sp on d.id = sp.doctor_code ";