Przeglądaj źródła

商品组查询商品名称改成模糊查询

hu 3 lat temu
rodzic
commit
5fd6a12a34

+ 3 - 3
src/custom/restcontroller/sale/itemgroup/itemgroup.java

@@ -116,9 +116,9 @@ public class itemgroup extends Controller {
             if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {
                 where = where + " and (t1.groupname like'%" + whereObject.getString("condition")
                         + "%' or t1.groupnum like'%" + whereObject.getString("condition")
-                        + "%' or exists(select 1 from sa_itemgroupmx s1 left join plm_item s2 on s1.itemid=s2.itemid and  s1.siteid=s2.siteid where (s2.itemname='"
-                        + whereObject.getString("condition") + "' or s2.itemno='" + whereObject.getString("condition")
-                        + "') and s1.sa_itemgroupid=t1.sa_itemgroupid) ) ";
+                        + "%' or exists(select 1 from sa_itemgroupmx s1 left join plm_item s2 on s1.itemid=s2.itemid and  s1.siteid=s2.siteid where (s2.itemname like '%"
+                        + whereObject.getString("condition") + "%' or s2.itemno like '%" + whereObject.getString("condition")
+                        + "%') and s1.sa_itemgroupid=t1.sa_itemgroupid) ) ";
             }
             if (whereObject.containsKey("tradefield") && !"".equals(whereObject.getString("tradefield"))) {
                 where = where + " and (t1.tradefield like'%" + whereObject.getString("tradefield") + "%') ";