Commit e80f6f84 authored by hujun's avatar hujun

我的约带看搜索

parent 4e4341c2
......@@ -14,6 +14,7 @@ use app\api_broker\service\ReportService;
use app\index\extend\Basic;
use app\model\AAgents;
use app\model\ASite;
use app\model\GHouses;
use app\model\OReportModel;
use think\cache\driver\Redis;
......@@ -191,6 +192,23 @@ class Report extends Basic
return $this->response(101, "暂无权限");
}
}
if (!empty($params['internal_address'])) {
$m_house = new GHouses();
$house_where['internal_address'] = ['like', '%'.$params['internal_address'].'%'];
$house_where['status'] = ['<>', 3];
$house_id_array = $m_house->getHouseColumn('id', $house_where);
if ($house_id_array) {
if ($params['house_id']) {
$num = count($house_id_array) + 1;
$house_id_array[$num] = $params['house_id'];
}
$params['house_id'] = implode(',', $house_id_array);
}
}
$result = $this->service_->orderListAll($field, $params, $pageNo, $pageSize, $check_type);
// } else {
// $result = $this->service_->orderList($field, $params, $pageNo, $pageSize);
......
......@@ -198,6 +198,34 @@ class OReportModel extends Model
$where['b.id'] = $params['order_id'];
}
if (!empty($params['house_title'])) {
$where['b.house_title'] = $params['house_title'];
}
if (!empty($params['house_id'])) {
$where['b.house_id'] = $params['house_id'];
}
if (!empty($params['user_phone'])) {
$where['a.user_phone'] = $params['user_phone'];
}
if (!empty($params['user_id'])) {
$where['a.user_id'] = $params['user_id'];
}
if (!empty($params['report_agent_name'])) {
$where['a.report_agent_name'] = ['LIKE', '%'.$params['report_agent_name'].'%'];
}
if (!empty($params['report_agent_phone'])) {
$where['a.report_agent_phone'] = ['LIKE', '%'.$params['report_agent_phone'].'%'];
}
if (!empty($params['create_time_start']) && !empty($params['create_time_end'])) {
$where['a.create_time'] = ['between', [$params['create_time_start']. ' 00:00:00', $params['create_time_end']. ' 23:59:59']];
}
switch ($params["type"]) {
case 2:
$result = $this->db->field($filed)
......
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