sth
This commit is contained in:
parent
f3b961c372
commit
c1d6259bc9
|
|
@ -59,9 +59,9 @@ class AutoDispatchLogic
|
|||
$hookparams['role'] = 1;
|
||||
$hookparams['auth'] = null;
|
||||
$hookparams['remark'] = '自动完成派单';//. $worker->name.'('.$worker->tel.')';
|
||||
if ($isRetry) {
|
||||
/*if ($isRetry) {
|
||||
$hookparams['remark'] = '订单重派:工程师【'.$worker->name.'】超时不接单,系统自动转派订单';
|
||||
}
|
||||
}*/
|
||||
Hook::listen('order_change', $hookparams);
|
||||
|
||||
//日志
|
||||
|
|
|
|||
|
|
@ -100,12 +100,12 @@ class OrderLogic
|
|||
* 师傅超时未接单的处理逻辑
|
||||
* @return void
|
||||
*/
|
||||
public function noWorkerCanGetIt(OrderDispatch $dispatch,$remark = null)
|
||||
public function noWorkerCanGetIt(OrderDispatch $dispatch,$remark = null,$isOverTime=false)
|
||||
{//超过三次,直接取消
|
||||
Db::startTrans();
|
||||
try {
|
||||
if (is_null($remark)){
|
||||
$remark = '工程师('.$dispatch->worker_name.')超时未接单,任务取消';
|
||||
if ($isOverTime){
|
||||
$remark = '工程师('.$dispatch->worker_name.')超时未接,系统自动转派订单';
|
||||
}
|
||||
$this->cancelOrderDispatch($dispatch,null,$remark);
|
||||
Db::commit();
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class CheckOrderDispatchGotCommand extends Command
|
|||
foreach ($list as $item) {
|
||||
try {
|
||||
//取消旧单
|
||||
$OrderLogic->noWorkerCanGetIt($item);
|
||||
$OrderLogic->noWorkerCanGetIt($item,null,true);
|
||||
//自动重派新单
|
||||
$order = Order::get($item->order_id);
|
||||
AutoDispatchLogic::autoDispatch($order,null,true);
|
||||
|
|
@ -85,7 +85,7 @@ class CheckOrderDispatchGotCommand extends Command
|
|||
foreach ($list as $item) {
|
||||
try {
|
||||
//取消旧单
|
||||
$OrderLogic->noWorkerCanGetIt($item);
|
||||
$OrderLogic->noWorkerCanGetIt($item,null,true);
|
||||
//自动重派新单
|
||||
$order = Order::get($item->order_id);
|
||||
AutoDispatchLogic::autoDispatch($order,null,true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user