公司获取优化

master
chenzhi 4 years ago
parent 40940b4536
commit e96c6e8b52

@ -72,7 +72,7 @@ class CompanyRelationController extends AdminController
$where['is_payment'] = $params['is_payment'];
}
$this->checkListOrCountAuthRestMap($where);//导出权限
// $this->checkListOrCountAuthRestMap($where);//导出权限
$dbres = $this->DBModel->where($where)->order("id desc");;
if(isset($params['export'])){
$dbres = $dbres->select();
@ -153,7 +153,7 @@ class CompanyRelationController extends AdminController
if(isset($params['status'])){
$where['status'] = $params['status'];
}
$this->checkListOrCountAuthRestMap($where);//导出权限
// $this->checkListOrCountAuthRestMap($where);//导出权限
$dbres = $this->DBlogModel->where($where)->order("FIELD(status,0,1,-1,-2,2),id desc");;
if(isset($params['export'])){
$dbres = $dbres->select();

@ -727,7 +727,7 @@ class CompanyStatementController extends ThinkController
$upwhere = "(first_company_type = 1 AND first_company_id NOT IN ({$up_company_id}) ) OR ( second_company_type = 1 AND second_company_id NOT IN ({$up_company_id}) )";
}
$uprelation = M("company_relation","tab_")->field("first_company_id,first_company_type,second_company_id,second_company_type")->where($upwhere)->select();
foreach($uprelation as $k=>$v){
if($v['first_company_type'] == 0){
$senddata["up_company_id"][] = $v['second_company_id'];
@ -741,7 +741,7 @@ class CompanyStatementController extends ThinkController
$downwhere = "1=1";
}else{
$dowm_company_id =implode(",",$dowm_company_id);
$downwhere = "(first_company_type = 1 AND first_company_id NOT IN ({$dowm_company_id}) ) OR ( second_company_type = 1 AND second_company_id NOT IN ({$dowm_company_id}) )";
$downwhere = "(first_company_type = 2 AND first_company_id NOT IN ({$dowm_company_id}) ) OR ( second_company_type = 2 AND second_company_id NOT IN ({$dowm_company_id}) )";
}
$downrelation = M("company_relation","tab_")->field("first_company_id,first_company_type,second_company_id,second_company_type")->where($downwhere)->select();

Loading…
Cancel
Save