zhanglinxin 1 年之前
父節點
當前提交
b3b948200f
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      application/common/service/ApproveService.php

+ 5 - 3
application/common/service/ApproveService.php

@@ -478,9 +478,11 @@ class ApproveService
         $approve_time = date('Y-m-d H:i:s');
         $duration = time() - strtotime($approve['approve_time']);
 
+        $module = $info->module;
         $goodsStockSave = [];
         $goodsStockLog = [];
-        if ($info->module == CommonConstant::MODULE_4) {
+        $redisStock = [];
+        if ($module == CommonConstant::MODULE_4) {
             // 4=领用申请
             $goods = $info->use_goods;
             if (!$goods->toArray()) {
@@ -496,7 +498,7 @@ class ApproveService
                 list($goodsStockSave,$goodsStockLog,$redisStock) = ApproveInfoService::composition_data($goods->toArray(),CommonConstant::MODULE_4,CommonConstant::STATUS_4);
             }
         }
-        if ($info->module == CommonConstant::MODULE_3 && $status == CommonConstant::STATUS_3) {
+        if ($module == CommonConstant::MODULE_3 && $status == CommonConstant::STATUS_3) {
             // 3=入库申请
             $goods = $info->stock_goods;
             if (!$goods->toArray()) {
@@ -507,7 +509,7 @@ class ApproveService
                 list($goodsStockSave,$goodsStockLog,$redisStock) = ApproveInfoService::composition_data($goods->toArray(),CommonConstant::MODULE_3,CommonConstant::STATUS_3);
             }
         }
-        if ($info->module == CommonConstant::MODULE_8 && $status == CommonConstant::STATUS_3) {
+        if ($module == CommonConstant::MODULE_8 && $status == CommonConstant::STATUS_3) {
             // 8=维修申请
             $is_maintain = CommonService::isMaintain($user);
             if ($is_maintain && !$maintain_user_id) {