|
@ -1138,6 +1138,7 @@ public class RehabilitationInfoService {
|
|
|
"FROM\n" +
|
|
|
" base_patient a\n" +
|
|
|
" left JOIN wlyy_patient_rehabilitation_plan b ON a.id = b.patient\n" +
|
|
|
" LEFT JOIN wlyy_rehabilitation_plan_detail d on b.id = d.plan_id "+
|
|
|
" INNER JOIN wlyy_rehabilitation_patient_info c ON c.patient = a.id \n" +
|
|
|
"WHERE\n" +
|
|
|
" 1 = 1 \n" +
|
|
@ -1145,7 +1146,7 @@ public class RehabilitationInfoService {
|
|
|
|
|
|
if (StringUtils.isNotBlank(doctorId) && StringUtils.isBlank(patientId)) {
|
|
|
//计划负责人或者任务执行人-执行人不为空
|
|
|
sql += " AND (b.plan_doctor='" + doctorId + "' OR c.doctor='" + doctorId + "' )";
|
|
|
sql += " AND (b.plan_doctor='" + doctorId + "' OR c.doctor='" + doctorId + "' or d.doctor='"+doctorId+"')";
|
|
|
sql += " and c.doctor is not null ";
|
|
|
}
|
|
|
|
|
@ -1197,6 +1198,7 @@ public class RehabilitationInfoService {
|
|
|
"FROM\n" +
|
|
|
" base_patient a\n" +
|
|
|
" INNER JOIN wlyy_patient_rehabilitation_plan b ON a.id = b.patient\n" +
|
|
|
" LEFT JOIN wlyy_rehabilitation_plan_detail d on b.id = d.plan_id "+
|
|
|
" INNER JOIN wlyy_rehabilitation_patient_info c ON c.patient = b.patient \n" +
|
|
|
"WHERE\n" +
|
|
|
" 1 = 1 \n" +
|
|
@ -1204,7 +1206,7 @@ public class RehabilitationInfoService {
|
|
|
|
|
|
if (StringUtils.isNotBlank(doctorId)) {
|
|
|
//计划负责人或者任务执行人-执行人不为空
|
|
|
sql += " AND (b.plan_doctor='" + doctorId + "' OR c.doctor='" + doctorId + "' )";
|
|
|
sql += " AND (b.plan_doctor='" + doctorId + "' OR c.doctor='" + doctorId + "' or d.doctor='"+doctorId+"')";
|
|
|
sql += " and c.doctor is not null ";
|
|
|
}
|
|
|
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
|
|
@ -1250,7 +1252,7 @@ public class RehabilitationInfoService {
|
|
|
"FROM\n" +
|
|
|
" base_patient a\n" +
|
|
|
" LEFT JOIN wlyy_patient_rehabilitation_plan b ON a.id = b.patient\n" +
|
|
|
" INNER JOIN wlyy_rehabilitation_patient_info c ON c.patient = b.patient \n" +
|
|
|
" INNER JOIN wlyy_rehabilitation_patient_info c ON c.code = b.patient_info_code \n" +
|
|
|
" LEFT JOIN base_disease_hospital d ON d.id=b.disease\n" +
|
|
|
"WHERE\n" +
|
|
|
" 1 = 1 \n" +
|