|  | @ -151,10 +151,10 @@ public class MonitorPlatformService  {
 | 
	
		
			
				|  |  |         params.put("area",area);
 | 
	
		
			
				|  |  |         params.put("hospital",hospital);
 | 
	
		
			
				|  |  |         String anotherResult = sendGet(url,params);
 | 
	
		
			
				|  |  |         String sqlAre = dealSql(params);
 | 
	
		
			
				|  |  |         String sqlAre = "select count(1) AS \"total\",t.belong_are AS \"belong_are\",t.belong_are_code AS \"belong_are_code\" from iot_equipmet_detail t group by t.belong_are_code order by \"total\" desc ";
 | 
	
		
			
				|  |  |         List<Map<String, Object>> iotEquip = hibenateUtils.createSQLQuery(sqlAre);
 | 
	
		
			
				|  |  |         if("8"==deviceType){
 | 
	
		
			
				|  |  |             return iotEquip.toString();
 | 
	
		
			
				|  |  |            return iotEquip.toString();
 | 
	
		
			
				|  |  |         }else {
 | 
	
		
			
				|  |  |             JSONObject jsonObject = JSONObject.parseObject(anotherResult);
 | 
	
		
			
				|  |  |             if("200".equals(jsonObject.get("status").toString())){
 | 
	
	
		
			
				|  | @ -509,18 +509,81 @@ public class MonitorPlatformService  {
 | 
	
		
			
				|  |  |         String response = sendGet(url,params);
 | 
	
		
			
				|  |  |         JSONObject json = JSONObject.parseObject(response);
 | 
	
		
			
				|  |  |         if(json.getInteger("status")==200){
 | 
	
		
			
				|  |  |             IotSystemDictDO iotSystemDictDO = iotSystemDictDao.findByDictNameAndValueAndDel("DEVICE_TYPE","健康小屋",1);
 | 
	
		
			
				|  |  |             JSONArray jsonArray = json.getJSONArray("data");
 | 
	
		
			
				|  |  |             for (int i=0;i<jsonArray.size();i++){
 | 
	
		
			
				|  |  |                 JSONObject jo = jsonArray.getJSONObject(i);
 | 
	
		
			
				|  |  |                 String tmp = jo.getString("type");
 | 
	
		
			
				|  |  |                 if("1".equals(tmp)){
 | 
	
		
			
				|  |  |                     jo.put("typeName","血糖仪");
 | 
	
		
			
				|  |  |                 }else if("2".equals(tmp)){
 | 
	
		
			
				|  |  |                     jo.put("typeName","血压计");
 | 
	
		
			
				|  |  |                 }else if("3".equals(tmp)){
 | 
	
		
			
				|  |  |                     jo.put("typeName","智能药盒");
 | 
	
		
			
				|  |  |                 }else if("4".equals(tmp)){
 | 
	
		
			
				|  |  |                     jo.put("typeName","智能手表");
 | 
	
		
			
				|  |  |             String[] str =deviceType.split(",");
 | 
	
		
			
				|  |  |             List<String> list = new ArrayList<>();
 | 
	
		
			
				|  |  |             for (int i=0;i<str.length;i++){
 | 
	
		
			
				|  |  |                 list.add(str[i]);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             if (iotSystemDictDO!=null){
 | 
	
		
			
				|  |  |                 if (!list.contains(iotSystemDictDO.getCode())){
 | 
	
		
			
				|  |  |                     for (int i=0;i<jsonArray.size();i++){
 | 
	
		
			
				|  |  |                         JSONObject jo = jsonArray.getJSONObject(i);
 | 
	
		
			
				|  |  |                         String tmp = jo.getString("type");
 | 
	
		
			
				|  |  |                         if("1".equals(tmp)){
 | 
	
		
			
				|  |  |                             jo.put("typeName","血糖仪");
 | 
	
		
			
				|  |  |                         }else if("2".equals(tmp)){
 | 
	
		
			
				|  |  |                             jo.put("typeName","血压计");
 | 
	
		
			
				|  |  |                         }else if("3".equals(tmp)){
 | 
	
		
			
				|  |  |                             jo.put("typeName","智能药盒");
 | 
	
		
			
				|  |  |                         }else if("4".equals(tmp)){
 | 
	
		
			
				|  |  |                             jo.put("typeName","智能手表");
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }else {
 | 
	
		
			
				|  |  |                     if (jsonArray!=null&&jsonArray.size()!=0){
 | 
	
		
			
				|  |  |                         for (int i=0;i<jsonArray.size();i++){
 | 
	
		
			
				|  |  |                             JSONObject jo = jsonArray.getJSONObject(i);
 | 
	
		
			
				|  |  |                             String tmp = jo.getString("type");
 | 
	
		
			
				|  |  |                             if("1".equals(tmp)){
 | 
	
		
			
				|  |  |                                 jo.put("typeName","血糖仪");
 | 
	
		
			
				|  |  |                             }else if("2".equals(tmp)){
 | 
	
		
			
				|  |  |                                 jo.put("typeName","血压计");
 | 
	
		
			
				|  |  |                             }else if("3".equals(tmp)){
 | 
	
		
			
				|  |  |                                 jo.put("typeName","智能药盒");
 | 
	
		
			
				|  |  |                             }else if("4".equals(tmp)){
 | 
	
		
			
				|  |  |                                 jo.put("typeName","智能手表");
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                         if (org.apache.commons.lang3.StringUtils.isNoneBlank(hospital)){
 | 
	
		
			
				|  |  |                             JSONObject jsonObject= new JSONObject();
 | 
	
		
			
				|  |  |                             jsonObject.put("type",iotSystemDictDO.getCode());
 | 
	
		
			
				|  |  |                             jsonObject.put("typeName",iotSystemDictDO.getValue());
 | 
	
		
			
				|  |  |                             jsonObject.put("signNum",0);
 | 
	
		
			
				|  |  |                             jsonObject.put("unSignNum",0);
 | 
	
		
			
				|  |  |                             jsonArray.add(jsonObject);
 | 
	
		
			
				|  |  |                         }else {
 | 
	
		
			
				|  |  |                             Long count = iotEqtDetailService.findCountByHealthHourse(startTime,endTime,area);
 | 
	
		
			
				|  |  |                             JSONObject jsonObject= new JSONObject();
 | 
	
		
			
				|  |  |                             jsonObject.put("type",iotSystemDictDO.getCode());
 | 
	
		
			
				|  |  |                             jsonObject.put("typeName",iotSystemDictDO.getValue());
 | 
	
		
			
				|  |  |                             jsonObject.put("signNum",count);
 | 
	
		
			
				|  |  |                             jsonObject.put("unSignNum",0);
 | 
	
		
			
				|  |  |                             jsonArray.add(jsonObject);
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }else {
 | 
	
		
			
				|  |  |                         if (org.apache.commons.lang3.StringUtils.isNoneBlank(hospital)){
 | 
	
		
			
				|  |  |                             jsonArray = new JSONArray();
 | 
	
		
			
				|  |  |                             JSONObject jsonObject= new JSONObject();
 | 
	
		
			
				|  |  |                             jsonObject.put("type",iotSystemDictDO.getCode());
 | 
	
		
			
				|  |  |                             jsonObject.put("typeName",iotSystemDictDO.getValue());
 | 
	
		
			
				|  |  |                             jsonObject.put("signNum",0);
 | 
	
		
			
				|  |  |                             jsonObject.put("unSignNum",0);
 | 
	
		
			
				|  |  |                             jsonArray.add(jsonObject);
 | 
	
		
			
				|  |  |                         }else {
 | 
	
		
			
				|  |  |                             Long count = iotEqtDetailService.findCountByHealthHourse(startTime,endTime,area);
 | 
	
		
			
				|  |  |                             jsonArray = new JSONArray();
 | 
	
		
			
				|  |  |                             JSONObject jsonObject= new JSONObject();
 | 
	
		
			
				|  |  |                             jsonObject.put("type",iotSystemDictDO.getCode());
 | 
	
		
			
				|  |  |                             jsonObject.put("typeName",iotSystemDictDO.getValue());
 | 
	
		
			
				|  |  |                             jsonObject.put("signNum",count);
 | 
	
		
			
				|  |  |                             jsonObject.put("unSignNum",0);
 | 
	
		
			
				|  |  |                             jsonArray.add(jsonObject);
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 |