|
@ -186,7 +186,7 @@ public class SpecialistService{
|
|
|
}
|
|
|
|
|
|
|
|
|
public MixEnvelop<PatientLabelVO, PatientLabelVO> getPatientByLabel(String doctor, String labelType, String labelCode, Integer page, Integer size){
|
|
|
public MixEnvelop<PatientLabelVO, PatientLabelVO> getPatientByLabel(String doctor, String labelType,String teamCode, String labelCode, Integer page, Integer size){
|
|
|
String sql="SELECT " +
|
|
|
" p. NAME, " +
|
|
|
" p. CODE, " +
|
|
@ -222,9 +222,7 @@ public class SpecialistService{
|
|
|
" JOIN "+basedb+".wlyy_patient p ON p. CODE = lb.patient " +
|
|
|
" JOIN wlyy_specialist_patient_relation s ON s.patient = lb.patient " +
|
|
|
" WHERE s.doctor in " +
|
|
|
" (SELECT m.doctor_code FROM wlyy.wlyy_admin_team_member m where m.team_id in " +
|
|
|
" (SELECT dt.id FROM wlyy.wlyy_admin_team dt LEFT JOIN wlyy.wlyy_admin_team_member watm ON dt.id=watm.team_id " +
|
|
|
" WHERE dt.available='1' AND watm.available='1' AND watm.doctor_code='"+doctor+"') AND m.available='1') "+
|
|
|
" (SELECT m.doctor_code FROM wlyy.wlyy_admin_team_member m where m.team_id ='" +teamCode+"') "+
|
|
|
" AND s.status >=0 AND s.sign_status >0"+
|
|
|
" LIMIT "+(page-1)*size+","+size;
|
|
|
System.out.print("日志:"+sql);
|
|
@ -247,9 +245,7 @@ public class SpecialistService{
|
|
|
" WHERE a.sign_status> 0 AND a.`status`>=0 " +
|
|
|
// "AND a.doctor='"+doctor+"' OR a.health_assistant= '"+doctor+
|
|
|
" AND a.doctor in " +
|
|
|
" (SELECT m.doctor_code FROM wlyy.wlyy_admin_team_member m where m.team_id in " +
|
|
|
" (SELECT dt.id FROM wlyy.wlyy_admin_team dt LEFT JOIN wlyy.wlyy_admin_team_member watm ON dt.id=watm.team_id " +
|
|
|
" WHERE dt.available='1' AND watm.available='1' AND watm.doctor_code='"+doctor+"') AND m.available='1') "+
|
|
|
" (SELECT m.doctor_code FROM wlyy.wlyy_admin_team_member m where m.team_id ='" +teamCode+"') "+
|
|
|
" LIMIT "+(page-1)*size+","+size;
|
|
|
}
|
|
|
List<PatientLabelVO> PatientLabelVOs = jdbcTemplate.query(sql,new BeanPropertyRowMapper(PatientLabelVO.class));
|