hu hace 2 años
padre
commit
a0f6379960

+ 2 - 2
src/custom/restcontroller/webmanage/sale/dispatch/SQL/发货单明细新增.sql

@@ -1,6 +1,6 @@
 insert into sa_dispatch_items (siteid, sa_dispatch_itemsid, sa_dispatchid, rowno, sa_orderitemsid, itemid, qty,
                                batchcontrol, batchno, remarks, createuserid, createby, createdate, changeuserid,
-                               changeby, changedate, billno)
+                               changeby, changedate, billno,outwarehouseqty)
 values ($siteid$, $sa_dispatch_itemsid$, $sa_dispatchid$, $rowno$, $sa_orderitemsid$, $itemid$, $qty$, $batchcontrol$,
         $batchno$, $remarks$, $userid$, $username$, CURRENT_TIMESTAMP, $userid$, $username$, CURRENT_TIMESTAMP,
-        $billno$);
+        $billno$,0);

+ 5 - 1
src/custom/restcontroller/webmanage/sale/item/Item.java

@@ -92,7 +92,11 @@ public class Item extends Controller {
                 }
             }
         }
-
+        if(content.getBooleanValue("iscustomsize")){
+            if(content.getLongValue("widthschemeid")<=0 || content.getLongValue("lengthschemeid")<=0){
+                return getErrReturnObject().setErrMsg("定制商品长度定制方案及宽度定制方案必选").toString();
+            }
+        }
         sqlFactory.addParameter("siteid", siteid);
         sqlFactory.addParameter("itemid", itemid);
         sqlFactory.addParameter("username", username);

+ 2 - 2
src/custom/restcontroller/webmanage/sale/order/OrderItems.java

@@ -727,9 +727,9 @@ public class OrderItems extends Controller {
 
                 String isuncheckout = whereObject.getStringValue("isuncheckout");
                 if (isuncheckout.equals("1")) {
-                    where.append(" and t1.sa_orderitemsid in (select t1.sa_orderitemsid from sa_orderitems t1 inner join (select t2.sa_orderitemsid,t2.siteid,sum(outwarehouseqty) sumoutwarehouseqty from sa_dispatch_items t2 inner join sa_dispatch t3 on t2.sa_dispatchid=t3.sa_dispatchid and t2.siteid=t3.siteid GROUP BY sa_orderitemsid,siteid) t2 on t1.sa_orderitemsid=t2.sa_orderitemsid and t1.siteid=t2.siteid where t1.qty>t2.sumoutwarehouseqty or t1.undeliqty>0)");
+                    where.append(" and t1.sa_orderitemsid in (select t1.sa_orderitemsid from sa_orderitems t1 inner join (select t2.sa_orderitemsid,t2.siteid,sum(outwarehouseqty) sumoutwarehouseqty from sa_dispatch_items t2 inner join sa_dispatch t3 on t2.sa_dispatchid=t3.sa_dispatchid and t2.siteid=t3.siteid GROUP BY sa_orderitemsid,siteid) t2 on t1.sa_orderitemsid=t2.sa_orderitemsid and t1.siteid=t2.siteid where t1.qty>ifnull(t2.sumoutwarehouseqty,0) or t1.undeliqty>0)");
                 } else {
-                    where.append(" and t1.sa_orderitemsid not in (select t1.sa_orderitemsid from sa_orderitems t1 inner join (select t2.sa_orderitemsid,t2.siteid,sum(outwarehouseqty) sumoutwarehouseqty from sa_dispatch_items t2 inner join sa_dispatch t3 on t2.sa_dispatchid=t3.sa_dispatchid and t2.siteid=t3.siteid GROUP BY sa_orderitemsid,siteid) t2 on t1.sa_orderitemsid=t2.sa_orderitemsid and t1.siteid=t2.siteid where t1.qty>t2.sumoutwarehouseqty or t1.undeliqty>0)");
+                    where.append(" and t1.sa_orderitemsid not in (select t1.sa_orderitemsid from sa_orderitems t1 inner join (select t2.sa_orderitemsid,t2.siteid,sum(outwarehouseqty) sumoutwarehouseqty from sa_dispatch_items t2 inner join sa_dispatch t3 on t2.sa_dispatchid=t3.sa_dispatchid and t2.siteid=t3.siteid GROUP BY sa_orderitemsid,siteid) t2 on t1.sa_orderitemsid=t2.sa_orderitemsid and t1.siteid=t2.siteid where t1.qty>ifnull(t2.sumoutwarehouseqty,0) or t1.undeliqty>0)");
                 }
             }
             if (whereObject.containsKey("iscancel") && !"".equals(whereObject.getString("iscancel"))) {