|
@ -2683,7 +2683,7 @@ public class StatisticsService {
|
|
|
"base_service_package_sign_record sr,base_service_package_record r, base_service_package_item i,base_service_package pack " +
|
|
|
" where sr.id = r.sign_id and sr.status=1 and r.service_package_id = i.service_package_id and r.service_package_id = pack.id " +
|
|
|
" and i.del = 1 and sr.`status`=1 and CONVERT(sr.patient USING utf8) = a.id and r.team_code='"+teamId+"') or " +
|
|
|
" (EXISTS (select 1 from wlyy_patient_device pd where pd.user = a.id and pd.del=0)) ) "+filter;
|
|
|
" (EXISTS (select 1 from wlyy_patient_device pd where pd.user = a.id and pd.del=0) and a.register='1' and a.saas_id = '"+teamId+"' )) "+filter;
|
|
|
count = jdbcTemplate.queryForObject(sql,Integer.class);
|
|
|
|
|
|
map.put("oldTotal",count);//照护老人数量
|