|  | @ -1,14 +1,12 @@
 | 
	
		
			
				|  |  | package com.yihu.jw.care.service.device;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import com.alibaba.fastjson.JSON;
 | 
	
		
			
				|  |  | import com.yihu.jw.care.config.AqgConfig;
 | 
	
		
			
				|  |  | import com.yihu.jw.care.dao.device.DeviceDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.care.dao.device.DeviceDetailDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.care.dao.device.PatientDeviceDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.care.service.wechat.WeiXinAccessTokenUtils;
 | 
	
		
			
				|  |  | import com.yihu.jw.care.util.ConcealUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.common.GpsUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.care.util.MyJdbcTemplate;
 | 
	
		
			
				|  |  | import com.yihu.jw.doctor.dao.BaseDoctorDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
 | 
	
	
		
			
				|  | @ -17,6 +15,7 @@ import com.yihu.jw.entity.care.device.Device;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.care.device.DeviceDetail;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.care.device.DevicePatientDevice;
 | 
	
		
			
				|  |  | import com.yihu.jw.patient.dao.BasePatientDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.common.GpsUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.common.IdCardUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.date.DateUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.http.HttpClientUtil;
 | 
	
	
		
			
				|  | @ -246,8 +245,22 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         Specification<DevicePatientDevice> spec = DynamicSpecifications.bySearchFilter(filters.values(), DevicePatientDevice.class);
 | 
	
		
			
				|  |  |         Page<DevicePatientDevice> page = patientDeviceDao.findAll(spec, pageRequest);
 | 
	
		
			
				|  |  |         if(page.getTotalPages()>0){
 | 
	
		
			
				|  |  |             String sql = "SELECT * from dm_device ";
 | 
	
		
			
				|  |  |             List<Map<String,Object>> devices = jdbcTemplate.queryForList(sql);
 | 
	
		
			
				|  |  |             Map<String,String> map = new HashedMap();
 | 
	
		
			
				|  |  |             for (Map<String,Object> d:devices){
 | 
	
		
			
				|  |  |                 map.put(String.valueOf(d.get("category_code")),String.valueOf(d.get("photo")));
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             Iterator<DevicePatientDevice> iterator = page.iterator();
 | 
	
		
			
				|  |  |             while (iterator.hasNext()){
 | 
	
		
			
				|  |  |                 DevicePatientDevice patientDevice = iterator.next();
 | 
	
		
			
				|  |  |                 patientDevice.setDeviceImgUrl(map.get(String.valueOf(patientDevice.getDeviceId())));
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return patientDeviceDao.findAll(spec, pageRequest);
 | 
	
		
			
				|  |  |         return page;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public List<Map<String , Object>> findDeviceFromAdmin(String patientName, int page, int pageSize) {
 |