|
|
@@ -152,22 +152,33 @@ public class BaseInfoServiceImpl implements BaseInfoService {
|
|
|
// 最小包装量
|
|
|
if (row.getCell(5) != null) {
|
|
|
row.getCell(5).setCellType(Cell.CELL_TYPE_STRING);
|
|
|
- product.setMinPack(Float.valueOf(row.getCell(5).getStringCellValue()));
|
|
|
+ if (null != row.getCell(5).getStringCellValue()) {
|
|
|
+ product.setMinPack(Float.valueOf(row.getCell(5).getStringCellValue()));
|
|
|
+ }
|
|
|
}
|
|
|
// 最小订购量
|
|
|
if (row.getCell(6) != null) {
|
|
|
row.getCell(6).setCellType(Cell.CELL_TYPE_STRING);
|
|
|
- product.setMinOrder(Float.valueOf(row.getCell(6).getStringCellValue()));
|
|
|
+ if (null != row.getCell(6).getStringCellValue().trim()
|
|
|
+ && !row.getCell(6).getStringCellValue().trim().equals("")) {
|
|
|
+ product.setMinOrder(Float.valueOf(row.getCell(6).getStringCellValue()));
|
|
|
+ }
|
|
|
}
|
|
|
// 交货周期
|
|
|
if (row.getCell(7) != null) {
|
|
|
row.getCell(7).setCellType(Cell.CELL_TYPE_STRING);
|
|
|
- product.setLeadtime(Float.valueOf(row.getCell(7).getStringCellValue()));
|
|
|
+ if (null != row.getCell(7).getStringCellValue().trim()
|
|
|
+ && !row.getCell(7).getStringCellValue().trim().equals("")) {
|
|
|
+ product.setLeadtime(Float.valueOf(row.getCell(7).getStringCellValue()));
|
|
|
+ }
|
|
|
}
|
|
|
// 交货提前期
|
|
|
if (row.getCell(8) != null) {
|
|
|
row.getCell(8).setCellType(Cell.CELL_TYPE_STRING);
|
|
|
- product.setLtinstock(Float.valueOf(row.getCell(8).getStringCellValue()));
|
|
|
+ if (null != row.getCell(8).getStringCellValue().trim()
|
|
|
+ && !row.getCell(8).getStringCellValue().trim().equals("")) {
|
|
|
+ product.setLtinstock(Float.valueOf(row.getCell(8).getStringCellValue()));
|
|
|
+ }
|
|
|
}
|
|
|
// 判断是否存在
|
|
|
List<Product> prods = productDao.findByEnUUAndCode(SystemSession.getUser().getEnterprise().getUu(),
|