Commit de010fbf authored by zhuwei's avatar zhuwei

bug

parent c2dff300
...@@ -114,8 +114,6 @@ class Performance extends Basic ...@@ -114,8 +114,6 @@ class Performance extends Basic
$end_day = !empty($params["end_day"]) ? $params["end_day"] : date("Y-m-d", time()); $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()); $start_day = !empty($params["start_day"]) ? $params["start_day"] : date("Y-m-01", time());
$father_id = !empty($params["father_id"]) ? $params["father_id"] : '' ; $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);
if (count($list) > 0) { if (count($list) > 0) {
$result["list"] = $list['list']; $result["list"] = $list['list'];
......
...@@ -32,7 +32,7 @@ class PerformanceInfo extends Basic ...@@ -32,7 +32,7 @@ class PerformanceInfo extends Basic
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo']; $pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize']; $pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize'];
$where=[]; $where['Obargain.status'] = ['neq',30];
/*开始结束时间*/ /*开始结束时间*/
if (($this->params['create_time_start'] != NULL) && ($this->params['create_time_end'] != NULL)) { if (($this->params['create_time_start'] != NULL) && ($this->params['create_time_end'] != NULL)) {
$where['Obargain.create_time'] = ['between time', [$this->params['create_time_start']. ' 00:00:00', $this->params['create_time_end'] . ' 23:59:59']]; $where['Obargain.create_time'] = ['between time', [$this->params['create_time_start']. ' 00:00:00', $this->params['create_time_end'] . ' 23:59:59']];
......
...@@ -51,10 +51,9 @@ class PerformanceService ...@@ -51,10 +51,9 @@ class PerformanceService
* @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function totalAgent($type, $yesterday, $end_day,$father_id) public function totalAgent($type, $yesterday, $end_day,$pageNo,$pageSize,$father_id)
{ {
$where_ = []; $where_ = [];
$where_['total_time'] = array( 'between', array( $end_day, $yesterday ) );
if($father_id){ if($father_id){
if($type == 1){ if($type == 1){
$where_['store_id'] = $father_id; $where_['store_id'] = $father_id;
...@@ -63,7 +62,6 @@ class PerformanceService ...@@ -63,7 +62,6 @@ class PerformanceService
} }
} }
$where_ = [];
$where_['a.create_time'] = array( 'between', array( $end_day . " 00:00:00", $yesterday . " 23:59:59" ) ); $where_['a.create_time'] = array( 'between', array( $end_day . " 00:00:00", $yesterday . " 23:59:59" ) );
$field = "b.id as agent_id,b.store_id,b.district_id,sum(a.scale_fee) as performance_total"; $field = "b.id as agent_id,b.store_id,b.district_id,sum(a.scale_fee) as performance_total";
......
...@@ -1217,6 +1217,8 @@ class OBargainModel extends Model ...@@ -1217,6 +1217,8 @@ class OBargainModel extends Model
break; break;
} }
$result = $this->db_ $result = $this->db_
->field($field) ->field($field)
->alias("a") ->alias("a")
...@@ -1225,7 +1227,7 @@ class OBargainModel extends Model ...@@ -1225,7 +1227,7 @@ class OBargainModel extends Model
->group($group_) ->group($group_)
->order($order) ->order($order)
->select(); ->select();
// echo $this->db_->getLastSql(); //echo $this->db_->getLastSql();
return $result; return $result;
} }
......
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