聚合公司绑定功能及汇总提示语添加

master
zhengyongxing 4 years ago
parent 4cf512779a
commit 14ad9ce93d

@ -172,12 +172,14 @@ class AggregateRelationController extends AdminController
} }
// $this->checkListOrCountAuthRestMap($where);//导出权限 // $this->checkListOrCountAuthRestMap($where);//导出权限
$dbres = $this->DBlogModel->where("first_company_type = 3 or second_company_type = 3")->where($where)->order("FIELD(status,0,1,-1,-2,2),id desc"); $dbress = $this->DBlogModel->where("first_company_type = 3 or second_company_type = 3")->order("FIELD(status,0,1,-1,-2,2),id desc")->select(false);
if(isset($params['export'])){ if(isset($params['export'])){
$dbres = $dbres->select(); $dbres = M()->table("({$dbress})a")->where($where)->select();
}else{ }else{
$dbres = $dbres->page($page, $row)->select(); $dbres = M()->table("({$dbress})a")->page($page, $row)->where($where)->select();
} }
foreach($dbres as $k=>&$v){ foreach($dbres as $k=>&$v){
$v['settlement_type'] =$this->SettlementType[$v['settlement_type']]; $v['settlement_type'] =$this->SettlementType[$v['settlement_type']];
$v['first_company_type'] =$this->CompanyType[$v['first_company_type']]; $v['first_company_type'] =$this->CompanyType[$v['first_company_type']];
@ -239,7 +241,7 @@ class AggregateRelationController extends AdminController
)); ));
} }
$count = $this->DBlogModel->field("count(id) count")->where($where)->where("first_company_type = 3 or second_company_type = 3")->find()['count']; $count = M()->table("({$dbress})a")->field("count(id) count")->where($where)->find()['count'];
$this->assign('data', $dbres); $this->assign('data', $dbres);
$page = set_pagination($count, $row,$params); $page = set_pagination($count, $row,$params);
if($page) { if($page) {

Loading…
Cancel
Save