| | |
| | | if (null == agvModel) { return; } |
| | | |
| | | // STOCK STA |
| | | List<Sta> stockList = staService.list(new LambdaQueryWrapper<Sta>() |
| | | .eq(Sta::getStaSts, StaStsType.STOCK.val()) |
| | | .eq(Sta::getStatus, StatusType.ENABLE.val)); |
| | | List<Sta> stockList = staService.queryAvailableOutSta(1); |
| | | if (Cools.isEmpty(stockList)) { return; } |
| | | Collections.shuffle(stockList); |
| | | |
| | |
| | | param.setBatch(String.valueOf(snowflakeIdWorker.nextId()).substring(13, 19)); |
| | | for (int i = 0; i < Math.min(agvModel.getBackpack(), stockList.size()) ; i++) { |
| | | Sta stockSta = stockList.get(i); |
| | | String staCode = stockSta.getCode$(); |
| | | String staCode = codeService.getCacheById(stockSta.getCode()).getData(); |
| | | |
| | | Loc idleLoc = null; |
| | | |
| | |
| | | if (null == agvModel) { return; } |
| | | |
| | | // IDLE STA |
| | | List<Sta> idleList = staService.list(new LambdaQueryWrapper<Sta>() |
| | | .eq(Sta::getStaSts, StaStsType.IDLE.val()) |
| | | .eq(Sta::getStatus, StatusType.ENABLE.val)); |
| | | List<Sta> idleList = staService.queryAvailableInSta(1); |
| | | if (Cools.isEmpty(idleList)) { return; } |
| | | Collections.shuffle(idleList); |
| | | |
| | |
| | | param.setBatch(String.valueOf(snowflakeIdWorker.nextId()).substring(13, 19)); |
| | | for (int i = 0; i < Math.min(agvModel.getBackpack(), idleList.size()) ; i++) { |
| | | Sta idleSta = idleList.get(i); |
| | | String staCode = idleSta.getCode$(); |
| | | String staCode = codeService.getCacheById(idleSta.getCode()).getData(); |
| | | |
| | | Loc stockLoc = null; |
| | | |