|  |  |  | 
|---|
|  |  |  | String destinationCodeData = null; | 
|---|
|  |  |  | switch (jobType) { | 
|---|
|  |  |  | case LOC_PICK: | 
|---|
|  |  |  | // 5, 4, 3, 2, 1 | 
|---|
|  |  |  | int locPickRemaining = agvService.getBackpackRemainingCapacity(agvId); | 
|---|
|  |  |  | if (0 < locPickRemaining) { | 
|---|
|  |  |  | destinationCodeData = this.getLocCode(agvNo, null); | 
|---|
|  |  |  | 
|---|
|  |  |  | destinationCodeData = this.getConveyorPickCode(agvNo); | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | case LOCK_DROP: | 
|---|
|  |  |  | // 0, 1, 2, 3, 4 | 
|---|
|  |  |  | int locDropRemaining = agvService.getBackpackRemainingCapacity(agvId); | 
|---|
|  |  |  | if (0 < locDropRemaining) { | 
|---|
|  |  |  | if (locDropRemaining < agvModelService.getByAgvId(agvId).getBackpack()) { | 
|---|
|  |  |  | destinationCodeData = this.getLocCode(agvNo, null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public int getBackpackRemainingCapacity(Long agvId) { | 
|---|
|  |  |  | int usedSlots = 0; | 
|---|
|  |  |  | Integer usedBackpack = CoreCache.AGV_BACKPACK_USED_CACHE.get(agvId); | 
|---|
|  |  |  | if (null == usedBackpack) { | 
|---|
|  |  |  | Integer usedSlots = CoreCache.AGV_BACKPACK_USED_CACHE.get(agvId); | 
|---|
|  |  |  | if (null == usedSlots) { | 
|---|
|  |  |  | usedSlots = taskService.findTransportTasksCountByAgv(agvId); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|