| 
					
				 | 
			
			
				@@ -11,6 +11,7 @@ import org.springframework.stereotype.Service; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.util.CollectionUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huashe.common.utils.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.huashe.park.common.EnhancedIDGenerator; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huashe.park.common.consts.enums.ConsStatus; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huashe.park.core.mapper.PileMachineInfoMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huashe.park.core.service.IConsPileHoleInfoService; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -18,6 +19,7 @@ import com.huashe.park.core.service.IConsUnitInfoService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huashe.park.core.service.IConsUnitMachineRelService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huashe.park.core.service.IPileMachineInfoService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huashe.park.core.service.IProjectCoordinateInfoService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.huashe.park.domain.dto.cons.ConsPileHoleInfoVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huashe.park.domain.dto.cons.ConstUnitNode; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huashe.park.domain.dto.cons.MachineBiz; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huashe.park.domain.entity.ConsPileHoleInfo; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -26,6 +28,8 @@ import com.huashe.park.domain.entity.ConsUnitMachineRel; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huashe.park.domain.entity.PileMachineInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huashe.park.domain.entity.ProjectCoordinateInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import cn.hutool.core.bean.BeanUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * 施工桩机信息Service业务层处理 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  *  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -49,6 +53,9 @@ public class PileMachineInfoServiceImpl implements IPileMachineInfoService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private IProjectCoordinateInfoService projectCoordinateInfoService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private EnhancedIDGenerator byte8Id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 查询施工桩机信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      *  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -60,6 +67,11 @@ public class PileMachineInfoServiceImpl implements IPileMachineInfoService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return pileMachineInfoMapper.selectPileMachineInfoById(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public PileMachineInfo selectPileMachineInfoByByteId(String byteId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return pileMachineInfoMapper.selectPileMachineInfoByByteId(byteId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 查询施工桩机信息列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      *  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -80,6 +92,7 @@ public class PileMachineInfoServiceImpl implements IPileMachineInfoService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public int insertPileMachineInfo(PileMachineInfo pileMachineInfo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         pileMachineInfo.setPwd(pileMachineInfo.getSn() + "381.2371"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        pileMachineInfo.setByteId(byte8Id.generate()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return pileMachineInfoMapper.insertPileMachineInfo(pileMachineInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -118,8 +131,9 @@ public class PileMachineInfoServiceImpl implements IPileMachineInfoService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public List<ConstUnitNode> qryMachineAssignedUnit(Long machineId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<ConsUnitInfo> consUnitInfos = consUnitInfoService.machineAssignedUnit(machineId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public List<ConstUnitNode> qryMachineAssignedUnit(String machineId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        PileMachineInfo pileMachineInfo = selectPileMachineInfoByByteId(machineId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<ConsUnitInfo> consUnitInfos = consUnitInfoService.machineAssignedUnit(pileMachineInfo.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<ProjectCoordinateInfo> projectCoordinateInfos = projectCoordinateInfoService 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             .selectProjectCoordinateInfoList(new ProjectCoordinateInfo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ProjectCoordinateInfo projectCoordinateInfo = projectCoordinateInfos.get(0); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -136,23 +150,34 @@ public class PileMachineInfoServiceImpl implements IPileMachineInfoService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public List<ConsPileHoleInfo> machineUnitPileHole(MachineBiz machineBiz) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public List<ConsPileHoleInfoVO> machineUnitPileHole(MachineBiz machineBiz) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<ConsPileHoleInfoVO> result = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ConsUnitInfo consUnitInfo = consUnitInfoService.selectConsUnitInfoByByteId(machineBiz.getDesignId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        PileMachineInfo pileMachineInfo = selectPileMachineInfoByByteId(machineBiz.getMachineId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<ConsUnitMachineRel> consUnitMachineRels = consUnitMachineRelService 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             .selectConsUnitMachineRelList(new ConsUnitMachineRel() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    setConsUnitId(machineBiz.getDesignId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    setMachineId(machineBiz.getMachineId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    setConsUnitId(consUnitInfo.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    setMachineId(pileMachineInfo.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (CollectionUtils.isEmpty(consUnitMachineRels)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return pileHoleInfoService.selectNonConsPileHoleInfo(new ConsPileHoleInfo() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                setConsUnitId(machineBiz.getDesignId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                setConsStatus(ConsStatus.CONS_STATUS_00.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<ConsPileHoleInfo> consPileHoleInfos = pileHoleInfoService 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            .selectNonConsPileHoleInfo(new ConsPileHoleInfo() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    setConsUnitId(consUnitInfo.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    setConsStatus(ConsStatus.CONS_STATUS_00.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        consPileHoleInfos.forEach(item -> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ConsPileHoleInfoVO consPileHoleInfoVO = new ConsPileHoleInfoVO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            BeanUtil.copyProperties(item, consPileHoleInfoVO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            result.add(consPileHoleInfoVO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private List<ConstUnitNode> buildConsUnitTree(List<ConstUnitNode> consUnitInfos) { 
			 |