|
|
@@ -1129,7 +1129,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
*/
|
|
|
private List<GoodsQtyPrice> initQtyPriceByExcel(Row row, boolean isImport, ReleaseProductByBatch aProduct, int rowNum) {
|
|
|
List<GoodsQtyPrice> qtyPriceList = new ArrayList<>();
|
|
|
- Object firstValue = readWorkBookCell(row.getCell(UploadConstant.PRICE_START), Cell.CELL_TYPE_NUMERIC,
|
|
|
+ Object firstValue = readWorkBookCell(row.getCell(UploadConstant.PRICE_START), Cell.CELL_TYPE_STRING,
|
|
|
rowNum, UploadConstant.PRICE_START);
|
|
|
if (isImport) {
|
|
|
firstValue = readWorkBookCell(row.getCell(UploadConstant.PRICE_START), Cell.CELL_TYPE_STRING,
|
|
|
@@ -1145,14 +1145,19 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
if (StringUtils.isEmpty(firstValue)) {
|
|
|
aProduct.addErrmsg(ErrorInfoConstant.PRICE_INFO.getInfo());
|
|
|
} else {
|
|
|
- Double cellPrice = Double.valueOf(firstValue.toString());
|
|
|
- if (validatePrice(cellPrice)) {
|
|
|
- GoodsQtyPrice qtyPrice = getOneQtyPrice(aProduct.getMinBuyQty(), DoubleConstant.maxMinPackageQty,
|
|
|
- cellPrice, aProduct.getRmbTaxRate(), aProduct.getCurrency());
|
|
|
- qtyPriceList.add(qtyPrice);
|
|
|
+ if (RegexConstant.isNumber(firstValue.toString())) {
|
|
|
+ Double cellPrice = Double.valueOf(firstValue.toString());
|
|
|
+ if (validatePrice(cellPrice)) {
|
|
|
+ GoodsQtyPrice qtyPrice = getOneQtyPrice(aProduct.getMinBuyQty(), DoubleConstant.maxMinPackageQty,
|
|
|
+ cellPrice, aProduct.getRmbTaxRate(), aProduct.getCurrency());
|
|
|
+ qtyPriceList.add(qtyPrice);
|
|
|
+ } else {
|
|
|
+ aProduct.addErrmsg(ErrorInfoConstant.PRICE_INFO.getInfo());
|
|
|
+ }
|
|
|
} else {
|
|
|
aProduct.addErrmsg(ErrorInfoConstant.PRICE_INFO.getInfo());
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(qtyPriceList)) {
|