|
@ -9117,7 +9117,7 @@ public class StatisticsEsService {
|
|
|
}
|
|
|
endDate = endDate +" 23:59:59";
|
|
|
|
|
|
String sql = "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum,h.dept_name name " +
|
|
|
String sql = "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum,h.dept_name name,h.dept_code code" +
|
|
|
" from wlyy_followup f,base_doctor_hospital h " +
|
|
|
"WHERE f.doctor_code=h.doctor_code and h.del=1 and f.followup_date>='"+startDate+"' and f.followup_date<='"+endDate+"' ";
|
|
|
if(StringUtils.isNotBlank(dept)){
|
|
@ -9125,11 +9125,11 @@ public class StatisticsEsService {
|
|
|
}
|
|
|
sql += " GROUP BY h.dept_name ";
|
|
|
if("2".equals(type)){
|
|
|
sql = "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum,f.doctor_name name " +
|
|
|
sql = "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum,f.doctor_name name,f.doctor_code code " +
|
|
|
" from wlyy_followup f WHERE 1=1 and f.followup_date>='"+startDate+"' and f.followup_date<='"+endDate+"'" +
|
|
|
" GROUP BY f.doctor_name";
|
|
|
if(StringUtils.isNotBlank(dept)){
|
|
|
sql = "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum,f.doctor_name name " +
|
|
|
sql = "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum,f.doctor_name name,f.doctor_code code " +
|
|
|
" from wlyy_followup f,base_doctor_hospital h " +
|
|
|
"WHERE f.doctor_code=h.doctor_code and h.del=1 and f.followup_date>='"+startDate+"' and f.followup_date<='"+endDate+"' "+
|
|
|
" and h.dept_code = '"+ dept +"' GROUP BY f.doctor_name";
|