| 
					
				 | 
			
			
				@ -691,9 +691,20 @@ public class PatientInfoPlatFormService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     *获取设备详情 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public List<Map<String,Object>> getPatientDeviceInfoWithDetail(String patient){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public List<Map<String,Object>> getPatientDeviceInfoWithDetail(String patient,String deviceSn){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String,Object>>  list = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        list = patientDeviceService.patientDeviceListByTopic(patient,null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = "select dd.photo,pd.device_sn,dd.brands,dd.category_code,dd.model,pd.device_name,date_format(pd.czrq,'%Y-%m-%d %H:%i:%S' ) deviceTime,dd.device_type as deviceType " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "from dm_device dd INNER JOIN wlyy_patient_device pd on dd.category_code = pd.category_code INNER JOIN wlyy_devices wd on dd.model = wd.device_model and pd.device_sn = wd.device_code \n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "where 1=1 and  pd.del=0 "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (org.apache.commons.lang3.StringUtils.isNotBlank(patient)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += " and  pd.`user`='" + patient + "' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (org.apache.commons.lang3.StringUtils.isNotBlank(deviceSn)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += " and pd.device_sn = '"+deviceSn+"' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        sql+=" order by pd.czrq asc "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        list =  jdbcTemplate.queryForList(sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for (Map<String,Object> tmp :list){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String category_code = tmp.get("category_code").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String deviceSN = tmp.get("device_sn").toString(); 
			 |