Browse Source

处理解析模板文件 size报错的问题。

yujia 7 years ago
parent
commit
e6bb077cc1

+ 8 - 7
src/main/java/com/uas/platform/b2c/prod/commodity/model/ReleaseProductByBatch.java

@@ -290,7 +290,7 @@ public class ReleaseProductByBatch implements Serializable {
 	 * 尺寸(pcb)
 	 */
 	@Column(name = "rel_size")
-	private String size;
+	private String sizePcb;
 
 	/**
 	 * 颜色(pcb)
@@ -837,7 +837,7 @@ public class ReleaseProductByBatch implements Serializable {
 		String str = StringUtilB2C.getStr(value);
 		try {
 			if (!StringUtilB2C.isEmpty(str) && str.getBytes("GBK").length <= 256) {
-				setSize(str);
+				setSizePcb(str);
 			}
 		} catch (UnsupportedEncodingException e) {
 			throw new RuntimeException(e + "指定字符集不支持");
@@ -1793,12 +1793,13 @@ public class ReleaseProductByBatch implements Serializable {
 		return this;
 	}
 
-	public String getSize() {
-		return size;
+	public String getSizePcb() {
+		return sizePcb;
 	}
 
-	public void setSize(String size) {
-		this.size = size;
+	public ReleaseProductByBatch setSizePcb(String sizePcb) {
+		this.sizePcb = sizePcb;
+		return this;
 	}
 
 	public String getColor() {
@@ -1910,7 +1911,7 @@ public class ReleaseProductByBatch implements Serializable {
 				", selfMinDelivery=" + selfMinDelivery +
 				", selfMaxDeliveryStr='" + selfMaxDeliveryStr + '\'' +
 				", selfMinDeliveryStr='" + selfMinDeliveryStr + '\'' +
-				", size='" + size + '\'' +
+				", sizePcb='" + sizePcb + '\'' +
 				", color='" + color + '\'' +
 				", thickCopper='" + thickCopper + '\'' +
 				", thick='" + thick + '\'' +

+ 2 - 2
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java

@@ -1845,8 +1845,8 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 
 				if (isPcb) {
 					List<PCBPropertyValue> propertyValues = new ArrayList<>();
-					if (!StringUtils.isEmpty(releaseProductByBatch.getSize())) {
-						PCBPropertyValue propertyValue = new PCBPropertyValue(sizeProId, releaseProductByBatch.getSize());
+					if (!StringUtils.isEmpty(releaseProductByBatch.getSizePcb())) {
+						PCBPropertyValue propertyValue = new PCBPropertyValue(sizeProId, releaseProductByBatch.getSizePcb());
 						propertyValues.add(propertyValue);
 					}
 					if (!StringUtils.isEmpty(releaseProductByBatch.getColor())) {

BIN
src/main/resources/jxls-tpl/trade/releasePCBByBatchError-rmb.xls


BIN
src/main/resources/jxls-tpl/trade/releasePCBByBatchError-usd.xls