|
@@ -164,8 +164,9 @@ class ImportService extends Service
|
|
|
$config_array = config($config) ?? [];
|
|
|
if(empty($config_array)) return [false, '配置文件不存在', ''];
|
|
|
|
|
|
- $model = BasicType::TopClear($user,$data);
|
|
|
- $result = $model->whereRaw('type = 22 And del_time = 0')->get()->toArray();
|
|
|
+ $depart_id = $this->getDepart($user);
|
|
|
+ $top_depart_id = $user['depart_map'][$depart_id] ?? 0;
|
|
|
+ $result = BasicType::whereRaw('type = 22 And del_time = 0 And top_depart_id = ' . $top_depart_id)->get()->toArray();
|
|
|
|
|
|
if(! empty($result)){
|
|
|
foreach ($result as $value){
|