Commit c97c49d2 authored by hujun's avatar hujun

//

parent 5d5b45e4
...@@ -9,10 +9,13 @@ ...@@ -9,10 +9,13 @@
namespace app\index\controller; namespace app\index\controller;
use app\api_broker\service\RedisCacheService;
use app\api_broker\service\ReportService; use app\api_broker\service\ReportService;
use app\index\extend\Basic; use app\index\extend\Basic;
use app\model\AAgents; use app\model\AAgents;
use app\model\ASite;
use app\model\OReportModel; use app\model\OReportModel;
use think\cache\driver\Redis;
class Report extends Basic class Report extends Basic
{ {
...@@ -146,7 +149,6 @@ class Report extends Basic ...@@ -146,7 +149,6 @@ class Report extends Basic
"page_no"=>1, "page_no"=>1,
"page_size"=>15 "page_size"=>15
);*/ );*/
if (!isset($params["agent_id"]) || !isset($params["type"])) { if (!isset($params["agent_id"]) || !isset($params["type"])) {
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
} }
...@@ -156,15 +158,29 @@ class Report extends Basic ...@@ -156,15 +158,29 @@ class Report extends Basic
$field = "a.id,a.user_id,a.user_phone,a.user_name,a.predict_see_time,a.create_time,b.id as order_id,b.order_no, $field = "a.id,a.user_id,a.user_phone,a.user_name,a.predict_see_time,a.create_time,b.id as order_id,b.order_no,
b.house_id,b.house_title,a.report_agent_name"; b.house_id,b.house_title,a.report_agent_name";
$params["report_agent_id"] = $params["agent_id"];
$result = [];
//todo 总监账号看全部带看记录 by 190708 //todo 总监账号看全部带看记录 by 190708
$agentModel = new AAgents(); $agentModel = new AAgents();
$agents_data = $agentModel->getAgentInfo('id,level', $this->userId); $agents_old = $agentModel->getAgentInfo('id,phone', $this->userId);
switch($params['city']) {
case '上海市':
$site_id = 10001;break;
case '杭州市' :
$site_id = 10002;break;
case '深圳市' :
$site_id = 10003;break;
case '广州市' :
$site_id = 10004;break;
case '北京市' :
$site_id = 10005;break;
default :
$site_id = $this->siteId;
}
$agents_data = $agentModel->getAgentInfo('id,level', $agents_old['phone'], ['site_id'=>$site_id]);
// if (isset($params["is_all"]) && $params["is_all"] == 1) { // if (isset($params["is_all"]) && $params["is_all"] == 1) {
$check_type = 1; $params["report_agent_id"] = $agents_data['id'];
$check_type = 1;
if ($agents_data["level"] < 30) { if ($agents_data["level"] < 30) {
$check_type = $this->service_->getCheckType($this->userId); $check_type = $this->service_->getCheckType($this->userId);
if ($check_type == 0) { if ($check_type == 0) {
......
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