You've already forked guangan
工单处理
This commit is contained in:
@ -150,7 +150,6 @@ class Ticket extends Controller
|
||||
{
|
||||
$this->title = "工单分配";
|
||||
if ($this->request->isPost()) {
|
||||
$this->_applyFormToken();
|
||||
// 提交
|
||||
$data = $this->_vali([
|
||||
'id.require' => '请指定工单ID!',
|
||||
@ -169,6 +168,14 @@ 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 {
|
||||
@ -360,7 +367,7 @@ class Ticket extends Controller
|
||||
$query->like(['title|content|contact_name|ticket_address|contact_phone#keyword'])
|
||||
->dateBetween(['create_at'])
|
||||
->equal(['status', 'type_id']);
|
||||
$query->whereIn("id", ApprovalStep::query()->where(['approver_id' => $this->user_id, 'status' => 0, 'approver_type' => 1, 'instance.status' => 0]))
|
||||
$query->whereIn("id", ApprovalStep::query()->where(['approver_id' => $this->user_id, 'status' => 0, 'approver_type' => 1, 'instance.status' => 0])->field("oid")->select())
|
||||
->append(['imgs_arr', 'source_type_name', 'status_text', 'type_name', 'last_reply'])->with('approval');
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user