|
@ -8685,10 +8685,10 @@ public class StatisticsEsService {
|
|
|
String followUpTotal = "0";//随访总次数
|
|
|
String followupCompleteTotal = "0";
|
|
|
String followupSql = "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum from wlyy_followup f" +
|
|
|
" where f.followup_date >='"+startDate+"' and f.followup_date <='"+endDate+"' ";
|
|
|
" where f.followup_date >='"+startDate+"' and f.followup_date <='"+endDate+"' ";
|
|
|
if(StringUtils.isNotBlank(deptCode)){
|
|
|
followupSql += "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum from wlyy_followup f,base_doctor_hospital h " +
|
|
|
" where f.doctor_code=h.doctor_code and h.del=1 and h.dept_code='"+deptCode+"' " +
|
|
|
followupSql = "SELECT COUNT(f.id) planNum,COUNT(if(f.`status`=1,1,null)) finishNum from wlyy_followup f,base_doctor_hospital h " +
|
|
|
" where f.doctor_code=h.doctor_code and h.del=1 and h.dept_code='"+deptCode+"' " +
|
|
|
" and f.followup_date >='"+startDate+"' and f.followup_date <='"+endDate+"' ";
|
|
|
}
|
|
|
Map<String,Object> followupMap = jdbcTemplate.queryForMap(followupSql);
|
|
@ -9118,7 +9118,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)){
|
|
@ -9126,11 +9126,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";
|