|  | @ -4781,6 +4781,29 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |         sql += " and d.del='1' order by a.total " + consutlSort;
 | 
	
		
			
				|  |  |         String sqlCount = "select count(1) as \"total\" from ( "+sql+" ) t";
 | 
	
		
			
				|  |  |         List<Map<String, Object>> list = hibenateUtils.createSQLQuery(sql, params, page, pagesize);
 | 
	
		
			
				|  |  |         for (Map<String,Object> map:list){
 | 
	
		
			
				|  |  |             String doctor = map.get("id").toString();
 | 
	
		
			
				|  |  |             //查询医生各项评价平均分
 | 
	
		
			
				|  |  |             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 ORDER BY  a.score_type ASC ";
 | 
	
		
			
				|  |  |             List<Map<String, Object>> listscore = jdbcTemplate.queryForList(sqlscore);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             Double doctorScore = new Double("0");
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             if (listscore != null && listscore.size() > 0) {
 | 
	
		
			
				|  |  |                 for (Map<String, Object> _listscore : listscore) {
 | 
	
		
			
				|  |  |                     doctorScore += Double.parseDouble(_listscore.get("score").toString());
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             doctorScore = doctorScore / 3;
 | 
	
		
			
				|  |  |             map.put("doctorScore", doctorScore);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         List<Map<String, Object>> listCount = hibenateUtils.createSQLQuery(sqlCount, params);
 | 
	
		
			
				|  |  |         Long count = 0L;
 | 
	
		
			
				|  |  |         if(listCount!=null){
 |