|
@@ -14,6 +14,8 @@ import common.Controller;
|
|
|
import common.DataFunction;
|
|
|
import common.YosException;
|
|
|
import common.data.*;
|
|
|
+import org.apache.commons.lang.StringUtils;
|
|
|
+import org.apache.poi.util.StringUtil;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.BigInteger;
|
|
@@ -433,20 +435,12 @@ public class OrderItemsHelper extends BaseClass {
|
|
|
if (!customschemeItem.getString("value").equals("spec")) {
|
|
|
// customproperties.add(customschemeItem.getString("description") + ":" + itemRowsMap.get(itemid).get(0).getString(customschemeItem.getString("value")));
|
|
|
} else {
|
|
|
- String material = "选项:" + item.getStringValue("custommaterial");
|
|
|
- String colors = "颜色:" + item.getStringValue("customcolors");
|
|
|
- String cheek = "工艺:" + item.getStringValue("customcheek");
|
|
|
- String size = "尺寸:" + item.getStringValue("length") + "×" + item.getStringValue("width");
|
|
|
- customproperties.add(material + ";" + colors + ";" + cheek + ";" + size);
|
|
|
+ customproperties.add(getcustomproperties(item));
|
|
|
}
|
|
|
|
|
|
}
|
|
|
} else {
|
|
|
- String material = "选项:" + item.getStringValue("custommaterial");
|
|
|
- String colors = "颜色:" + item.getStringValue("customcolors");
|
|
|
- String cheek = "工艺:" + item.getStringValue("customcheek");
|
|
|
- String size = "尺寸:" + item.getStringValue("length") + "×" + item.getStringValue("width");
|
|
|
- customproperties.add(material + ";" + colors + ";" + cheek + ";" + size);
|
|
|
+ customproperties.add(getcustomproperties(item));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -457,6 +451,43 @@ public class OrderItemsHelper extends BaseClass {
|
|
|
return customproperties;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ public String getcustomproperties(JSONObject item) {
|
|
|
+ String material = item.getStringValue("custommaterial");
|
|
|
+ String colors = item.getStringValue("customcolors");
|
|
|
+ String cheek = item.getStringValue("customcheek");
|
|
|
+ String length = item.getStringValue("length", false, "0");
|
|
|
+ String width = item.getStringValue("width", false, "0");
|
|
|
+
|
|
|
+ String str = "";
|
|
|
+ if (!StringUtils.isBlank(material) && !material.equals("0")) {
|
|
|
+ str = "选项:" + material;
|
|
|
+ }
|
|
|
+ if (!StringUtils.isBlank(colors) && !colors.equals("0")) {
|
|
|
+ if (str.isEmpty()) {
|
|
|
+ str = "颜色:" + colors;
|
|
|
+ } else {
|
|
|
+ str = str + ";" + "颜色:" + colors;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if (!StringUtils.isBlank(cheek) && !cheek.equals("0")) {
|
|
|
+ if (str.isEmpty()) {
|
|
|
+ str = "工艺:" + cheek;
|
|
|
+ } else {
|
|
|
+ str = str + ";" + "工艺:" + cheek;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ String size = "尺寸:" + length + "×" + width;
|
|
|
+ if (str.isEmpty()) {
|
|
|
+ str = size;
|
|
|
+ } else {
|
|
|
+ str = str + ";" + size;
|
|
|
+ }
|
|
|
+ return str;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取定制尺寸信息
|
|
|
*
|