|
@@ -324,18 +324,32 @@ public class AppFunInfoService extends BaseService<AppFunInfo, String> implement
|
|
|
}else {
|
|
|
//循环每行的每一列
|
|
|
AppFunInfo entity = new AppFunInfo();
|
|
|
- for (int i = 0; i < 8; i++) {
|
|
|
+ boolean isAllEmpty = true;
|
|
|
+ for (int i = 0; i < 8; i++){
|
|
|
Cell cell = r.getCell(i);
|
|
|
if (cell != null){
|
|
|
r.getCell(i).setCellType(Cell.CELL_TYPE_STRING);
|
|
|
}
|
|
|
- checkCellData(cell, i, r.getRowNum());
|
|
|
- checkCellDataValid(cell, i, r.getRowNum(), entity,codeList);
|
|
|
+ if (cell != null && StringUtils.isNotBlank(cell.getStringCellValue())){
|
|
|
+ isAllEmpty = false;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!isAllEmpty){
|
|
|
+ for (int i = 0; i < 8; i++) {
|
|
|
+ Cell cell = r.getCell(i);
|
|
|
+ if (cell != null){
|
|
|
+ r.getCell(i).setCellType(Cell.CELL_TYPE_STRING);
|
|
|
+ }
|
|
|
+ checkCellData(cell, i, r.getRowNum());
|
|
|
+ checkCellDataValid(cell, i, r.getRowNum(), entity,codeList);
|
|
|
+ }
|
|
|
+ entity.setCreateTime(new Date());
|
|
|
+ entity.setModifiedTime(new Date());
|
|
|
+ entity.setCreator(ContextUtils.getUserInfo() == null ? "" : ContextUtils.getUserInfo().getId());
|
|
|
+ result.add(entity);
|
|
|
}
|
|
|
- entity.setCreateTime(new Date());
|
|
|
- entity.setModifiedTime(new Date());
|
|
|
- entity.setCreator(ContextUtils.getUserInfo() == null ? "" : ContextUtils.getUserInfo().getId());
|
|
|
- result.add(entity);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|