|
@@ -251,13 +251,6 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
|
|
for (int i = 0; i < cellNum; i++) {
|
|
|
String modelName = modelNameList.get(i);
|
|
|
XSSFCell cell = row.getCell(i);
|
|
|
-// if(cell!=null){
|
|
|
-// switch (item.getString("type")){
|
|
|
-// case "time":cell.setCellType(CellType.NUMERIC);
|
|
|
-// break;
|
|
|
-// default:cell.setCellType(CellType.STRING);
|
|
|
-// }
|
|
|
-// }
|
|
|
if(modelName.equals("inchargerId")){
|
|
|
if(!StringUtils.isEmpty(cell.getStringCellValue())){
|
|
|
userNameList.add(cell.getStringCellValue());
|
|
@@ -297,13 +290,14 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
|
|
String getter="get"+className;
|
|
|
String setter="set"+className;
|
|
|
XSSFCell cell = row.getCell(i);
|
|
|
-// if(cell!=null){
|
|
|
-// switch (item.getString("type")){
|
|
|
+ if(cell!=null){
|
|
|
+ switch (item.getString("type")){
|
|
|
// case "time":cell.setCellType(CellType.NUMERIC);
|
|
|
// break;
|
|
|
-// default:cell.setCellType(CellType.STRING);
|
|
|
-// }
|
|
|
-// }
|
|
|
+ //默认读取所有数据都是文本格式
|
|
|
+ default:cell.setCellType(CellType.STRING);
|
|
|
+ }
|
|
|
+ }
|
|
|
//校验当前列是否为必填
|
|
|
JSONObject options = item.getJSONObject("options");
|
|
|
JSONObject rules = options.getJSONObject("rules");
|