|  | @ -70,7 +70,7 @@ public class MonitorPlatformService  {
 | 
												
													
														
															|  |      * @param diseaseCondition
 |  |      * @param diseaseCondition
 | 
												
													
														
															|  |      * @return
 |  |      * @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> envelop = new MixEnvelop<>();
 | 
												
													
														
															|  |         MixEnvelop<LocationDataVO, LocationDataVO> envelopTmp = null;
 |  |         MixEnvelop<LocationDataVO, LocationDataVO> envelopTmp = null;
 | 
												
													
														
															|  |         JSONArray jsonArray = new JSONArray();
 |  |         JSONArray jsonArray = new JSONArray();
 | 
												
											
												
													
														
															|  | @ -103,6 +103,7 @@ public class MonitorPlatformService  {
 | 
												
													
														
															|  |             envelop.setTotalCount(total);
 |  |             envelop.setTotalCount(total);
 | 
												
													
														
															|  |             return envelop;
 |  |             return envelop;
 | 
												
													
														
															|  |         }else {
 |  |         }else {
 | 
												
													
														
															|  | 
 |  |             List<LocationDataVO> euipmentList = new ArrayList<>();
 | 
												
													
														
															|  |             //查找全部
 |  |             //查找全部
 | 
												
													
														
															|  |             if(diseaseCondition!=null){
 |  |             if(diseaseCondition!=null){
 | 
												
													
														
															|  |                 JSONObject json = new JSONObject();
 |  |                 JSONObject json = new JSONObject();
 | 
												
											
												
													
														
															|  | @ -112,15 +113,40 @@ public class MonitorPlatformService  {
 | 
												
													
														
															|  |                 json.put("value",diseaseCondition);
 |  |                 json.put("value",diseaseCondition);
 | 
												
													
														
															|  |                 jsonArray.add(json);
 |  |                 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()));
 |  | 
 | 
												
													
														
															|  | 
 |  |             String[] categoryCodes= deviceType.split(",");
 | 
												
													
														
															|  | 
 |  |             if(categoryCodes.length==1&&"5".equals(deviceType)){
 | 
												
													
														
															|  | 
 |  |                 euipmentList = iotEqtDetailService.getEquipmentLocation(page,size);
 | 
												
													
														
															|  | 
 |  |                 envelop.getDetailModelList().addAll(euipmentList);
 | 
												
													
														
															|  | 
 |  |                 envelop.setTotalCount(iotEqtDetailService.getEquipmentCount());
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  |             else{
 | 
												
													
														
															|  | 
 |  |                 if(deviceType.contains("5")){
 | 
												
													
														
															|  | 
 |  |                     euipmentList = iotEqtDetailService.getEquipmentLocation(page,size);
 | 
												
													
														
															|  | 
 |  |                     envelop.getDetailModelList().addAll(euipmentList);
 | 
												
													
														
															|  | 
 |  |                 }
 | 
												
													
														
															|  | 
 |  |                 if(!(deviceType.contains("1")&&deviceType.contains("2"))){
 | 
												
													
														
															|  | 
 |  |                     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);
 | 
												
													
														
															|  | 
 |  |                 envelop.setTotalCount(iotPatientDeviceService.getESCount(jsonObject.toString()));
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  |             return envelop;
 |  |             return envelop;
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |     }
 |  |     }
 |