k há 2 anos atrás
pai
commit
20b8436ebc

+ 3 - 3
warewms-ams/src/main/java/com/ruoyi/ams/business/BusinessServiceImpl.java

@@ -331,14 +331,14 @@ public class BusinessServiceImpl implements IBusinessService {
                     if (!b.getStockStatus().equals("00") || !b.getIsEmpty().equals("N") || redisCache.checkIsLock(RedisKey.LOCK_LOCATION + b.getId())) {
                         continue;
                     }
-                    if (!redisCache.lockCacheObject(RedisKey.LOCK_LOCATION + b.getId(), b.getId().toString(), token)) {
-                        continue;
-                    }
                     // 判断起始库位上的库存质检状态是否可以出库
                     boolean con = invLotLocIdService.verifyInventoryCanOutbound(b.getId().toString());
                     if (!con) {
                         continue;
                     }
+                    if (!redisCache.lockCacheObject(RedisKey.LOCK_LOCATION + b.getId(), b.getId().toString(), token)) {
+                        continue;
+                    }
                     locationInfo = b;
                     break;
                 }