更新
This commit is contained in:
parent
a2d7bfc722
commit
437494071d
@ -25,6 +25,7 @@ use app\common\model\Company;
|
||||
use think\facade\Db;
|
||||
use app\common\logic\contract\ContractLogic;
|
||||
use app\common\model\contract\Contract;
|
||||
use app\common\model\user\User;
|
||||
|
||||
/**
|
||||
* Company控制器
|
||||
@ -229,8 +230,12 @@ class CompanyController extends BaseAdminController
|
||||
*/
|
||||
public function subordinate($company_id)
|
||||
{
|
||||
$company = Company::findOrEmpty($company_id);
|
||||
$result = loopGetChild(Company::class, $company->id, 'level_one', 'company_name,id,company_type,area,area area_name,street,street street_name,is_contract,area_manager,area_manager area_manager_name,master_name,master_phone');
|
||||
$ids=Contract::where('party_a',$company_id)->where('status',1)->where('type',1)->column('party_b');
|
||||
if($ids){
|
||||
$result=Company::where('id','in',$ids)->field('company_name,id,company_type,area,area area_name,street,street street_name,is_contract,area_manager,area_manager area_manager_name,master_name,master_phone')->select();
|
||||
}else{
|
||||
$result=[];
|
||||
}
|
||||
$data['lists'] = $result;
|
||||
return $this->success('success', $data);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user