dongxiaoqin пре 1 година
родитељ
комит
52348f19bc
1 измењених фајлова са 9 додато и 4 уклоњено
  1. 9 4
      app/common/command/AutomaticDispatch.php

+ 9 - 4
app/common/command/AutomaticDispatch.php

@@ -45,7 +45,14 @@ class AutomaticDispatch extends Command
 
     protected function execute(Input $input, Output $output)
     {
-        $this->autoDispatch();
+        //自动派单
+        //$this->autoDispatch();
+
+        //执行外呼任务
+        $h = date('H');
+        if ($h >= 8 && $h <= 22) {
+            $this->startTask();
+        }
     }
 
     /*
@@ -104,9 +111,6 @@ class AutomaticDispatch extends Command
                 ]);
             }
         }
-
-        //执行外呼任务
-        $this->startTask();
     }
 
     /**
@@ -120,6 +124,7 @@ class AutomaticDispatch extends Command
                 $res = $weCallService->startTask();
             }
         }
+        $this->customerList = [];
     }
 
     /**