Commit beebd8a3 authored by hujun's avatar hujun

修改监督执行列表

parent 95ddf0a5
...@@ -10,6 +10,8 @@ namespace app\api_broker\controller; ...@@ -10,6 +10,8 @@ namespace app\api_broker\controller;
use app\api_broker\extend\Basic; use app\api_broker\extend\Basic;
use app\api_broker\service\VerifyService;
use app\model\AAgents;
use app\model\SSupervision; use app\model\SSupervision;
class Supervise extends Basic class Supervise extends Basic
...@@ -86,17 +88,18 @@ class Supervise extends Basic ...@@ -86,17 +88,18 @@ class Supervise extends Basic
$supervision = new SSupervision(); $supervision = new SSupervision();
$fields = 'longitude,latitude,address,content,img_url,b.name,a.create_time'; $fields = 'longitude,latitude,address,content,img_url,b.name,a.create_time';
$verify = new AAgents();
$agent_data = $verify->getAgentInfo('level,store_id,district_id', $this->params['agent_id']);
if (isset($this->params['agent_id'])) { switch ($agent_data['level']) {
$where['agent_id'] = $this->params['agent_id']; case 20 :
} $where = 'a.store_id = '.$agent_data['store_id'];break;
case 30 :
if (isset($this->params['district_id'])) { $where = 'a.district_id = '.$agent_data['district_id'];break;
$where['district_id'] = $this->params['district_id']; case 40 :
} $where = 'a.store_id = '.$agent_data['store_id'] . ' or a.district_id = '.$agent_data['district_id'];break;
default :
if (isset($this->params['store_id'])) { $where = 'agent_id = '.$agent_data['agent_id'];
$where['store_id'] = $this->params['store_id'];
} }
if (empty($where)) { if (empty($where)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment