| | |
| | | ReadExcelOption reo = new ReadExcelOption(); |
| | | reo.setReadAllSheet(true); |
| | | List<SheetDataSet> sheetDataSetList = ExcelUtil.readDataObjectFromExcel(file,null,reo); |
| | | if (sheetDataSetList.size() > LIMIT + 1) { |
| | | throw new VciBaseException("为了保证系统的稳定性,请一次不要导入超过1万条的数据"); |
| | | if (sheetDataSetList.get(0).getRowData().size() > LIMIT + 1) { |
| | | throw new ServiceException("为了保证系统的稳定性,请一次不要导入超过1万条的数据"); |
| | | } |
| | | if (sheetDataSetList.get(0).getRowData().size() == 0) { |
| | | throw new ServiceException("未读取到excle相关数据,请确认!!!"); |
| | | } |
| | | boolean isExport=false; |
| | | Map<String,List<WriteExcelData>> shetNameMap=new HashMap<>(); |
| | |
| | | codeAllCodeService.updateBatchById(codeAllCodes); |
| | | } catch (Throwable e) { |
| | | log.error("批量产生编码的时候出错了", e); |
| | | // thisCbos.stream().forEach(cbo -> { |
| | | // String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); |
| | | errorMap.put(sheetRowData.getRowIndex(), ";系统错误,存储数据的时候出错了:"+e.getMessage()); |
| | | // }); |
| | | } |
| | | } |
| | | |
| | | if (errorMap.size() > 0) { |
| | | isExport = true; |
| | | } |