Explorar el Código

Excel 表格为空跳过

lyhzzz hace 2 años
padre
commit
9bfa716e8b

+ 3 - 0
src/main/java/com/fdkankan/manage/service/impl/ExcelServiceImpl.java

@@ -100,6 +100,9 @@ public class ExcelServiceImpl implements IExcelService {
         Integer index = 0;
         for (HashMap<Integer, String> map : excelRowList) {
             index ++;
+            if(map.isEmpty()){
+                continue;
+            }
             if(type == 0){      //入库
                 if(index == 0 && !map.get(0).equals("设备入库模板")){
                     throw new BusinessException(ResultCode.TEMPLATE_TYPE_ERROR);