cqp 3 週間 前
コミット
4bb1520e20
1 ファイル変更5 行追加7 行削除
  1. 5 7
      app/Service/WorkFlowService.php

+ 5 - 7
app/Service/WorkFlowService.php

@@ -325,10 +325,8 @@ class WorkFlowService extends Service
     }
 
     public function approval($data, $user){
-//        list($status, $msg, $result) = $this->approve($data, $user);
-//        if(! $status) return [false, $msg];
-        $result = 1;
-        $msg = 16;
+        list($status, $msg, $result) = $this->approve($data, $user);
+        if(! $status) return [false, $msg];
 
         if($result == 1 || $result == 2){
             $instance_id = $msg;
@@ -343,9 +341,9 @@ class WorkFlowService extends Service
         if(empty($w)) return;
         $w = $w->toArray();
 
-        //where('del_time',0)
-        //            ->
-        $draft = Draft::where('document_type', $w['document_type'])
+
+        $draft = Draft::where('del_time',0)
+            ->where('document_type', $w['document_type'])
             ->where('document_id', $w['document_id'])
             ->where('top_depart_id', $w['top_depart_id'])
             ->latest()