Explorar el Código

专病服务代码优化

huangwenjie hace 6 años
padre
commit
d948fd8ed8

+ 2 - 2
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistService.java

@ -642,12 +642,12 @@ public class SpecialistService{
                "doctor.czrq AS czrq," +
                "doctor.del AS del," +
                "doctor.idcard AS idcard " +
                "FROM wlyy.wlyy_doctor doctor RIGHT JOIN ( " +
                "FROM wlyy.wlyy_doctor doctor JOIN ( " +
                "SELECT a.doctor AS doctorcode FROM wlyy.wlyy_sign_family a RIGHT JOIN ( " +
                "SELECT patient FROM wlyy_specialist_patient_relation WHERE sign_status> 0 AND `status`>=0 AND doctor='"+doctor+"') b ON a.patient=b.patient WHERE a.`status`=1 AND a.expenses_status = 1 " +
                "UNION  " +
                "SELECT a.doctor_health AS doctorcode FROM wlyy.wlyy_sign_family a RIGHT JOIN ( " +
                "SELECT patient FROM wlyy_specialist_patient_relation WHERE sign_status> 0 AND `status`>=0 AND health_doctor='"+doctor+"') b ON a.patient=b.patient WHERE a.`status`=1 AND a.expenses_status = 1 " +
                "SELECT patient FROM wlyy_specialist_patient_relation WHERE sign_status> 0 AND `status`>=0 AND doctor='"+doctor+"') b ON a.patient=b.patient WHERE a.`status`=1 AND a.expenses_status = 1 " +
                ") " +
                "t ON doctor.CODE=t.doctorcode";
        List<SignFamilyDoctorVO> patientSignInfoVOs = jdbcTemplate.query(sql,new BeanPropertyRowMapper(SignFamilyDoctorVO.class));