@@ -2,8 +2,10 @@ select t1.siteid,
t1.sys_enterpriseid,
t1.phonenumber,
t1.contact,
- t1.enterprisename
+ t1.enterprisename,
+ t2.agentnum
from sys_enterprise t1
+ left join sa_agents t2 on t1.siteid = t2.siteid and t1.sys_enterpriseid = t2.sys_enterpriseid
where t1.siteid = $siteid$
- and t1.sys_enterpriseid in (SELECT sys_enterpriseid FROM sa_agents WHERE siteid = $siteid$ and status = '启用')
+ and t2.status='启用'
and $where$
@@ -289,6 +289,7 @@ public class enterprise extends Controller {
where.append(" and(");
where.append("t1.phonenumber like'%").append(whereObject.getString("condition")).append("%' ");
where.append("or t1.enterprisename like'%").append(whereObject.getString("condition")).append("%' ");
+ where.append("or t1.t2.agentnum like'%").append(whereObject.getString("condition")).append("%' ");
where.append("or t1.contact like'").append(whereObject.getString("condition")).append("%' ");
where.append(")");
}