|
|
@@ -127,6 +127,36 @@ public class OrderItemsHelper extends BaseClass {
|
|
|
return customproperties;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取定制尺寸信息
|
|
|
+ *
|
|
|
+ * @param itemRowsMap
|
|
|
+ * @param item
|
|
|
+ * @return
|
|
|
+ * @throws YosException
|
|
|
+ */
|
|
|
+ public String getCustomSpec(RowsMap itemRowsMap, JSONObject item) throws YosException {
|
|
|
+
|
|
|
+ String spec="";
|
|
|
+ Rows customschemeRows = dbConnect.runSqlQuery("select * from sa_customscheme_items where siteid='" + controller.siteid + "'");
|
|
|
+ RowsMap customschemeRowsMap = customschemeRows.toRowsMap("sa_customschemeid");
|
|
|
+
|
|
|
+ String itemid = item.getString("itemid");
|
|
|
+ if (itemRowsMap.containsKey(itemid)) {
|
|
|
+ if (itemRowsMap.get(itemid).isNotEmpty()) {
|
|
|
+ if (!itemRowsMap.get(itemid).get(0).getBoolean("iscustomsize")) {
|
|
|
+ spec=itemRowsMap.get(itemid).get(0).getString("spec");
|
|
|
+ } else {
|
|
|
+ spec=item.getStringValue("length") + "*" + item.getStringValue("width");
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return spec;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 批量查询商品信息
|
|
|
*
|
|
|
@@ -165,7 +195,7 @@ public class OrderItemsHelper extends BaseClass {
|
|
|
|
|
|
String sa_orderitems = "sa_orderitems";
|
|
|
|
|
|
- public InsertSQL getInsertSQL(JSONArray customproperties, long sa_orderitemsid, JSONObject item, Row itemRow, String type, BigDecimal defaultprice, BigDecimal price,BigDecimal saleprice, BigDecimal marketprice) throws YosException {
|
|
|
+ public InsertSQL getInsertSQL(JSONArray customproperties, long sa_orderitemsid, JSONObject item, Row itemRow, String type, BigDecimal defaultprice, BigDecimal price,BigDecimal saleprice, BigDecimal marketprice,String spec) throws YosException {
|
|
|
Long itemid = item.getLong("itemid");
|
|
|
BigDecimal qty = item.getBigDecimalValue("qty");
|
|
|
|
|
|
@@ -186,6 +216,7 @@ public class OrderItemsHelper extends BaseClass {
|
|
|
insertSQL.setValue("stockno", item.getOrDefault("stockno", "null"));
|
|
|
insertSQL.setValue("position", item.getOrDefault("position", "null"));
|
|
|
insertSQL.setValue("batchno", item.getOrDefault("batchno", "null"));
|
|
|
+ insertSQL.setValue("spec",spec);
|
|
|
|
|
|
String deliverydate = item.getStringValue("deliverydate");
|
|
|
Rows rows = dbConnect.runSqlQuery("SELECT deliverydate,defaultprice from sa_orderitems WHERE sa_orderitemsid =" + sa_orderitemsid);
|