|
@ -5452,7 +5452,7 @@ public class StatisticsESService {
|
|
|
bindingSaveModel = elasticsearchUtil.findOneDateQuotaLevel1(timeKey, area, level, index_86, SaveModel.timeLevel_DDL, "hemopiezometer");
|
|
|
allCountSql = "SELECT COUNT(*) FROM device.wlyy_devices d where device_name like '%血压%' " + areaCondition;
|
|
|
// useCountSql = "SELECT COUNT(DISTINCT p.device_sn) FROM device.wlyy_patient_health_index p LEFT JOIN device.wlyy_devices d on d.device_code=p.device_sn WHERE p.type IN (1, 2) and p.del=1 and p.type=1 and p.czrq>= '"+mondayTime+"' AND p.czrq < '"+currentTime+"' "+areaCondition ;
|
|
|
useSaveModel = elasticsearchUtil.findOneDateQuotaLevel1(mondayTime,DateUtil.getSundayOfThisDate(new Date()), area, level, index_96, SaveModel.timeLevel_ZL, "1");
|
|
|
useSaveModel = elasticsearchUtil.findOneDateQuotaLevel1(DateUtil.getSundayOfThisDate(new Date()), area, level, index_96, SaveModel.timeLevel_ZL, "1");
|
|
|
// startUseSaveModel = elasticsearchUtil.findDateQuotaLevel1(mondayTime, mondayTime, area, level, index_87, SaveModel.timeLevel_DDL, "hemopiezometer", null, null);
|
|
|
// endUseSaveModel = elasticsearchUtil.findDateQuotaLevel1(timeKey, timeKey, area, level, index_87, SaveModel.timeLevel_DDL, "hemopiezometer", null, null);
|
|
|
anomalySaveModel = elasticsearchUtil.findOneDateQuotaLevel1(timeKey, area, level, index_88, SaveModel.timeLevel_DDL, "hemopiezometer");
|
|
@ -5467,7 +5467,7 @@ public class StatisticsESService {
|
|
|
bindingSaveModel = elasticsearchUtil.findOneDateQuotaLevel1(timeKey, area, level, index_86, SaveModel.timeLevel_DDL, "glucometer");
|
|
|
allCountSql = "SELECT COUNT(*) FROM device.wlyy_devices d where device_name like '%血糖%' " + areaCondition;
|
|
|
// useCountSql = "SELECT COUNT(DISTINCT p.device_sn) FROM device.wlyy_patient_health_index p LEFT JOIN device.wlyy_devices d on d.device_code=p.device_sn WHERE p.type IN (1, 2) and p.del=1 and p.type=2 and p.czrq>= '"+mondayTime+"' AND p.czrq < '"+currentTime+"' "+areaCondition ;
|
|
|
useSaveModel = elasticsearchUtil.findOneDateQuotaLevel1(mondayTime,DateUtil.getSundayOfThisDate(new Date()), area, level, index_96, SaveModel.timeLevel_ZL, "2");
|
|
|
useSaveModel = elasticsearchUtil.findOneDateQuotaLevel1(DateUtil.getSundayOfThisDate(new Date()), area, level, index_96, SaveModel.timeLevel_ZL, "2");
|
|
|
// startUseSaveModel = elasticsearchUtil.findDateQuotaLevel1(mondayTime, mondayTime, area, level, index_87, SaveModel.timeLevel_DDL, "glucometer", null, null);
|
|
|
// endUseSaveModel = elasticsearchUtil.findDateQuotaLevel1(timeKey, timeKey, area, level, index_87, SaveModel.timeLevel_DDL, "glucometer", null, null);
|
|
|
anomalySaveModel = elasticsearchUtil.findOneDateQuotaLevel1(timeKey, area, level, index_88, SaveModel.timeLevel_DDL, "glucometer");
|
|
@ -5483,7 +5483,7 @@ public class StatisticsESService {
|
|
|
anomalySaveModel = elasticsearchUtil.findOneDateQuotaLevel0(timeKey, area, level, index_88, SaveModel.timeLevel_DDL);
|
|
|
allCountSql = "SELECT COUNT(*) FROM device.wlyy_devices d where 1=1 " + areaCondition;
|
|
|
// useCountSql = "SELECT COUNT(DISTINCT p.device_sn) FROM device.wlyy_patient_health_index p LEFT JOIN device.wlyy_devices d on d.device_code=p.device_sn WHERE p.type IN (1, 2) and p.del=1 and p.czrq>= '"+mondayTime+"' AND p.czrq < '"+currentTime+"' "+areaCondition ;
|
|
|
useSaveModel = elasticsearchUtil.findOneDateQuotaLevel0(mondayTime,DateUtil.getSundayOfThisDate(new Date()), area, level, index_96, SaveModel.timeLevel_ZL);
|
|
|
useSaveModel = elasticsearchUtil.findOneDateQuotaLevel0(DateUtil.getSundayOfThisDate(new Date()), area, level, index_96, SaveModel.timeLevel_ZL);
|
|
|
anomalyCountSaveModel = elasticsearchUtil.findOneDateQuotaLevel0(timeKey, area, level, index_97, SaveModel.timeLevel_DDL);
|
|
|
// anomalyCountSql = " SELECT COUNT(i.id) FROM device.wlyy_patient_health_index i left join device.wlyy_devices d on i.device_sn=d.device_code where i.status=1 and i.del=1 " + areaCondition;
|
|
|
// startUseSaveModel = elasticsearchUtil.findDateQuotaLevel0(mondayTime, mondayTime, area, level, index_87, SaveModel.timeLevel_DDL, null, null);
|
|
@ -5634,7 +5634,7 @@ public class StatisticsESService {
|
|
|
obj.put("code", one.get("doctorCode"));
|
|
|
obj.put("name", one.get("doctorName"));
|
|
|
obj.put("amount", one.get("amount"));
|
|
|
obj = deviceRateList(obj,hos);
|
|
|
obj = deviceRateList(obj,hos,String.valueOf(obj.get("doctorCode")));
|
|
|
if("other".equals(one.get("doctorCode")+"")){
|
|
|
amount += Integer.valueOf(obj.get("amount")+"");
|
|
|
allNum += Integer.valueOf(obj.get("allNum")+"");
|
|
@ -5766,13 +5766,14 @@ public class StatisticsESService {
|
|
|
}
|
|
|
|
|
|
//按绑定的医生列表展示绑定的设备列表
|
|
|
public Map<String, Object> deviceRateList(Map<String, Object> reMap,Hospital hos){
|
|
|
public Map<String, Object> deviceRateList(Map<String, Object> reMap,Hospital hos,String doctor){
|
|
|
// String sql = " select count(1) as amount 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.doctor is not null and d.grant_org_code ='" + hos.getCode() + "' and p.doctor='"+reMap.get("code")+"'";
|
|
|
String temp = "other".equals(reMap.get("code"))? " and p.doctor is null ":" and p.doctor='"+reMap.get("code")+"' ";
|
|
|
String sql = " select count(1) as amount " +
|
|
|
/* String sql = " select count(1) as amount " +
|
|
|
" 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 " +
|
|
|
" where d.is_binding in (1,2) and p.category_code in('1','2') and d.grant_org_code ='" + hos.getCode() + "' "+temp+") a " +
|
|
|
" GROUP BY a.doctor,a.name";
|
|
|
" GROUP BY a.doctor,a.name";*/
|
|
|
String sql ="SELECT count(1) as amount from device.wlyy_devices wd LEFT JOIN dm_device dd ON wd.device_model=dd.model where grant_doctor ='"+doctor+"' AND dd.category_code IN('1','2')";
|
|
|
// Map<String, Object> map = jdbcTemplate.queryForMap(sql);
|
|
|
List<Map<String,Object>> result = jdbcTemplate.queryForList(sql);
|
|
|
Map<String,Object> map = result.get(0);
|