查区县公司
This commit is contained in:
parent
1d85dcc2d5
commit
364c45099a
@ -355,13 +355,25 @@ class CompanyController extends BaseApiController
|
|||||||
* 查询镇农科公司
|
* 查询镇农科公司
|
||||||
*/
|
*/
|
||||||
public function street_company(){
|
public function street_company(){
|
||||||
$street=$this->request->param('street_code');
|
$street=$this->request->param('street_code', '');
|
||||||
$company=Db::query("select * from la_company where company_type=:company_type and FIND_IN_SET(:street,responsible_area)", ['company_type' => 41,'street'=>$street], true);
|
$area=$this->request->param('area_code', '');
|
||||||
if($company){
|
if (!empty($street)) {
|
||||||
return $this->success('ok',['title'=>$company[0]['company_name'],'organization_code'=>$company[0]['organization_code']]);
|
$company=Db::query("select * from la_company where company_type=:company_type and FIND_IN_SET(:street,responsible_area)", ['company_type' => 41,'street'=>$street], true);
|
||||||
}else{
|
if($company){
|
||||||
return $this->fail('当前区域无镇农科公司');
|
return $this->success('ok',['title'=>$company[0]['company_name'],'organization_code'=>$company[0]['organization_code']]);
|
||||||
|
}else{
|
||||||
|
return $this->fail('当前区域无镇农科公司');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if(!empty($area)) {
|
||||||
|
$company=Db::query("select * from la_company where company_type=:company_type and FIND_IN_SET(:street,responsible_area)", ['company_type' => 15,'area'=>$area], true);
|
||||||
|
if($company){
|
||||||
|
return $this->success('ok',['title'=>$company[0]['company_name'],'organization_code'=>$company[0]['organization_code']]);
|
||||||
|
}else{
|
||||||
|
return $this->fail('当前区域无供投公司');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user