Browse Source

新增厚度定制方案字段

hxh 2 weeks ago
parent
commit
dd4d59fe0f

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

@@ -89,12 +89,16 @@ public class OrderItems extends Controller {
             Row itemRow = getItemRow(itemid);
             Row itemRow = getItemRow(itemid);
             long width = itemRow.getLong("width");
             long width = itemRow.getLong("width");
             long length = itemRow.getLong("length");
             long length = itemRow.getLong("length");
+            long height = itemRow.getLong("height");
             if (item.containsKey("width")) {
             if (item.containsKey("width")) {
                 width = Long.parseLong(item.getString("width"));
                 width = Long.parseLong(item.getString("width"));
             }
             }
             if (item.containsKey("length")) {
             if (item.containsKey("length")) {
                 length = Long.parseLong(item.getString("length"));
                 length = Long.parseLong(item.getString("length"));
             }
             }
+            if (item.containsKey("height")) {
+                height = Long.parseLong(item.getString("height"));
+            }
 
 
 
 
             if (sa_promotionid > 0 && dbConnect.runSqlQuery("SELECT 1 from sa_promotion_items WHERE  islimit=1 and groupqty <= saledqty  and  sa_promotion_itemsid=" + item.getLong("sa_promotion_itemsid") + " and siteid='" + siteid + "' and sa_promotionid='" + sa_promotionid + "'").isNotEmpty()) {
             if (sa_promotionid > 0 && dbConnect.runSqlQuery("SELECT 1 from sa_promotion_items WHERE  islimit=1 and groupqty <= saledqty  and  sa_promotion_itemsid=" + item.getLong("sa_promotion_itemsid") + " and siteid='" + siteid + "' and sa_promotionid='" + sa_promotionid + "'").isNotEmpty()) {
@@ -167,9 +171,9 @@ public class OrderItems extends Controller {
                 return getErrReturnObject().setErrMsg("价格不可小于0").toString();
                 return getErrReturnObject().setErrMsg("价格不可小于0").toString();
             }
             }
             if (isInsert) {
             if (isInsert) {
-                sqlList.add(orderItemsHelper.getInsertSQL(customproperties, sa_orderitemsid, item, itemRow, type, defaultprice, price, saleprice, itemPrice.getMarketprice(), spec, promotionitems, width, length).getSQL());
+                sqlList.add(orderItemsHelper.getInsertSQL(customproperties, sa_orderitemsid, item, itemRow, type, defaultprice, price, saleprice, itemPrice.getMarketprice(), spec, promotionitems, width, length,height).getSQL());
             } else {
             } else {
-                sqlList.add(orderItemsHelper.getUpdateSQL(sa_orderitemsid, item, itemRow, type, defaultprice, price, saleprice, width, length).getSQL());
+                sqlList.add(orderItemsHelper.getUpdateSQL(sa_orderitemsid, item, itemRow, type, defaultprice, price, saleprice, width, length,height).getSQL());
             }
             }
 
 
 
 

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

@@ -595,7 +595,7 @@ public class OrderItemsHelper extends BaseClass {
 
 
     public InsertSQL getInsertSQL(JSONArray customproperties, long sa_orderitemsid, JSONObject item, Row itemRow, String type,
     public InsertSQL getInsertSQL(JSONArray customproperties, long sa_orderitemsid, JSONObject item, Row itemRow, String type,
                                   BigDecimal defaultprice, BigDecimal price, BigDecimal saleprice, BigDecimal marketprice,
                                   BigDecimal defaultprice, BigDecimal price, BigDecimal saleprice, BigDecimal marketprice,
-                                  String spec, Rows promotionitems,long width,long length) throws YosException {
+                                  String spec, Rows promotionitems,long width,long length,long height) throws YosException {
         Long itemid = item.getLong("itemid");
         Long itemid = item.getLong("itemid");
         BigDecimal qty = item.getBigDecimalValue("qty");
         BigDecimal qty = item.getBigDecimalValue("qty");
         RowsMap promotionitemsRowsMap = promotionitems.toRowsMap("sa_promotion_itemsid");
         RowsMap promotionitemsRowsMap = promotionitems.toRowsMap("sa_promotion_itemsid");
@@ -688,10 +688,12 @@ public class OrderItemsHelper extends BaseClass {
 
 
         insertSQL.setValue("length", length);
         insertSQL.setValue("length", length);
 
 
+        insertSQL.setValue("height", height);
+
         return insertSQL;
         return insertSQL;
     }
     }
 
 
-    public UpdateSQL getUpdateSQL(long sa_orderitemsid, JSONObject item, Row itemRow, String type, BigDecimal defaultprice, BigDecimal price, BigDecimal saleprice,long width,long length) throws YosException {
+    public UpdateSQL getUpdateSQL(long sa_orderitemsid, JSONObject item, Row itemRow, String type, BigDecimal defaultprice, BigDecimal price, BigDecimal saleprice,long width,long length,long height) throws YosException {
         BigDecimal qty = item.getBigDecimalValue("qty");
         BigDecimal qty = item.getBigDecimalValue("qty");
 
 
         UpdateSQL updateSQL = SQLFactory.createUpdateSQL(controller, sa_orderitems);
         UpdateSQL updateSQL = SQLFactory.createUpdateSQL(controller, sa_orderitems);
@@ -758,6 +760,8 @@ public class OrderItemsHelper extends BaseClass {
 
 
         updateSQL.setValue("length", length);
         updateSQL.setValue("length", length);
 
 
+        updateSQL.setValue("height", height);
+
         updateSQL.setWhere("siteid", controller.siteid);
         updateSQL.setWhere("siteid", controller.siteid);
         updateSQL.setWhere("sa_orderitemsid", sa_orderitemsid);
         updateSQL.setWhere("sa_orderitemsid", sa_orderitemsid);