Pārlūkot izejas kodu

Merge branch 'develop-green' into develop2

hu 9 mēneši atpakaļ
vecāks
revīzija
c2923a138c

+ 3 - 0
src/custom/restcontroller/sale/cashbill/SQL/资金流水账查询.sql

@@ -8,6 +8,9 @@ select t1.billno,
        ifnull(t1.balance,0) balance,
        t1.remarks,
        t1.source,
+       t1.sourcenote,
+       t1.ownerid,
+       t1.ownertable,
        t1.createby,
        t1.createdate,
        t1.checkby,

+ 7 - 0
src/custom/restcontroller/webmanage/sale/dispatch/SQL/查询营销类别下的商品.sql

@@ -0,0 +1,7 @@
+SELECT t2.itemid
+FROM  plm_item t2
+         LEFT JOIN sa_itemsaleclass t4 ON t2.itemid = t4.itemid
+    AND t2.siteid = t4.siteid
+         LEFT JOIN plm_itemclass t5 ON t5.itemclassid = t4.itemclassid
+    AND t5.siteid = t4.siteid
+where t5.itemclassid in $itemclassid$ and t2.siteid=$siteid$

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

@@ -2,6 +2,7 @@ package restcontroller.webmanage.sale.dispatch;
 
 import beans.data.BatchDeleteErr;
 import beans.dispatch.Dispatch;
+import beans.itemclass.ItemClass;
 import beans.parameter.Parameter;
 import beans.salearea.SaleArea;
 import com.alibaba.fastjson.JSONArray;
@@ -438,6 +439,16 @@ public class dispatchItems extends Controller {
                     where.append(" and t1.sa_dispatchid in(SELECT sa_dispatchid FROM (SELECT sum(outwarehouseqty) outwarehouseqty,sa_dispatchid FROM sa_dispatch_items WHERE siteid='"+siteid+"' GROUP BY sa_dispatchid) a WHERE a.outwarehouseqty=0)");
                 }
             }
+            if (whereObject.containsKey("itemclassid") && !"".equals(whereObject.getString("itemclassid"))) {
+
+                ArrayList<Long> list = ItemClass.getSubItemClassIds(this, whereObject.getLong("itemclassid"));
+                list.add(whereObject.getLong("itemclassid"));
+
+                SQLFactory sqlFactory = new SQLFactory(this, "查询营销类别下的商品");
+                sqlFactory.addParameter("siteid",siteid);
+                sqlFactory.addParameter_in("itemclassid", list);
+                where.append(" and t2.itemid in (").append(sqlFactory.getSQL()).append(") ");
+            }
         }
         boolean isExport = content.getBooleanValue("isExport");
 //        SQLFactory sqlFactory = new SQLFactory(this, "发货单明细所有列表查询", pageSize, pageNumber, pageSorting);