zhanglinxin 1 年之前
父节点
当前提交
974e8e7ad5
共有 2 个文件被更改,包括 6 次插入2 次删除
  1. 2 1
      application/common/service/ApproveInfoService.php
  2. 4 1
      application/common/service/ApproveService.php

+ 2 - 1
application/common/service/ApproveInfoService.php

@@ -146,7 +146,8 @@ class ApproveInfoService
             Db::commit();
         } catch (Exception $e) {
             Db::rollback();
-            except('出现错误:' . $e->getMessage() . '|' . $e->getFile() . '|' . $e->getLine());
+//            except('出现错误:' . $e->getMessage() . '|' . $e->getFile() . '|' . $e->getLine());
+            except('出现错误:' . $e->getMessage());
         }
 
         if ($way == CommonConstant::create) {

+ 4 - 1
application/common/service/ApproveService.php

@@ -474,6 +474,7 @@ class ApproveService
             if ($info->module == CommonConstant::MODULE_3) {
                 // 入库商品列表 TODO
                 $stock_goods = $info->stock_goods;
+                p($stock_goods->toArray());
                 if (!$stock_goods->toArray()) {
                     except('入库商品不存在');
                 }
@@ -493,16 +494,17 @@ class ApproveService
                 }
             }
         }
+        p($approve);exit;
 
         Db::startTrans();
         try {
             // 更新审批申请
             if ($status == CommonConstant::STATUS_3) {
-                // 审批通过
                 // 审批流程批次小于审批次数 更新下一级审批状态
                 if ($approve['approve_flow'] < $info['approve_num']) {
                     Approve::where(['info_id' => $approve['info_id'], 'approve_flow' => $approve['approve_flow'] + 1])->update(['status' => CommonConstant::STATUS_2, 'approve_time' => $approve_time]);
                 } else {
+                    // 审批通过
                     $info->status = $status;
                 }
             }
@@ -511,6 +513,7 @@ class ApproveService
                 $info->status = $status;
             }
             if ($maintain_user_id > 0) {
+                // 维修人员ID
                 $info->maintain_user_id = $maintain_user_id;
             }
             $info->cur_num = $info['cur_num'] + 1;