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

2025080511204503支持condition模糊搜索

hxh 1 месяц назад
Родитель
Сommit
e072fad0b8

+ 8 - 0
src/custom/restcontroller/webmanage/sale/accessoryorder/accessoryorder.java

@@ -588,6 +588,14 @@ public class accessoryorder extends Controller {
             where = where + " and DATE_FORMAT(t1.begindate, '%Y-%m-%d') <='" + skudate + "'";
             where = where + " and DATE_FORMAT(t1.enddate, '%Y-%m-%d') >='" + skudate + "'";
         }
+        if (content.containsKey("where")) {
+            JSONObject whereObject = content.getJSONObject("where");
+            if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {
+                where = where + " and (t1.itemno like'%" + whereObject.getString("condition")
+                        + "%' or t1.itemname like'%" + whereObject.getString("condition")
+                        + "%' or t3.model like'%" + whereObject.getString("condition") + "%' ) ";
+            }
+        }
 
         Long sa_orderid = content.getLong("sa_orderid");
         Rows orderRows = getOrderRows(this, sa_orderid);