Commit e8109a82 authored by clone's avatar clone

办公楼报备搜索

parent 790e7e98
...@@ -332,7 +332,7 @@ class OfficeOrderLog extends Basic{ ...@@ -332,7 +332,7 @@ class OfficeOrderLog extends Basic{
} }
try { try {
$list = $this->service_->searchBargainAgents($params["type"], $params["order_id"]); $list = $this->service_->searchBargainAgents($params["type"], $params["order_id"],$this->siteId);
if (count($list) > 0) { if (count($list) > 0) {
return $this->response("200", "request success", $list); return $this->response("200", "request success", $list);
} else { } else {
......
...@@ -1424,14 +1424,18 @@ class OfficeOrderLogService ...@@ -1424,14 +1424,18 @@ class OfficeOrderLogService
$Users->update_user_status(['id' => $result[0]["user_id"], 'user_status' => 1]); $Users->update_user_status(['id' => $result[0]["user_id"], 'user_status' => 1]);
} }
} }
/** /**
* 成交报告客户搜索 * 成交报告客户搜索
* @param $type * @param $type
* @param $order_id * @param $order_id
* @return false|null|\PDOStatement|string|\think\Collection * @param $site_id
* @return false|\PDOStatement|string|\think\Collection|null
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/ */
public function searchBargainAgents($type, $order_id) public function searchBargainAgents($type, $order_id,$site_id)
{ {
$orderModel = new OfficeOrderModel(); $orderModel = new OfficeOrderModel();
$field = "a.id,a.order_no,a.house_id,a.house_title,b.id as report_id,b.user_id,c.user_nick,c.user_phone, $field = "a.id,a.order_no,a.house_id,a.house_title,b.id as report_id,b.user_id,c.user_nick,c.user_phone,
...@@ -1453,10 +1457,12 @@ class OfficeOrderLogService ...@@ -1453,10 +1457,12 @@ class OfficeOrderLogService
$list = $houseAgents->getAgentsByHouseId($fields, $params); $list = $houseAgents->getAgentsByHouseId($fields, $params);
break; break;
case 2: case 2:
$fields = "c.id,c.phone,c.name";
$userModel = new Users(); $userModel = new Users();
$params["a.id"] = $result[0]["user_id"]; $params["a.id"] = $result[0]["user_id"];
$params["b.status"] = 0; $params["c.status"] = 0;
$list = $userModel->getAgentByUserId($fields, $params); $params["b.site_id"] = $site_id;
$list = $userModel->getAgentBySiteId($fields, $params);
break; break;
case 3: //反签 == 报备人 case 3: //反签 == 报备人
$reportModel = new OfficeOReportModel(); $reportModel = new OfficeOReportModel();
......
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