|
@ -66,6 +66,8 @@ public class DoorStatisticAnalyzeService {
|
|
|
map = esModelList.stream().collect(Collectors.groupingBy(SaveModel::getHospital));
|
|
|
} else if (lowLevel.equals("5")) {
|
|
|
map = esModelList.stream().collect(Collectors.groupingBy(SaveModel::getDept));
|
|
|
}else if (lowLevel.equals("6")) {
|
|
|
map = esModelList.stream().collect(Collectors.groupingBy(SaveModel::getDoctor));
|
|
|
}
|
|
|
for (String one1 : map.keySet()) {
|
|
|
Map<String, Object> resultMap = new HashMap();
|
|
@ -77,6 +79,8 @@ public class DoorStatisticAnalyzeService {
|
|
|
resultMap.put("name", list1.get(0).getHospitalName());
|
|
|
} else if (lowLevel.equals("5")) {
|
|
|
resultMap.put("name", list1.get(0).getDeptName());
|
|
|
}else if (lowLevel.equals("6")) {
|
|
|
resultMap.put("name", list1.get(0).getDoctorName());
|
|
|
}
|
|
|
Map<String, List<SaveModel>> map2 = list1.stream().collect(Collectors.groupingBy(SaveModel::getSlaveKey1));
|
|
|
//0、审核中,1、未通过,2、已通过
|
|
@ -302,6 +306,8 @@ public class DoorStatisticAnalyzeService {
|
|
|
map = esModelList.stream().collect(Collectors.groupingBy(SaveModel::getHospital));
|
|
|
} else if (lowLevel.equals("5")) {
|
|
|
map = esModelList.stream().collect(Collectors.groupingBy(SaveModel::getDept));
|
|
|
}else if(lowLevel.equals("6")){
|
|
|
map = esModelList.stream().collect(Collectors.groupingBy(SaveModel::getDoctor));
|
|
|
}
|
|
|
for (String one1 : map.keySet()) {
|
|
|
Map<String, Object> resultMap = new HashMap();
|
|
@ -313,6 +319,8 @@ public class DoorStatisticAnalyzeService {
|
|
|
resultMap.put("name", list1.get(0).getHospitalName());
|
|
|
} else if (lowLevel.equals("5")) {
|
|
|
resultMap.put("name", list1.get(0).getDeptName());
|
|
|
}else if (lowLevel.equals("6")) {
|
|
|
resultMap.put("name", list1.get(0).getDoctorName());
|
|
|
}
|
|
|
Map<String, List<SaveModel>> map2 = list1.stream().collect(Collectors.groupingBy(SaveModel::getSlaveKey1));
|
|
|
//工单状态:-1-已取消,1-待(调度员)派单,2-待(医生)接单,3-待服务,4-待付款,5-待评价,6-已完成,评价均分-evaluateSplit
|
|
@ -417,6 +425,8 @@ public class DoorStatisticAnalyzeService {
|
|
|
map = esModelList.stream().collect(Collectors.groupingBy(SaveModel::getHospital));
|
|
|
} else if (lowLevel.equals("5")) {
|
|
|
map = esModelList.stream().collect(Collectors.groupingBy(SaveModel::getDept));
|
|
|
}else if (lowLevel.equals("6")) {
|
|
|
map = esModelList.stream().collect(Collectors.groupingBy(SaveModel::getDoctor));
|
|
|
}
|
|
|
for (String one1 : map.keySet()) {
|
|
|
Map<String, Object> resultMap = new HashMap();
|
|
@ -428,6 +438,8 @@ public class DoorStatisticAnalyzeService {
|
|
|
resultMap.put("name", list1.get(0).getHospitalName());
|
|
|
} else if (lowLevel.equals("5")) {
|
|
|
resultMap.put("name", list1.get(0).getDeptName());
|
|
|
}else if (lowLevel.equals("6")) {
|
|
|
resultMap.put("name", list1.get(0).getDoctorName());
|
|
|
}
|
|
|
Map<String, List<SaveModel>> map2 = list1.stream().collect(Collectors.groupingBy(SaveModel::getSlaveKey1));
|
|
|
resultMap.put("h01", map2.get("1").get(0).getResult2().intValue());
|
|
@ -580,6 +592,8 @@ public class DoorStatisticAnalyzeService {
|
|
|
map = esModelList.stream().collect(Collectors.groupingBy(SaveModel::getHospital));
|
|
|
} else if (lowLevel.equals("5")) {
|
|
|
map = esModelList.stream().collect(Collectors.groupingBy(SaveModel::getDept));
|
|
|
}else if (lowLevel.equals("6")) {
|
|
|
map = esModelList.stream().collect(Collectors.groupingBy(SaveModel::getDoctor));
|
|
|
}
|
|
|
for (String one1 : map.keySet()) {
|
|
|
Map<String, Object> resultMap = new HashMap();
|
|
@ -591,6 +605,8 @@ public class DoorStatisticAnalyzeService {
|
|
|
resultMap.put("name", list1.get(0).getHospitalName());
|
|
|
} else if (lowLevel.equals("5")) {
|
|
|
resultMap.put("name", list1.get(0).getDeptName());
|
|
|
}else if (lowLevel.equals("6")) {
|
|
|
resultMap.put("name", list1.get(0).getDoctorName());
|
|
|
}
|
|
|
//上门出诊人次
|
|
|
Map<String, List<SaveModel>> map2 = list1.stream().collect(Collectors.groupingBy(SaveModel::getSlaveKey1));
|
|
@ -1017,8 +1033,8 @@ public class DoorStatisticAnalyzeService {
|
|
|
low_level = lowLevel;
|
|
|
}
|
|
|
if (SaveModel.deptLevel.equals(low_level)) {
|
|
|
sql.append("select team,teamName,slaveKey1,slaveKey1Name,sum(result1) result1, sum(result2) result2,quotaDate from " + esIndex + " where ");
|
|
|
groupBy.append(" group by team,teamName");
|
|
|
sql.append("select dept,deptName,slaveKey1,slaveKey1Name,sum(result1) result1, sum(result2) result2,quotaDate from " + esIndex + " where ");
|
|
|
groupBy.append(" group by dept,deptName");
|
|
|
groupBy.append(",slaveKey1,slaveKey1Name");
|
|
|
} else if (SaveModel.OrgLevel.equals(low_level)) {
|
|
|
sql.append("select hospital,hospitalName,slaveKey1,slaveKey1Name,sum(result1) result1,sum(result2) result2,quotaDate from " + esIndex + " where ");
|
|
@ -1032,17 +1048,23 @@ public class DoorStatisticAnalyzeService {
|
|
|
sql.append("select city,cityName,slaveKey1,slaveKey1Name,sum(result1) result1,sum(result2) result2,quotaDate from " + esIndex + " where ");
|
|
|
groupBy.append(" group by city,cityName");
|
|
|
groupBy.append(",slaveKey1,slaveKey1Name");
|
|
|
}else if (SaveModel.doctorLevel.equals(low_level)) {
|
|
|
sql.append("select doctor,doctorName,slaveKey1,slaveKey1Name,sum(result1) result1,sum(result2) result2,quotaDate from " + esIndex + " where ");
|
|
|
groupBy.append(" group by doctor,doctorName");
|
|
|
groupBy.append(",slaveKey1,slaveKey1Name");
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotEmpty(area)) {
|
|
|
if (SaveModel.deptLevel.equals(level + "")) {
|
|
|
sql.append(" team='" + area + "'");
|
|
|
sql.append(" dept='" + area + "'");
|
|
|
} else if (SaveModel.OrgLevel.equals(level + "")) {
|
|
|
sql.append(" hospital='" + area + "'");
|
|
|
} else if (SaveModel.townLevel.equals(level + "")) {
|
|
|
sql.append(" town='" + area + "'");
|
|
|
} else if (SaveModel.cityLevel.equals(level + "")) {
|
|
|
sql.append(" city='" + area + "'");
|
|
|
}else if (SaveModel.doctorLevel.equals(level + "")) {
|
|
|
sql.append(" doctor='" + area + "'");
|
|
|
}
|
|
|
sql.append(" and ");
|
|
|
}
|
|
@ -1148,7 +1170,10 @@ public class DoorStatisticAnalyzeService {
|
|
|
}else if(level == 4){
|
|
|
whereSql += "and f.hospital = '" + area + "' ";
|
|
|
}else if(level == 5){
|
|
|
whereSql += "and f.admin_team_code='" + area + "' ";
|
|
|
sql = sql.replace("f.patient = o.patient","f.patient = o.patient join wlyy.wlyy_doctor d on f.doctor = d.code and d.`status`= 1 ");
|
|
|
whereSql += "and d.dept='" +area + "' ";
|
|
|
}else if(level == 6){
|
|
|
whereSql += "and (f.doctor = '"+ area + "' or f.doctor_health = '"+area + "') ";
|
|
|
}
|
|
|
Integer doorPatientService = jdbcTemplate.queryForObject(sql + whereSql, Integer.class);
|
|
|
resMap.put("doorPatientServiceCount", doorPatientService);
|
|
@ -1197,7 +1222,10 @@ public class DoorStatisticAnalyzeService {
|
|
|
}else if(level == 4){
|
|
|
sql += "and f.hospital = '" + area + "' ";
|
|
|
}else if(level == 5){
|
|
|
sql += "and f.admin_team_code='" + area + "' ";
|
|
|
sql = sql.replace("f.patient = p.patient","f.patient = o.patient join wlyy.wlyy_doctor d on f.doctor = d.code and d.`status`= 1 ");
|
|
|
sql += "and d.dept='" +area + "' ";
|
|
|
}else if(level == 6){
|
|
|
sql += "and (f.doctor = '"+ area + "' or f.doctor_health = '"+area + "') ";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
sql += "and p.create_time >= '" + startDate + "' ";
|
|
@ -1232,7 +1260,10 @@ public class DoorStatisticAnalyzeService {
|
|
|
}else if(level == 4){
|
|
|
drugSql += "and f.hospital = '" + area + "' ";
|
|
|
}else if(level == 5){
|
|
|
drugSql += "and f.admin_team_code='" + area + "' ";
|
|
|
drugSql = drugSql.replace("f.patient = p.patient","f.patient = o.patient join wlyy.wlyy_doctor d on f.doctor = d.code and d.`status`= 1 ");
|
|
|
drugSql += "and d.dept='" +area + "' ";
|
|
|
}else if(level == 6){
|
|
|
drugSql += "and (f.doctor = '"+ area + "' or f.doctor_health = '"+area + "') ";
|
|
|
}
|
|
|
drugSql += "GROUP BY d.drug_code order by orderCount desc, patientCount desc limit " + (page-1) * pageSize + "," + pageSize;
|
|
|
List<Map<String, Object>> list = jdbcTemplate.queryForList(drugSql);
|
|
@ -1261,6 +1292,8 @@ public class DoorStatisticAnalyzeService {
|
|
|
map1 = slaveList.stream().collect(Collectors.groupingBy(SaveModel::getTown));
|
|
|
} else if (SaveModel.deptLevel.equals(lowLevel)) {
|
|
|
map1 = slaveList.stream().collect(Collectors.groupingBy(SaveModel::getDept));
|
|
|
}else if (SaveModel.doctorLevel.equals(lowLevel)) {
|
|
|
map1 = slaveList.stream().collect(Collectors.groupingBy(SaveModel::getDoctor));
|
|
|
}
|
|
|
// Map<String, List<SaveModel>> map1 = slaveList.stream().collect(Collectors.groupingBy(SaveModel::getHospital));
|
|
|
for (String one1 : map1.keySet()) {
|
|
@ -1273,6 +1306,8 @@ public class DoorStatisticAnalyzeService {
|
|
|
childrenResultMap.put("name", list1.get(0).getTownName());
|
|
|
} else if (SaveModel.deptLevel.equals(lowLevel)) {
|
|
|
childrenResultMap.put("name", list1.get(0).getDeptName());
|
|
|
}else if (SaveModel.doctorLevel.equals(lowLevel)) {
|
|
|
childrenResultMap.put("name", list1.get(0).getDoctorName());
|
|
|
}
|
|
|
Map<String, List<SaveModel>> map2 = list1.stream().collect(Collectors.groupingBy(SaveModel::getSlaveKey1));
|
|
|
//工单状态:-1-已取消,1-待(调度员)派单,2-待(医生)接单,3-待服务,4-待服务,5-待评价,6-已完成,评价均分-evaluateSplit
|