Commit 8957bc54 authored by zhuwei's avatar zhuwei

bug

parent 3c6e3aad
......@@ -116,7 +116,7 @@ class Performance extends Basic
$end_day = !empty($params["end_day"]) ? $params["end_day"] : date("Y-m-d", time());
$start_day = !empty($params["start_day"]) ? $params["start_day"] : date("Y-m-01", time());
$father_id = !empty($params["father_id"]) ? $params["father_id"] : '' ;
$list = $this->service_->totalAgent($params["type"], $end_day, $start_day,$pageNo,$pageSize,$father_id);
$list = $this->service_->totalAgent($params["type"], $end_day, $start_day,$pageNo,$pageSize,$father_id,$params);
if (count($list) > 0) {
$result["list"] = $list['list'];
$result["total"] = $list['total'];
......
......@@ -53,9 +53,10 @@ class PerformanceService
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function totalAgent($type, $yesterday, $end_day,$pageNo,$pageSize,$father_id)
public function totalAgent($type, $yesterday, $end_day,$pageNo,$pageSize,$father_id,$params)
{
$where_ = [];
if($father_id){
if($type == 1){
$where_['store_id'] = $father_id;
......@@ -64,6 +65,19 @@ class PerformanceService
}
}
//区域搜索条件
if (!empty($params['district_id'])) {
$where_['district_id'] = $params['district_id'];
}
//部门搜索条件
if (!empty($params['store_id'])) {
$where_['store_id'] = $params['store_id'];
}
//经纪人搜索条件
if (!empty($params['agent_id'])) {
$where_['agent_id'] = $params['agent_id'];
}
$where_['total_time'] = array( 'between', array( $end_day, $yesterday ) );
/* 成交报告数 bargain_sum
......
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