This commit is contained in:
xman 2025-06-18 10:08:42 +08:00
parent f3b961c372
commit c1d6259bc9
3 changed files with 7 additions and 7 deletions

View File

@ -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);
//日志

View File

@ -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();

View File

@ -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);