Commit d25eaa98 authored by clone's avatar clone

1

parent 0e801efd
...@@ -87,7 +87,7 @@ class Report extends Basic ...@@ -87,7 +87,7 @@ class Report extends Basic
$house_ids_arr = explode(',', $house_ids); $house_ids_arr = explode(',', $house_ids);
if (is_array($house_ids_arr)) { if (is_array($house_ids_arr)) {
foreach ($house_ids_arr as $k=>$v) { foreach ($house_ids_arr as $k => $v) {
$push->pushReportMessage($v, $agent_id, 1, $this->agentId, $user_id); //推送报备信息 $push->pushReportMessage($v, $agent_id, 1, $this->agentId, $user_id); //推送报备信息
} }
} }
...@@ -112,7 +112,7 @@ class Report extends Basic ...@@ -112,7 +112,7 @@ class Report extends Basic
public function reportList() public function reportList()
{ {
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"agent_id" =>1, "agent_id" =>1,
"type" => 2,//1表示全部 2表示进场 3 表示收款 4成交报告 "type" => 2,//1表示全部 2表示进场 3 表示收款 4成交报告
"is_all"=>1,//0搜索我自己的,1全部 "is_all"=>1,//0搜索我自己的,1全部
...@@ -136,20 +136,20 @@ class Report extends Basic ...@@ -136,20 +136,20 @@ class Report extends Basic
//todo 总监账号看全部带看记录 by 190708 //todo 总监账号看全部带看记录 by 190708
$agentModel = new AAgents(); $agentModel = new AAgents();
$agents_data = $agentModel->getAgentInfo('id,level', $this->agentId); $agents_data = $agentModel->getAgentInfo('id,level', $this->agentId);
if($agents_data["level"] == 30 || $agents_data["level"] == 40 ){ if (isset($params["is_all"]) && $params["is_all"] == 1) {
$result = $this->service_->orderListAll($field, $params, $pageNo, $pageSize,1); $check_type = 1;
}else{ if ($agents_data["level"] < 30) {
if( isset($params["is_all"]) && $params["is_all"] == 1){
$check_type = $this->service_->getCheckType($this->agentId); $check_type = $this->service_->getCheckType($this->agentId);
if ($check_type == 0) { if ($check_type == 0) {
return $this->response(101, "暂无权限"); return $this->response(101, "暂无权限");
} }
$result = $this->service_->orderListAll($field, $params, $pageNo, $pageSize,$check_type);
}else{
$result = $this->service_->orderList($field, $params, $pageNo, $pageSize);
} }
$result = $this->service_->orderListAll($field, $params, $pageNo, $pageSize, $check_type);
} else {
$result = $this->service_->orderList($field, $params, $pageNo, $pageSize);
} }
if (count($result) > 0) { if (count($result) > 0) {
return $this->response("200", "request success", $result); return $this->response("200", "request success", $result);
} else { } else {
...@@ -158,7 +158,6 @@ class Report extends Basic ...@@ -158,7 +158,6 @@ class Report extends Basic
} }
/** /**
* 获取权限 * 获取权限
* @return int|\think\Response * @return int|\think\Response
...@@ -169,7 +168,7 @@ class Report extends Basic ...@@ -169,7 +168,7 @@ class Report extends Basic
if ($result == 0) { if ($result == 0) {
return $this->response(101, "暂无权限"); return $this->response(101, "暂无权限");
} else { } else {
return $this->response("200", "request success", ['check_type'=>$result]); return $this->response("200", "request success", ['check_type' => $result]);
} }
} }
...@@ -266,7 +265,7 @@ class Report extends Basic ...@@ -266,7 +265,7 @@ class Report extends Basic
'broker/bargain', 'broker/bargain',
/* 'broker/statusBargain',*/ /* 'broker/statusBargain',*/
]; ];
$param["name"] = array( "in", $auth_arr ); $param["name"] = array("in", $auth_arr);
$agents = new AAgents(); $agents = new AAgents();
$is_auth = $agents->agentsAuthIds($params["agent_id"], $param); $is_auth = $agents->agentsAuthIds($params["agent_id"], $param);
......
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