|  |  |  | @ -89,6 +89,7 @@ public class IoSplitFifoInvService extends ServiceImpl<IoSplitFifoInvMapper, IoS | 
			
		
	
		
			
				
					|  |  |  |  |                     splitCodeEntity.setInBactchNo(codeEntity.getInBatchNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                     splitCodeEntity.setScanCount(codeEntity.getCount()); | 
			
		
	
		
			
				
					|  |  |  |  |                     splitCodeEntity.setTotalCount(IntUtil.value(splitCodeEntity.getTotalCount()) + codeEntity.getReCount()); | 
			
		
	
		
			
				
					|  |  |  |  |                     if (StrUtil.isNotEmpty(codeEntity.getSupId())) | 
			
		
	
		
			
				
					|  |  |  |  |                         splitCodeEntity.setSupId(Long.parseLong(codeEntity.getSupId())); | 
			
		
	
		
			
				
					|  |  |  |  |                     splitCodeEntity.setWorkPlaceCode(orderEntity.getWorkPlaceCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                     splitCodeEntity.setWorkPlaceQueueCode(orderEntity.getWorkPlaceQueueCode()); | 
			
		
	
	
		
			
				
					|  |  |  | @ -133,7 +134,7 @@ public class IoSplitFifoInvService extends ServiceImpl<IoSplitFifoInvMapper, IoS | 
			
		
	
		
			
				
					|  |  |  |  |                         .remark(null) | 
			
		
	
		
			
				
					|  |  |  |  |                         .enableRemind(false) | 
			
		
	
		
			
				
					|  |  |  |  |                         .invRemindCount(0) | 
			
		
	
		
			
				
					|  |  |  |  |                         .workPlaceQueueCode(orderEntity.getWorkPlaceQueueCode() == null ? setQueueCode(ioSplitFifoCodeEntity.getWorkPlaceCode(),orderEntity.getCreateUser())  : orderEntity.getWorkPlaceQueueCode()).build(); | 
			
		
	
		
			
				
					|  |  |  |  |                         .workPlaceQueueCode(orderEntity.getWorkPlaceQueueCode() == null ? setQueueCode(ioSplitFifoCodeEntity.getWorkPlaceCode(), orderEntity.getCreateUser()) : orderEntity.getWorkPlaceQueueCode()).build(); | 
			
		
	
		
			
				
					|  |  |  |  | //                if (isOnlyInv) {
 | 
			
		
	
		
			
				
					|  |  |  |  | //                    splitFifoInv.setBusType(ioSplitFifoCodeEntity.getBusType());
 | 
			
		
	
		
			
				
					|  |  |  |  | //                }
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -164,10 +165,11 @@ public class IoSplitFifoInvService extends ServiceImpl<IoSplitFifoInvMapper, IoS | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     SysWorkplaceLayerService sysWorkplaceLayerService; | 
			
		
	
		
			
				
					|  |  |  |  |     public String setQueueCode(Long workPlaceCode,String userId){ | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     public String setQueueCode(Long workPlaceCode, String userId) { | 
			
		
	
		
			
				
					|  |  |  |  |         List<SysWorkplaceQueue> queues = sysWorkplaceQueueService.list(new LambdaQueryWrapper<SysWorkplaceQueue>().eq(SysWorkplaceQueue::getWorkPlaceIdFk, workPlaceCode)); | 
			
		
	
		
			
				
					|  |  |  |  |         if (queues.size() == 0){ | 
			
		
	
		
			
				
					|  |  |  |  |             throw  new JsonException(500,"请增加取货槽"); | 
			
		
	
		
			
				
					|  |  |  |  |         if (queues.size() == 0) { | 
			
		
	
		
			
				
					|  |  |  |  |             throw new JsonException(500, "请增加取货槽"); | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         SysWorkplaceQueue workplaceQueue = queues.get(0); | 
			
		
	
		
			
				
					|  |  |  |  |         // 使用流来过滤掉匹配的元素
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -181,11 +183,11 @@ public class IoSplitFifoInvService extends ServiceImpl<IoSplitFifoInvMapper, IoS | 
			
		
	
		
			
				
					|  |  |  |  |                 }) | 
			
		
	
		
			
				
					|  |  |  |  |                 .sorted((queue1, queue2) -> queue1.getCode().compareTo(queue2.getCode())) | 
			
		
	
		
			
				
					|  |  |  |  |                 .collect(Collectors.toList()); | 
			
		
	
		
			
				
					|  |  |  |  |         if (filteredQueues.size() > 0){ | 
			
		
	
		
			
				
					|  |  |  |  |         if (filteredQueues.size() > 0) { | 
			
		
	
		
			
				
					|  |  |  |  |             //还有剩余的槽位 可分配
 | 
			
		
	
		
			
				
					|  |  |  |  |             SysWorkplaceQueue sysWorkplaceQueue = filteredQueues.get(0); | 
			
		
	
		
			
				
					|  |  |  |  |             return sysWorkplaceQueue.getCode(); | 
			
		
	
		
			
				
					|  |  |  |  |         }else { | 
			
		
	
		
			
				
					|  |  |  |  |         } else { | 
			
		
	
		
			
				
					|  |  |  |  |             //增加一个槽位
 | 
			
		
	
		
			
				
					|  |  |  |  |             SysWorkplaceLayer layer = sysWorkplaceLayerService.getOne(new LambdaQueryWrapper<SysWorkplaceLayer>().eq(SysWorkplaceLayer::getCode, workplaceQueue.getLayerCode())); | 
			
		
	
		
			
				
					|  |  |  |  |             SysWorkplaceLayerRequest sysWorkplaceLayerRequest = new SysWorkplaceLayerRequest(); | 
			
		
	
	
		
			
				
					|  |  |  | @ -195,7 +197,7 @@ public class IoSplitFifoInvService extends ServiceImpl<IoSplitFifoInvMapper, IoS | 
			
		
	
		
			
				
					|  |  |  |  |             sysWorkplaceLayerRequest.setQueueNum(layer.getQueueNum() + 1); | 
			
		
	
		
			
				
					|  |  |  |  |             sysWorkplaceLayerService.addSysWorkplaceLayer(sysWorkplaceLayerRequest, Long.valueOf(userId)); | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         return setQueueCode(workPlaceCode,userId); | 
			
		
	
		
			
				
					|  |  |  |  |         return setQueueCode(workPlaceCode, userId); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
	
		
			
				
					|  |  |  | 
 |