Przeglądaj źródła

订单提交bug修复

eganwu 1 rok temu
rodzic
commit
9abe1732a7

+ 4 - 4
src/custom/restcontroller/webmanage/sale/order/OrderItemsHelper.java

@@ -49,15 +49,15 @@ public class OrderItemsHelper extends BaseClass {
                 + sa_orderid + " and t1.siteid='" + controller.siteid + "' and t2.isonsale!=1");
         if (iteminfos.isNotEmpty()) {
             Row itemRow = dbConnect.runSqlQuery(0, "SELECT itemno from plm_item WHERE itemid=" + iteminfos.get(0).getString("itemid"));
-            new YosException(false, "检测到品号" + itemRow.getString("itemno") + "未上架,请删除后重试");
+            throw new YosException(false, "检测到品号" + itemRow.getString("itemno") + "未上架,请删除后重试");
         }
     }
 
-    public void checkOffOrderItems( String tablename,Long itemid) throws YosException {
-        Rows iteminfos = dbConnect.runSqlQuery("select t1.itemid from "+tablename+" t1  where t1.siteid='" + controller.siteid + "' and t1.isonsale!=1 and t1.itemid="+itemid);
+    public void checkOffOrderItems(String tablename, Long itemid) throws YosException {
+        Rows iteminfos = dbConnect.runSqlQuery("select t1.itemid from " + tablename + " t1  where t1.siteid='" + controller.siteid + "' and t1.isonsale!=1 and t1.itemid=" + itemid);
         if (iteminfos.isNotEmpty()) {
             Row itemRow = dbConnect.runSqlQuery(0, "SELECT itemno from plm_item WHERE itemid=" + iteminfos.get(0).getString("itemid"));
-            new YosException(false, "检测到品号" + itemRow.getString("itemno") + "未上架,请删除后重试");
+            throw new YosException(false, "检测到品号" + itemRow.getString("itemno") + "未上架,请删除后重试");
         }
     }