Commit 6d82a647 authored by zw's avatar zw

huancun

parent 2bd10374
...@@ -437,11 +437,11 @@ class AAgents extends BaseModel ...@@ -437,11 +437,11 @@ class AAgents extends BaseModel
$str_ids = " and a.id in ($ids)"; $str_ids = " and a.id in ($ids)";
} }
$sql = "select aa.id,aa.store_name,aa.name,aa.phone,aa.performance from $sql = "select aa.id,aa.store_name,aa.name,aa.phone,aa.performance from
(select a.id,c.store_name,a.name,a.phone,0 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 a_store c on a.store_id=c.id left join a_store c on a.store_id=c.id
where a.position=$position and a.site_id=$siteId and a.status in (0,3) $str_ids ) where a.position=$position and a.site_id=$siteId and a.status in (0,3) $str_ids )
as aa left join as aa left join
(select a.id,c.store_name,a.name,a.phone,0 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 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" ;
......
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