Kaynağa Gözat

查询库存添加分页查询报错修复

hu 2 yıl önce
ebeveyn
işleme
49ed5d7996

+ 1 - 0
src/custom/restcontroller/webmanage/sale/dispatch/SQL/发货单明细更新.sql

@@ -4,6 +4,7 @@ SET
     remarks =$remarks$,
     changeuserid = $userid$,
     changeby = $username$,
+    batchno=$batchno$,
     changedate =CURRENT_TIMESTAMP
 WHERE sa_dispatch_itemsid = $sa_dispatch_itemsid$ 
 

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

@@ -163,7 +163,7 @@ public class dispatchItems extends Controller {
                         if (StringUtils.isBlank(iteminfo.getString("batchno"))) {
                             saleFactory.addParameter("batchno", "");
                         } else {
-                            saleFactory.addParameter("batchno", iteminfo.getString("batchno"));
+                            saleFactory.addParameter("batchno", "");
                         }
                     } else {
                         saleFactory.addParameter("batchno", "");
@@ -181,6 +181,7 @@ public class dispatchItems extends Controller {
                 // saleFactory.addParameter("itemno", iteminfo.getString("itemno"));
                 saleFactory.addParameter("qty", iteminfo.getBigDecimal("qty"));
                 saleFactory.addParameter("remarks", iteminfo.getString("remarks"));
+                saleFactory.addParameter("batchno", iteminfo.getString("batchno"));
                 saleFactory.addParameter("userid", userid);
                 saleFactory.addParameter("username", username);
                 saleFactory.addParameter("billno", rowscount.get(0).getString("billno"));

+ 8 - 2
src/custom/restcontroller/webmanage/sale/invbal/SQL/订单明细未发商品列表.sql

@@ -1,4 +1,4 @@
-SELECT distinct t2.itemno,
+SELECT t2.itemno,
        t2.itemid,
        t2.itemname,
        t2.isonsale,
@@ -12,4 +12,10 @@ WHERE t3.STATUS in ('提交','审核')
   and ifnull(t1.undeliqty, 0) !=0
 	AND t1.siteid = $siteid$
 	AND ifnull( t1.isclose, 0 )= 0
-	and ($where$)
+	and ($where$)
+	group by t2.itemno,
+       t2.itemid,
+       t2.itemname,
+       t2.isonsale,
+       t4.unitname,
+       t2.packageqty

+ 2 - 1
src/custom/restcontroller/webmanage/sale/invbal/invbal.java

@@ -146,7 +146,8 @@ public class invbal extends Controller {
 		SQLFactory sqlFactory =new SQLFactory(this,"订单明细未发商品列表", pageSize, pageNumber, pageSorting);
 		sqlFactory.addParameter("siteid", siteid);
 		sqlFactory.addParameter_SQL("where", where);
-		Rows rows = dbConnect.runSqlQuery(sqlFactory);
+
+		Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
 		Rows rowsitemclass = dbConnect.runSqlQuery(" select  t7.itemclassname,t6.itemid,t8.brandname from sa_itemsaleclass t6 LEFT JOIN plm_itemclass t7 ON t7.itemclassid = t6.itemclassid AND t7.siteid = t6.siteid LEFT JOIN sa_brand t8 ON t8.sa_brandid = t7.sa_brandid AND t8.siteid = t7.siteid where t6.siteid='" + siteid + "'");
 		RowsMap itemclassRowsMap = rowsitemclass.toRowsMap("itemid");