Browse Source

大王椰出入库

cqpCow 1 year ago
parent
commit
41ead0760b
2 changed files with 3 additions and 3 deletions
  1. 1 1
      app/Jobs/DoorDeviceJob.php
  2. 2 2
      app/Service/InOutOptionService.php

+ 1 - 1
app/Jobs/DoorDeviceJob.php

@@ -205,7 +205,7 @@ class DoorDeviceJob implements ShouldQueue
 
         $result = json_decode($response,true);
         if(! empty($result['createdDate'])) {
-            $expire_time = 6;
+            $expire_time = 10;
             $key = $device_id . $opt;
             Redis::set($key, json_encode($orderNo));
             Redis::expire($key, $expire_time);

+ 2 - 2
app/Service/InOutOptionService.php

@@ -27,7 +27,7 @@ class InOutOptionService extends Service
                     }
                 }elseif ($value['direction'] == '2'){
                     //(判断到有发货出库的出库标识 存入缓存)
-                    if(Redis::exists($device_id)){
+                    if(Redis::exists($device_id . self::Key)){
                         Redis::lpush($device_id . self::Key, json_encode($value));
                     }else{
                         //出库 直接生成出库单
@@ -47,7 +47,7 @@ class InOutOptionService extends Service
 
         //发货出库
         $key = $data['device_id'] . self::Key;
-        if(Redis::exists(self::Key)) {
+        if(Redis::exists($key)) {
             //发货
             while ($item = Redis::lpop($key)) {
                 $order = json_decode($item, true);