|
@@ -413,6 +413,9 @@ public class OrderBaseExcelLogic {
|
|
|
if (StringUtils.isBlank(brandName)) {
|
|
|
brandName = "格力";
|
|
|
}
|
|
|
+ if (StringUtils.isBlank(mainName)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
if (StringUtils.isAnyBlank(mainName, smallName, productNum)) {
|
|
|
throw new RemoteServiceException("第" + (index) + "行 产品大类/产品小类/商品数量 不能为空");
|
|
|
}
|
|
@@ -432,7 +435,12 @@ public class OrderBaseExcelLogic {
|
|
|
|
|
|
PgOrderProduct pgOrderProduct = new PgOrderProduct();
|
|
|
pgOrderProduct.setOrderBaseId(orderBaseId);
|
|
|
- pgOrderProduct.setNum(Integer.parseInt(productNum));
|
|
|
+ try {
|
|
|
+ pgOrderProduct.setNum(Integer.parseInt(productNum));
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new RemoteServiceException("第" + (index) + "行 商品数量填入数字");
|
|
|
+ }
|
|
|
+
|
|
|
pgOrderProduct.setMainId(mainGoodsCategory.getCategoryId());
|
|
|
pgOrderProduct.setMainName(mainName);
|
|
|
pgOrderProduct.setSmallId(smallGoodsCategory.getCategoryId());
|