| 
					
				 | 
			
			
				@@ -23,7 +23,9 @@ import org.springframework.stereotype.Service; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.time.LocalDateTime; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.time.format.DateTimeFormatter; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.ArrayList; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.util.HashMap; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.util.Map; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * <p> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -129,7 +131,7 @@ public class BaseGgpFacilityServiceImpl extends AbstractCrudService<BaseGgpFacil 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         lambdaQuery.eq(BaseFacilityDevice::getFacilityId,id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<BaseFacilityDevice> baseFacilityDeviceList = baseFacilityDeviceService.list(lambdaQuery); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (CollectionUtils.isNotEmpty(baseFacilityDeviceList)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            List<Integer> deviceIdList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<String> deviceIdList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for (int i = 0; i < baseFacilityDeviceList.size(); i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 deviceIdList.add(baseFacilityDeviceList.get(i).getDeviceId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -138,7 +140,7 @@ public class BaseGgpFacilityServiceImpl extends AbstractCrudService<BaseGgpFacil 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     LambdaQueryWrapper<DmpDeviceInfo> queryWrapper1 = Wrappers.lambdaQuery(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     queryWrapper1.select(DmpDeviceInfo::getId, DmpDeviceInfo::getDeviceId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             DmpDeviceInfo::getDeviceName, DmpDeviceInfo::getInstallAddress) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            .in(DmpDeviceInfo::getId, deviceIdList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            .in(DmpDeviceInfo::getDeviceId, deviceIdList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             .eq(DmpDeviceInfo::getDeviceId, deviceId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             .eq(DmpDeviceInfo::getDeleteFlag,0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     page = dmpDeviceInfoService.page(page,queryWrapper1); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -146,7 +148,7 @@ public class BaseGgpFacilityServiceImpl extends AbstractCrudService<BaseGgpFacil 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     LambdaQueryWrapper<DmpDeviceInfo> queryWrapper1 = Wrappers.lambdaQuery(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     queryWrapper1.select(DmpDeviceInfo::getId, DmpDeviceInfo::getDeviceId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             DmpDeviceInfo::getDeviceName, DmpDeviceInfo::getInstallAddress) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            .in(DmpDeviceInfo::getId, deviceIdList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            .in(DmpDeviceInfo::getDeviceId, deviceIdList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             .eq(DmpDeviceInfo::getDeleteFlag,0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     page = dmpDeviceInfoService.page(page,queryWrapper1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -155,6 +157,42 @@ public class BaseGgpFacilityServiceImpl extends AbstractCrudService<BaseGgpFacil 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return new CommonPage<>(page.getRecords(),page.getTotal(),page.getCurrent(),page.getSize()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public CommonPage<Object> deviceBindInfo(String deviceId,Integer id,Integer current,Integer size) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<Object> list = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        IPage<DmpDeviceInfo> page = new Page<>(current, size); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LambdaQueryWrapper<BaseFacilityDevice> lambdaQuery = Wrappers.lambdaQuery(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        lambdaQuery.eq(BaseFacilityDevice::getFacilityId,id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<BaseFacilityDevice> baseFacilityDeviceList = baseFacilityDeviceService.list(lambdaQuery); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LambdaQueryWrapper<DmpDeviceInfo> queryWrapper1 = Wrappers.lambdaQuery(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        queryWrapper1.select(DmpDeviceInfo::getId, DmpDeviceInfo::getDeviceId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                DmpDeviceInfo::getDeviceName, DmpDeviceInfo::getInstallAddress) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                .eq(StringUtils.isNotBlank(deviceId),DmpDeviceInfo::getDeviceId, deviceId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                .eq(DmpDeviceInfo::getDeleteFlag,0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        page = dmpDeviceInfoService.page(page,queryWrapper1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (CollectionUtils.isNotEmpty(page.getRecords())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (int i = 0; i < page.getRecords().size(); i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                Map<String, Object> map = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                map.put("id", page.getRecords().get(i).getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                map.put("deviceId", page.getRecords().get(i).getDeviceId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                map.put("deviceName", page.getRecords().get(i).getDeviceName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                map.put("installAddress", page.getRecords().get(i).getInstallAddress()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                map.put("bindStatus", 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                map.put("bindId", 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (CollectionUtils.isNotEmpty(baseFacilityDeviceList)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    for (int j = 0; j < baseFacilityDeviceList.size(); j++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (page.getRecords().get(i).getDeviceId().equals(baseFacilityDeviceList.get(j).getDeviceId())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            map.put("bindStatus", 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            map.put("bindId", baseFacilityDeviceList.get(j).getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                list.add(map); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return new CommonPage<>(list,page.getTotal(),page.getCurrent(),page.getSize()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public CommonPage<BaseBuild> buildInfo(String buildNum, Integer id, Integer current, Integer size) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         IPage<BaseBuild> page = new Page<>(current, size); 
			 |