|
@ -1648,6 +1648,69 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
List<WlyyDoctorWorkTimeVO> times = findDoctorWorkTime(doctor);
|
|
|
rs.put("workTime",times);
|
|
|
}
|
|
|
|
|
|
//查询医生各项评价平均分
|
|
|
String sqlscore = "SELECT " +
|
|
|
"AVG(a.score) AS score," +
|
|
|
"a.score_type AS score_type " +
|
|
|
"FROM base_evaluate a,base_evaluate_score b " +
|
|
|
"WHERE " +
|
|
|
"a.relation_code=b.id " +
|
|
|
"AND b.doctor='"+doctor+"' " +
|
|
|
"GROUP BY a.score_type";
|
|
|
List<Map<String,Object>> listscore = jdbcTemplate.queryForList(sqlscore);
|
|
|
|
|
|
if(listscore!=null&&listscore.size()>0){
|
|
|
rs.put("scoreDoctor",listscore);
|
|
|
}else{
|
|
|
rs.put("scoreDoctor",null);
|
|
|
}
|
|
|
|
|
|
//查询评价明细
|
|
|
String sqlScoreList = "SELECT " +
|
|
|
"a.score as score," +
|
|
|
"a.score_type as score_type," +
|
|
|
"a.content as content," +
|
|
|
"b.create_time as create_time," +
|
|
|
"c.type as type," +
|
|
|
"c.name as patientname," +
|
|
|
"b.id as id," +
|
|
|
"c.photo as patientphoto," +
|
|
|
"b.type as niming " +
|
|
|
"FROM " +
|
|
|
"base_evaluate a " +
|
|
|
"LEFT JOIN base_evaluate_score b ON b.id=a.relation_code " +
|
|
|
"LEFT JOIN wlyy_consult_team c ON c.consult=b.relation_code AND c.doctor='"+doctor+"' " +
|
|
|
"WHERE a.relation_code=b.id AND b.doctor='"+doctor+"' ";
|
|
|
List<Map<String,Object>> scoreList = jdbcTemplate.queryForList(sqlScoreList);
|
|
|
|
|
|
if(scoreList!=null&&scoreList.size()>0){
|
|
|
|
|
|
Set<String> datelist = new HashSet<>();
|
|
|
|
|
|
HashMap<String,List<Map<String,Object>>> waitinglist = new HashMap<>();
|
|
|
|
|
|
if(scoreList!=null&&scoreList.size()>0){
|
|
|
for(Map<String,Object> scorepatient :scoreList){
|
|
|
String id = (String)scorepatient.get("id");
|
|
|
|
|
|
if(id == null){
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
if(waitinglist.keySet().contains(id)){
|
|
|
waitinglist.get(id).add(scorepatient);
|
|
|
}else{
|
|
|
List<Map<String,Object>> _cu = new ArrayList<>();
|
|
|
_cu.add(scorepatient);
|
|
|
waitinglist.put(id,_cu);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
rs.put("scoreList",waitinglist);
|
|
|
}else{
|
|
|
rs.put("scoreList",null);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return rs;
|