|
@ -8918,7 +8918,7 @@ public class StatisticsEsService {
|
|
|
}
|
|
|
|
|
|
//诊后随访明细
|
|
|
public List<Map<String,Object>> followupDetail(String startDate,String endDate,Integer flag,String sort){
|
|
|
public List<Map<String,Object>> followupDetail(String startDate,String endDate,Integer flag,String sort,String deptCode){
|
|
|
if(StringUtils.isBlank(sort)){
|
|
|
sort = "complete";
|
|
|
}
|
|
@ -8934,6 +8934,10 @@ public class StatisticsEsService {
|
|
|
endDate = DateUtil.getCurrentYearEndTime();
|
|
|
}
|
|
|
}
|
|
|
String deptCondition= "";
|
|
|
if (StringUtils.isNoneBlank(dept)){
|
|
|
deptCondition += " and h.dept_code = '"+deptCode+"' ";
|
|
|
}
|
|
|
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, " +
|
|
@ -8941,7 +8945,7 @@ public class StatisticsEsService {
|
|
|
",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+"' " +
|
|
|
" and f.followup_date>='"+startDate+"' and f.followup_date<='"+endDate+"' " +deptCondition+
|
|
|
"GROUP BY f.doctor_name,h.dept_name ";
|
|
|
List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
final String sortTmp = sort;
|