|
|
|
|
@ -89,7 +89,13 @@ class VisitController extends CommonController
|
|
|
|
|
if (empty($item->admin_id)) {
|
|
|
|
|
// 上级审核
|
|
|
|
|
$admin = Admin::find($all['accept_admin_id']);
|
|
|
|
|
if (empty($admin->department_id)) {
|
|
|
|
|
return $this->fail([ResponseCode::ERROR_BUSINESS, '接待人部门不存在']);
|
|
|
|
|
}
|
|
|
|
|
$department = Department::find($admin->department_id);
|
|
|
|
|
if (empty($department->manager_id)) {
|
|
|
|
|
return $this->fail([ResponseCode::ERROR_BUSINESS, '接待人部门不存在负责人']);
|
|
|
|
|
}
|
|
|
|
|
$item->admin_id = $department->manager_id;
|
|
|
|
|
}
|
|
|
|
|
VisitAudit::create([
|
|
|
|
|
|