|
|
@@ -707,7 +707,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
|
|
|
Object specCellObj = readWorkBookCell(headerRow.getCell(UploadConstant.SPECIFICATION), Cell.CELL_TYPE_STRING,
|
|
|
0, UploadConstant.SPECIFICATION);
|
|
|
- if (!"规格".equals(StringUtilB2C.getStr(specCellObj))) {
|
|
|
+ if (!"规格(含参数、封装)".equals(StringUtilB2C.getStr(specCellObj))) {
|
|
|
throw new IllegalOperatorException("您上传的信息列信息不正确,请与模板的列做比较");
|
|
|
}
|
|
|
} else {
|
|
|
@@ -958,12 +958,6 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
private int convertValueToProduct(Row row, ReleaseProductByBatch aProduct, int rowNum, boolean isAPerson) {
|
|
|
// 统计为空的个数
|
|
|
int result = 0;
|
|
|
- Object codeValue = readWorkBookCell(row.getCell(UploadConstant.PRODUCT_CODE), Cell.CELL_TYPE_STRING,
|
|
|
- rowNum, UploadConstant.PRODUCT_CODE);
|
|
|
- if (StringUtils.isEmpty(codeValue)) {
|
|
|
- result += 1;
|
|
|
- }
|
|
|
- aProduct.setCodeByExcel(codeValue);
|
|
|
|
|
|
Object brandValue = readWorkBookCell(row.getCell(UploadConstant.BRAND_ENGLISH), Cell.CELL_TYPE_STRING,
|
|
|
rowNum, UploadConstant.BRAND_ENGLISH);
|
|
|
@@ -972,6 +966,25 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
}
|
|
|
aProduct.setBrandEnByExcel(brandValue);
|
|
|
|
|
|
+ Object kindValue = readWorkBookCell(row.getCell(UploadConstant.KIND), Cell.CELL_TYPE_STRING,
|
|
|
+ rowNum, UploadConstant.KIND);
|
|
|
+ if (StringUtils.isEmpty(kindValue)) {
|
|
|
+ result += 1;
|
|
|
+ }
|
|
|
+ aProduct.setKindByExcel(kindValue);
|
|
|
+
|
|
|
+ Object codeValue = readWorkBookCell(row.getCell(UploadConstant.PRODUCT_CODE), Cell.CELL_TYPE_STRING,
|
|
|
+ rowNum, UploadConstant.PRODUCT_CODE);
|
|
|
+ if (StringUtils.isEmpty(codeValue)) {
|
|
|
+ result += 1;
|
|
|
+ }
|
|
|
+ aProduct.setCodeByExcel(codeValue);
|
|
|
+
|
|
|
+
|
|
|
+ Object specValue = readWorkBookCell(row.getCell(UploadConstant.SPEC), Cell.CELL_TYPE_STRING,
|
|
|
+ rowNum, UploadConstant.SPEC);
|
|
|
+ aProduct.setSpecByExcel(specValue);
|
|
|
+
|
|
|
if (!isAPerson) {
|
|
|
Object breakValue = readWorkBookCell(row.getCell(UploadConstant.BREAK_UP), Cell.CELL_TYPE_STRING,
|
|
|
rowNum, UploadConstant.BREAK_UP);
|
|
|
@@ -1013,10 +1026,6 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
setDeliveryTime(aProduct, minValue, maxValue);
|
|
|
}
|
|
|
|
|
|
- Object specValue = readWorkBookCell(row.getCell(UploadConstant.SPEC), Cell.CELL_TYPE_STRING,
|
|
|
- rowNum, UploadConstant.SPEC);
|
|
|
- aProduct.setSpecByExcel(specValue);
|
|
|
-
|
|
|
Object packageNumValue = readWorkBookCell(row.getCell(UploadConstant.PACKAGE_NUMBER), Cell.CELL_TYPE_STRING,
|
|
|
rowNum, UploadConstant.PACKAGE_NUMBER);
|
|
|
aProduct.setMinPackageByExcel(packageNumValue);
|