|
|
|
@ -100,18 +100,24 @@ class AssignmentService extends BaseApiService |
|
|
|
} |
|
|
|
|
|
|
|
//查询详情 |
|
|
|
public function getTestInfo(array $where) |
|
|
|
public function getInfo(array $where) |
|
|
|
{ |
|
|
|
$model = new ChatFriends(); |
|
|
|
//判断用没有员工id |
|
|
|
if (!empty($where['personnel_id'])) { |
|
|
|
$model = $model->where('personnel_id', $where['personnel_id']); |
|
|
|
$model = new Assignment(); |
|
|
|
if (!empty($where['id'])) { |
|
|
|
$model = $model->where('id', $where['id']); |
|
|
|
} |
|
|
|
if (!empty($where['customer_resources_id'])) { |
|
|
|
$model = $model->where('customer_resources_id', $where['customer_resources_id']); |
|
|
|
} |
|
|
|
$data = $model->find(); |
|
|
|
|
|
|
|
$data = $model->with([ |
|
|
|
'student' => function ($query) { |
|
|
|
$query->with([ |
|
|
|
'customerResources' => function ($query2) { |
|
|
|
$query2->with([ |
|
|
|
'member' |
|
|
|
]); |
|
|
|
} |
|
|
|
]); |
|
|
|
}, |
|
|
|
])->find(); |
|
|
|
|
|
|
|
if ($data) { |
|
|
|
$data = $data->toArray(); |
|
|
|
|