|
@ -9011,14 +9011,16 @@ public class StatisticsEsService {
|
|
|
}
|
|
|
endDate = endDate +" 23:59:59";
|
|
|
String sql = "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum, " +
|
|
|
"COUNT(if(f.`status`=1,if(f.followup_date<f.followup_plan_date,1,null ),null)) ontimeNum, " +
|
|
|
"COUNT(if(f.followup_date>=f.followup_plan_date,1,null)) overTimeNum,count(DISTINCT f.patient_code) patientNum " +
|
|
|
"COUNT(if(f.`status`=1,if(f.followup_date<=f.followup_plan_date,1,null ),null)) ontimeNum, " +
|
|
|
"COUNT(if(f.followup_date>f.followup_plan_date,1,null)) overTimeNum,count(DISTINCT IF(f.status=1,(f.patient_code),NULL)) patientNum " +
|
|
|
",f.doctor_name doctorName,h.dept_name deptName" +
|
|
|
" 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+"' " +
|
|
|
"GROUP BY f.doctor_name,h.dept_name ";
|
|
|
System.out.println("sql==========="+sql);
|
|
|
List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
|
|
|
final String sortTmp = sort;
|
|
|
Map<String, List<Map<String, Object>>> resList = list.stream().collect(Collectors.groupingBy(e -> e.get("deptName").toString()));
|
|
|
List<Map<String,Object>> tmpList = new ArrayList<>();
|