Kaynağa Gözat

发货单添加商品时过滤

hu 2 yıl önce
ebeveyn
işleme
b21adfbca2

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

@@ -18,4 +18,5 @@ WHERE t3.STATUS = '审核'
 	AND t1.siteid = $siteid$
 	and t3.sys_enterpriseid=$sys_enterpriseid$
 	AND ifnull( t1.isclose, 0 )= 0
+	and t1.sa_orderitemsid not in (select sa_orderitemsid from sa_dispatch_items where sa_dispatchid=$sa_dispatchid$)
 	and $where$

+ 2 - 0
src/custom/restcontroller/webmanage/sale/dispatch/dispatchItems.java

@@ -87,7 +87,9 @@ public class dispatchItems extends Controller {
         SQLFactory sqlFactory = new SQLFactory(this, "发货商品列表查询", pageSize, pageNumber, pageSorting);
         sqlFactory.addParameter_SQL("where", where);
         sqlFactory.addParameter("sys_enterpriseid", content.getLongValue("sys_enterpriseid"));
+        sqlFactory.addParameter("sa_dispatchid", content.getLongValue("sa_dispatchid"));
         sqlFactory.addParameter("siteid", siteid);
+
         Rows rows = dbConnect.runSqlQuery(sqlFactory);
 
         return getSucReturnObject().setData(rows).toString();