| 
					
				 | 
			
			
				@ -1131,7 +1131,7 @@ public class MonitorPlatformService  { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String sql  = "select count(DISTINCT A.device_name) as total,A.device_name,A.manufacturer from (\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "select pd.device_name,wd.manufacturer from wlyy.wlyy_patient_device pd,device.wlyy_devices wd\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "where pd.device_sn = wd.device_code and pd.del=0 \n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "and wd.manufacturer_code is not null and wd.manufacturer_code <>''\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "and wd.manufacturer_code is not null and wd.manufacturer_code <>'' and pd.device_name<>'血压计-null' and pd.device_name<>'血糖仪-自助体检一体机'  \n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "GROUP BY wd.manufacturer_code,pd.device_name\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "UNION\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "select '健康小屋' device_name,manufacturer from xmiot.iot_equipmet_detail group BY manufacturer_code,device_name\n" + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1145,7 +1145,7 @@ public class MonitorPlatformService  { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql = "select count(DISTINCT A.device_name)from (\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "select pd.device_name from wlyy.wlyy_patient_device pd,device.wlyy_devices wd\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "where pd.device_sn = wd.device_code and pd.del=0 \n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "and wd.manufacturer_code is not null and wd.manufacturer_code <>''\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "and wd.manufacturer_code is not null and wd.manufacturer_code <>'' and pd.device_name<>'血压计-null' and pd.device_name<>'血糖仪-自助体检一体机' \n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "GROUP BY wd.manufacturer_code,pd.device_name\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "UNION\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "select '健康小屋' device_name from xmiot.iot_equipmet_detail group BY manufacturer_code,device_name\n" + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1443,7 +1443,8 @@ public class MonitorPlatformService  { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            StringBuffer sql = new StringBuffer("select DISTINCT A.device_name from (\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "select pd.device_name from wlyy.wlyy_patient_device pd,device.wlyy_devices wd\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "where pd.device_sn = wd.device_code and pd.del=0 \n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "and wd.manufacturer_code is not null and wd.manufacturer_code <>'' "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "and wd.manufacturer_code is not null and wd.manufacturer_code <>'' " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "and pd.device_name<>'血压计-null' and pd.device_name<>'血糖仪-自助体检一体机' "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (org.apache.commons.lang3.StringUtils.isNoneBlank(deviceType)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql.append("and pd.category_code in ('").append(deviceType.replace(",","','")).append("') "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1453,8 +1454,20 @@ public class MonitorPlatformService  { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql.append(")A"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            List<String> list = jdbcTemplate.queryForList(sql.toString(),String.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            List<String> reList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            int i=0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            for(String tmp:list){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if ("三诺血糖仪".equals(tmp)||"血糖仪-三诺亲智".equals(tmp)||"三诺亲智".equals(tmp)||"健康之路亲智血糖仪".equals(tmp)||"血糖仪".equals(tmp)||"血糖仪-健康之路亲智血糖仪".equals(tmp)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    i=1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                reList.add(tmp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (i==1){//上面去除的元素统一返回为三诺血糖仪 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                reList.add("三诺血糖仪"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            JSONObject result = new JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            result.put("brands",list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            result.put("brands",reList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            e.printStackTrace(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1583,4 +1596,16 @@ public class MonitorPlatformService  { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * deviceName处理 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param deviceName 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String getDeviceNameByRequestParam(String deviceName){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (deviceName.contains("三诺血糖仪")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return deviceName.replace("三诺血糖仪","三诺血糖仪,血糖仪-三诺亲智,三诺亲智,健康之路亲智血糖仪,血糖仪,血糖仪-健康之路亲智血糖仪"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return deviceName; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |