| | |
| | | import com.vincent.rsf.framework.common.SpringUtils; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.api.utils.LocUtils; |
| | | import com.vincent.rsf.server.common.redis.RedisKeys; |
| | | import com.vincent.rsf.server.manager.controller.dto.ExistDto; |
| | | import com.vincent.rsf.server.manager.controller.dto.OrderOutItemDto; |
| | | import com.vincent.rsf.server.manager.controller.params.WaveToLocParams; |
| | |
| | | if (Objects.isNull(loc) || Cools.isEmpty(loc.getCode())) { |
| | | continue; |
| | | } |
| | | boolean claimed = wmsRedisLuaService.claimLocation(buildTargetLocLockKey(loc.getCode()), loc.getCode(), TARGET_LOC_LOCK_TTL); |
| | | boolean claimed = wmsRedisLuaService.claimLocation(RedisKeys.locationOccupy(loc.getCode()), loc.getCode(), TARGET_LOC_LOCK_TTL); |
| | | if (claimed) { |
| | | return loc.getCode(); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | private static String buildTargetLocLockKey(String locCode) { |
| | | return TARGET_LOC_LOCK_KEY_PREFIX + locCode; |
| | | } |
| | | |
| | | /** |