|
|
@@ -38,7 +38,7 @@ public class ReleaseProductByBatch implements Serializable {
|
|
|
/**
|
|
|
* 可用包装方式列表
|
|
|
*/
|
|
|
- public static final List<String> PACKAGING_LIST;
|
|
|
+ private static final List<String> PACKAGING_LIST;
|
|
|
|
|
|
static {
|
|
|
String[] array = {"Bulk-散装", "Reel-卷装", "Tape/Reel-编带", "Tray-盘装",
|
|
|
@@ -588,14 +588,17 @@ public class ReleaseProductByBatch implements Serializable {
|
|
|
setProductDate(productData);
|
|
|
}
|
|
|
|
|
|
- public void setPackagingByExcel(Object value ,boolean isAPerson) {
|
|
|
+ public void setPackagingByExcel(Object value, boolean isAPerson) {
|
|
|
if (!StringUtils.isEmpty(value)) {
|
|
|
String packaging = value.toString();
|
|
|
if (!isAPerson) {
|
|
|
- Matcher matcher = chineseAndEnglishPattern.matcher(packaging);
|
|
|
- if (!matcher.find()) {
|
|
|
- addErrmsg(ErrorInfoConstant.PACKAGE_METHOD_INFO.getInfo());
|
|
|
+ if (!PACKAGING_LIST.contains(packaging)) {
|
|
|
+ addErrmsg(ErrorInfoConstant.PACKAGE_NOT_EXIST_INFO.getInfo());
|
|
|
}
|
|
|
+// Matcher matcher = chineseAndEnglishPattern.matcher(packaging);
|
|
|
+// if (!matcher.find()) {
|
|
|
+// addErrmsg(ErrorInfoConstant.PACKAGE_METHOD_INFO.getInfo());
|
|
|
+// }
|
|
|
}
|
|
|
} else {
|
|
|
if (!isAPerson) {
|
|
|
@@ -605,13 +608,7 @@ public class ReleaseProductByBatch implements Serializable {
|
|
|
}
|
|
|
}
|
|
|
String packagingData = StringUtilB2C.replaceLineBreak(StringUtilB2C.getStr(value));
|
|
|
- if (!isAPerson) {
|
|
|
- try {
|
|
|
- packagingData = com.uas.platform.b2c.fa.payment.utils.StringUtils.cutOutString(packagingData, 10);
|
|
|
- } catch (UnsupportedEncodingException e) {
|
|
|
- throw new RuntimeException(e + "指定字符集不支持");
|
|
|
- }
|
|
|
- } else {
|
|
|
+ if (isAPerson) {
|
|
|
try {
|
|
|
packagingData = com.uas.platform.b2c.fa.payment.utils.StringUtils.cutOutString(packagingData, 150);
|
|
|
} catch (UnsupportedEncodingException e) {
|