Commit e8109a82 authored by clone's avatar clone

办公楼报备搜索

parent 790e7e98
......@@ -332,7 +332,7 @@ class OfficeOrderLog extends Basic{
}
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) {
return $this->response("200", "request success", $list);
} else {
......
......@@ -1429,9 +1429,13 @@ class OfficeOrderLogService
* 成交报告客户搜索
* @param $type
* @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();
$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
$list = $houseAgents->getAgentsByHouseId($fields, $params);
break;
case 2:
$fields = "c.id,c.phone,c.name";
$userModel = new Users();
$params["a.id"] = $result[0]["user_id"];
$params["b.status"] = 0;
$list = $userModel->getAgentByUserId($fields, $params);
$params["c.status"] = 0;
$params["b.site_id"] = $site_id;
$list = $userModel->getAgentBySiteId($fields, $params);
break;
case 3: //反签 == 报备人
$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