You've already forked guangan
分类
This commit is contained in:
@ -148,6 +148,15 @@ class Ticket extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 工单分配
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @return void
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function move()
|
||||
{
|
||||
$this->title = "工单分配";
|
||||
@ -170,19 +179,12 @@ class Ticket extends Controller
|
||||
// 外部
|
||||
$ticket->state = 2;
|
||||
}
|
||||
if ($ticket->fz_user_id) {
|
||||
$staff = InspectionStaff::query()->find($ticket->fz_user_id);
|
||||
$staff->messages()->save([
|
||||
'title' => "您有新的工单待处理",
|
||||
'content' => "您有新的工单待处理,请及时处理。",
|
||||
]);
|
||||
}
|
||||
$ticket->status = 1;
|
||||
$ticket->save();
|
||||
$this->success('工单分配成功!');
|
||||
} else {
|
||||
$this->dept_list = TicketDept::query()->scope('avail')->select();
|
||||
$this->user_list = InspectionStaff::query()->select();
|
||||
$this->user_list = SystemUser::query()->select();
|
||||
$this->fetch();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user