|
@ -5573,15 +5573,15 @@ public class StatisticsESService {
|
|
|
int map1value = 0;
|
|
|
int map2value = 0;
|
|
|
if(sortType==1){
|
|
|
map1value = (int) o1.get("allNum");
|
|
|
map2value = (int) o2.get("allNum");
|
|
|
map1value = Integer.valueOf(o1.get("allNum").toString());
|
|
|
map2value = Integer.valueOf(o2.get("allNum").toString());
|
|
|
|
|
|
}else if(sortType==2){
|
|
|
map1value = (int) o1.get("bindingNum");
|
|
|
map2value = (int) o2.get("bindingNum");
|
|
|
map1value = Integer.valueOf(o1.get("bindingNum").toString());
|
|
|
map2value = Integer.valueOf(o2.get("bindingNum").toString());
|
|
|
}else {
|
|
|
map1value = (int) o1.get("rateNum");
|
|
|
map2value = (int) o2.get("rateNum");
|
|
|
map1value = Integer.valueOf(o1.get("rateNum").toString());
|
|
|
map2value = Integer.valueOf(o2.get("rateNum").toString());
|
|
|
}
|
|
|
if (map1value - map2value > 0) {
|
|
|
return sort == 1 ? -1 : 1;
|
|
@ -5624,7 +5624,7 @@ public class StatisticsESService {
|
|
|
}
|
|
|
// String sql = " select count(DISTINCT p.doctor,p.device_sn) AS amount,p.doctor as doctorCode,r.name as doctorName from wlyy.wlyy_patient_device p JOIN wlyy.wlyy_doctor r on p.doctor is not null and p.doctor =r.code LEFT JOIN device.wlyy_devices d on p.device_sn=d.device_code where p.del=0 and p.doctor is not null and d.grant_org_code ='" + hos.getCode() + "' group by p.doctor,r.name";
|
|
|
String sql = " select count(*) as amount,if(a.doctor is null,'other',a.doctor) as doctorCode,if(a.NAME is null,'其他',a.NAME) as doctorName " +
|
|
|
" from (select DISTINCT p.doctor,r.name,p.device_sn FROM wlyy.wlyy_patient_device p left join device.wlyy_devices d on p.device_sn=d.device_code left JOIN wlyy.wlyy_doctor r ON p.doctor = r. CODE " +
|
|
|
" from (select DISTINCT p.doctor,r.name,p.device_sn FROM wlyy.wlyy_patient_device p RIGHT join device.wlyy_devices d on p.device_sn=d.device_code left JOIN wlyy.wlyy_doctor r ON p.doctor = r. CODE " +
|
|
|
"where p.del=0 and d.is_binding in (1,2) and p.category_code in('1','2') and d.grant_org_code ='" + hos.getCode() + "') a " +
|
|
|
" GROUP BY a.doctor,a.name";
|
|
|
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
|