Explorar el Código

发货单逻辑变更

hu hace 2 años
padre
commit
2f068f0448

+ 2 - 1
src/custom/restcontroller/webmanage/sale/dispatch/SQL/发货商品列表查询.sql

@@ -17,4 +17,5 @@ WHERE t3.STATUS = '审核'
   and ifnull(t1.undeliqty, 0) !=0
 	AND t1.siteid = $siteid$
 	and t3.sys_enterpriseid=$sys_enterpriseid$
-	AND ifnull( t1.isclose, 0 )= 0
+	AND ifnull( t1.isclose, 0 )= 0
+	and $where$

+ 3 - 1
src/custom/restcontroller/webmanage/sale/dispatch/dispatchItems.java

@@ -66,7 +66,6 @@ public class dispatchItems extends Controller {
         /*
          * 过滤条件设置
          */
-        Long sa_orderid = content.getLong("sa_orderid");
         StringBuffer where = new StringBuffer(" 1=1 ");
         if (content.containsKey("where")) {
             JSONObject whereObject = content.getJSONObject("where");
@@ -76,6 +75,9 @@ public class dispatchItems extends Controller {
                 where.append("or t1.itemno like'%").append(whereObject.getString("condition")).append("%' ");
                 where.append(")");
             }
+            if (whereObject.containsKey("sa_orderid") && !"".equals(whereObject.getString("sa_orderid"))) {
+                where.append("  and t1.sa_orderid ='").append(whereObject.getString("sa_orderid")).append("' ");
+            }
         }
         SQLFactory sqlFactory = new SQLFactory(this, "发货商品列表查询", pageSize, pageNumber, pageSorting);
         sqlFactory.addParameter_SQL("where", where);