Просмотр исходного кода

选择经销商(订单)支持经销商编号模糊查询

郭齐峰 3 лет назад
Родитель
Сommit
dc85350b38

+ 4 - 2
src/custom/restcontroller/webmanage/sale/enterprise/SQL/经销商列表.sql

@@ -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$

+ 1 - 0
src/custom/restcontroller/webmanage/sale/enterprise/enterprise.java

@@ -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(")");
             }