| 
					
				 | 
			
			
				@ -1576,4 +1576,50 @@ public class PrescriptionInfoService extends BaseService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //System.out.println("list:"+list.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return  new JSONArray(list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public JSONObject getHDoctorInDoctorHosiptal(String name,String doctor,Integer page,Integer size){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Doctor d = doctorDao.findByCode(doctor); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = "SELECT " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " d.`code`," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " d.`name`," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " d.job," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " d.photo " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " FROM" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " wlyy_doctor d" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " WHERE" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " d.hospital = ?" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " AND d.`level` = 3 " ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if(StringUtils.isNotBlank(name)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    sql +=" AND d.`name` LIKE '%"+name+"%' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if(page!=null&&size!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    sql += " LIMIT "+(page-1)+","+size; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String totalSql = "SELECT " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " count(1) AS total" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " FROM" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " wlyy_doctor d" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " WHERE" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " d.hospital = ?" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " AND d.`level` = 3 "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(StringUtils.isNotBlank(name)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            totalSql +=" AND d.`name` LIKE '%"+name+"%' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONObject jsonObject = new JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String,Object>> totalList = jdbcTemplate.queryForList(totalSql,new Object[]{d.getHospital()}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(totalList!=null&&totalList.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            jsonObject.put("total",totalList.get(0).get("total")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            jsonObject.put("total",0L); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            jsonObject.put("doctors",""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return jsonObject; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql,new Object[]{d.getHospital()}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(list!=null&&list.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            jsonObject.put("doctors",list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            jsonObject.put("doctors",""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return jsonObject; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |