完成订单重构
This commit is contained in:
parent
5a6642ea1f
commit
b6cc5c5cc6
|
|
@ -396,7 +396,7 @@ class Order extends Backend
|
|||
//日志
|
||||
$hookParams = [
|
||||
'dispatch' => (new OrderDispatch())->where('id', $res)->find(),
|
||||
'remark' => '系统自动派单',
|
||||
'remark' => '系统自动派单给师傅:'. $worker->name .'('.$worker->tel.')',
|
||||
];
|
||||
Hook::listen('order_dispatch_change', $hookParams);
|
||||
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ class Dispatch extends Backend
|
|||
//dispatch log
|
||||
$hookParams2 = [
|
||||
'dispatch' => $dispatch,
|
||||
'remark' => '手动派单',
|
||||
'remark' => '手动派单给师傅:' . $worker->name .'('.$worker->tel.')',
|
||||
];
|
||||
Hook::listen('order_dispatch_change', $hookParams2);
|
||||
|
||||
|
|
@ -291,7 +291,6 @@ class Dispatch extends Backend
|
|||
Db::commit();
|
||||
} catch (PDOException | Exception $e) {
|
||||
Db::rollback();
|
||||
throw $e;
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
/* if ($count) {
|
||||
|
|
|
|||
|
|
@ -204,7 +204,6 @@ class Dispatch2 extends Backend
|
|||
//记录日志
|
||||
$remark = '师傅由 ('.$row->worker_id.')'.$row->worker_name.' 更换为('.$params['worker_id'].')'.$worker->name;
|
||||
$workerChange = true;
|
||||
|
||||
}
|
||||
$result = $row->allowField(true)->save($params);
|
||||
|
||||
|
|
@ -331,7 +330,7 @@ class Dispatch2 extends Backend
|
|||
|
||||
//修改订单状态
|
||||
$OrderLogic = new OrderLogic();
|
||||
$OrderLogic -> dispachFinishAfter($row,['role'=>1,'auth'=>$this->auth,'remark'=>'后台完成任务,操作人:'.$this->auth->nickname],true);
|
||||
$OrderLogic -> dispachFinishAfter($row,['role'=>1,'auth'=>$this->auth,'remark'=>'后台完成任务'],true);
|
||||
Db::commit();
|
||||
} catch (ValidateException | PDOException | Exception $e) {
|
||||
Db::rollback();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user