Commit 2b43016e authored by zw's avatar zw

分档统计

parent 188ab01a
...@@ -431,7 +431,7 @@ class AAgents extends BaseModel ...@@ -431,7 +431,7 @@ class AAgents extends BaseModel
as aa left join as aa left join
(select a.id,c.store_name,a.name,a.phone,0.00 as performance from a_agents a (select a.id,c.store_name,a.name,a.phone,0.00 as performance from a_agents a
left join t_agent_total b on a.id=b.agent_id left join a_store c on a.store_id=c.id left join t_agent_total b on a.id=b.agent_id left join a_store c on a.store_id=c.id
where b.total_time BETWEEN '$startTime' and '$endTime'and a.status in (0,3) $str_ids GROUP BY b.agent_id ) where a.site_id=$siteId and b.total_time BETWEEN '$startTime' and '$endTime'and a.status in (0,3) $str_ids GROUP BY b.agent_id )
as bb on aa.id = bb.id where bb.id is null" ; as bb on aa.id = bb.id where bb.id is null" ;
$data = Db::table($this->table)->query($sql); $data = Db::table($this->table)->query($sql);
//echo $this->getLastSql(); //echo $this->getLastSql();
......
...@@ -313,7 +313,7 @@ class AStore extends BaseModel ...@@ -313,7 +313,7 @@ class AStore extends BaseModel
as aa left join as aa left join
(select a.id,a.store_name,0.00 as performance from a_store a (select a.id,a.store_name,0.00 as performance from a_store a
left join t_agent_total b on a.id=b.store_id left join t_agent_total b on a.id=b.store_id
where b.total_time BETWEEN '$startTime' and '$endTime'and a.status =0 $str_ids GROUP BY b.store_id ) where a.site_id=$siteId and b.total_time BETWEEN '$startTime' and '$endTime'and a.status =0 $str_ids GROUP BY b.store_id )
as bb on aa.id = bb.id where bb.id is null"; as bb on aa.id = bb.id where bb.id is null";
$data = Db::table($this->table)->query($sql); $data = Db::table($this->table)->query($sql);
//echo $this->getLastSql(); //echo $this->getLastSql();
......
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