liugc 1 year ago
parent
commit
608ce63ff0
2 changed files with 12 additions and 6 deletions
  1. 8 2
      app/common/command/OpenObtainOrder.php
  2. 4 4
      app/common/command/SendBxMail.php

+ 8 - 2
app/common/command/OpenObtainOrder.php

@@ -27,8 +27,14 @@ class OpenObtainOrder extends Command
             $infoWorkerIds = MasterWorkerInfo::where(['audit_state'=>1])->column('worker_id');
             $bankWorkerIds = BankAccount::where(['audit_state'=>1])->column('worker_id');
             $ids = array_intersect($infoWorkerIds,$bankWorkerIds);
-            $workerIds = MasterWorker::where([['audit_state',"IN",($ids?:[0])],['accept_order_status','=',0]])->column('id')?:[9];
-            $workerIds = [5];
+            $workerIds = MasterWorker::where([
+                ['audit_state',"=",1],
+                ['accept_order_status','=',0],
+                ['work_status','=',0],
+                ['id',"IN",($ids?:[0])],
+            ])->column('id')?:[];
+            //$workerIds = [5];
+            $workerIds[] = 5;
             Log::write('OpenObtainOrder:workerIds:'.json_encode($workerIds));
             foreach ($workerIds as $workerId) {
                 event('Notice',  [

+ 4 - 4
app/common/command/SendBxMail.php

@@ -58,10 +58,10 @@ class SendBxMail extends Command
             $mail->CharSet = 'UTF-8';
             // 发送者和接收者设置
             $mail->setFrom('whkyjl@126.com', '武汉开源节流科技有限公司');     // 发件人邮箱和名称
-//            $mail->addAddress('sujing@ub.chinalife-p.com.cn', '出单业务'); // 收件人邮箱和名称
-//            $mail->addAddress('649478907@qq.com', '出单业务'); // 收件人邮箱和名称
-//            $mail->addAddress('liliangjie@ub.chinalife-p.com.cn', '出单业务'); // 收件人邮箱和名称
-//            $mail->addAddress('fangxuhao@outlook.com', '出单业务'); // 收件人邮箱和名称
+            $mail->addAddress('sujing@ub.chinalife-p.com.cn', '出单业务'); // 收件人邮箱和名称
+            $mail->addAddress('649478907@qq.com', '出单业务'); // 收件人邮箱和名称
+            $mail->addAddress('liliangjie@ub.chinalife-p.com.cn', '出单业务'); // 收件人邮箱和名称
+            $mail->addAddress('fangxuhao@outlook.com', '出单业务'); // 收件人邮箱和名称
 //            $mail->addAddress('1804628603@qq.com', '出单业务'); // 收件人邮箱和名称
             $mail->addAddress('466014217@qq.com', '出单业务'); // 收件人邮箱和名称