|  | @ -70,7 +70,7 @@ public class MonitorPlatformService  {
 | 
	
		
			
				|  |  |      * @param diseaseCondition
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public MixEnvelop<LocationDataVO, LocationDataVO> findDeviceLocations(Integer diseaseCondition, Integer page, Integer size, String type) throws IOException {
 | 
	
		
			
				|  |  |     public MixEnvelop<LocationDataVO, LocationDataVO> findDeviceLocations(Integer diseaseCondition, Integer page, Integer size, String type,String deviceType) throws IOException {
 | 
	
		
			
				|  |  |         MixEnvelop<LocationDataVO, LocationDataVO> envelop = new MixEnvelop<>();
 | 
	
		
			
				|  |  |         MixEnvelop<LocationDataVO, LocationDataVO> envelopTmp = null;
 | 
	
		
			
				|  |  |         JSONArray jsonArray = new JSONArray();
 | 
	
	
		
			
				|  | @ -103,6 +103,9 @@ public class MonitorPlatformService  {
 | 
	
		
			
				|  |  |             envelop.setTotalCount(total);
 | 
	
		
			
				|  |  |             return envelop;
 | 
	
		
			
				|  |  |         }else {
 | 
	
		
			
				|  |  |             List<LocationDataVO> euipmentList = new ArrayList<>();
 | 
	
		
			
				|  |  |             int totalEqCount=0;
 | 
	
		
			
				|  |  |             int totalCount=0;
 | 
	
		
			
				|  |  |             //查找全部
 | 
	
		
			
				|  |  |             if(diseaseCondition!=null){
 | 
	
		
			
				|  |  |                 JSONObject json = new JSONObject();
 | 
	
	
		
			
				|  | @ -112,15 +115,43 @@ public class MonitorPlatformService  {
 | 
	
		
			
				|  |  |                 json.put("value",diseaseCondition);
 | 
	
		
			
				|  |  |                 jsonArray.add(json);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             JSONObject jsonObject = new JSONObject();
 | 
	
		
			
				|  |  |             jsonObject.put("filter",jsonArray);
 | 
	
		
			
				|  |  |             jsonObject.put("page",page);
 | 
	
		
			
				|  |  |             jsonObject.put("size",size);
 | 
	
		
			
				|  |  |             List<LocationDataVO> locationDataVOList = iotPatientDeviceService.findDeviceLocationsByIdCard(jsonObject.toString());
 | 
	
		
			
				|  |  |             List<LocationDataVO> list2 = iotPatientDeviceService.addNameAndCodeToList(locationDataVOList);
 | 
	
		
			
				|  |  |             //figureLabelSerachService.getFigureLabelByList(locationDataVOList);
 | 
	
		
			
				|  |  |             envelop.getDetailModelList().addAll(list2);
 | 
	
		
			
				|  |  |             envelop.setTotalCount(iotPatientDeviceService.getESCount(jsonObject.toString()));
 | 
	
		
			
				|  |  |             //小屋总数
 | 
	
		
			
				|  |  |             if(deviceType.contains("5")){
 | 
	
		
			
				|  |  |                totalEqCount = iotEqtDetailService.getEquipmentCount();
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             String[] categoryCodes= deviceType.split(",");
 | 
	
		
			
				|  |  |             if(categoryCodes.length==1&&"5".equals(deviceType)){
 | 
	
		
			
				|  |  |                 euipmentList = iotEqtDetailService.getEquipmentLocation(page,size);
 | 
	
		
			
				|  |  |                 envelop.getDetailModelList().addAll(euipmentList);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             else{
 | 
	
		
			
				|  |  |                 if(deviceType.contains("5")){
 | 
	
		
			
				|  |  |                     euipmentList = iotEqtDetailService.getEquipmentLocation(page,size);
 | 
	
		
			
				|  |  |                     envelop.getDetailModelList().addAll(euipmentList);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 for (String categoryCode:categoryCodes){
 | 
	
		
			
				|  |  |                      if(!"5".equals(categoryCode)){
 | 
	
		
			
				|  |  |                          JSONObject json = new JSONObject();
 | 
	
		
			
				|  |  |                          json.put("andOr","and");
 | 
	
		
			
				|  |  |                          json.put("field","categoryCode");
 | 
	
		
			
				|  |  |                          json.put("condition","=");
 | 
	
		
			
				|  |  |                          json.put("value",Integer.parseInt(categoryCode));
 | 
	
		
			
				|  |  |                          jsonArray.add(json);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                          JSONObject jsonObject = new JSONObject();
 | 
	
		
			
				|  |  |                          jsonObject.put("filter",jsonArray);
 | 
	
		
			
				|  |  |                          jsonObject.put("page",page);
 | 
	
		
			
				|  |  |                          jsonObject.put("size",size);
 | 
	
		
			
				|  |  |                          List<LocationDataVO> locationDataVOList = iotPatientDeviceService.findDeviceLocationsByIdCard(jsonObject.toString());
 | 
	
		
			
				|  |  |                          List<LocationDataVO> list2 = iotPatientDeviceService.addNameAndCodeToList(locationDataVOList);
 | 
	
		
			
				|  |  |                          //figureLabelSerachService.getFigureLabelByList(locationDataVOList);
 | 
	
		
			
				|  |  |                          envelop.getDetailModelList().addAll(list2);
 | 
	
		
			
				|  |  |                          totalCount += iotPatientDeviceService.getESCount(jsonObject.toString());
 | 
	
		
			
				|  |  |                          jsonArray.remove(json);
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             envelop.setTotalCount(totalCount>totalEqCount?totalCount:totalEqCount);
 | 
	
		
			
				|  |  |             return envelop;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 |