From 0e425d8ebc7d43a6cf509af7eba9d6de5305d588 Mon Sep 17 00:00:00 2001 From: liyawei Date: Wed, 6 Apr 2022 00:21:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=A1=E6=AC=BE=E5=AF=BC=E5=85=A5bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IBussDocumentLibraryEOService.java | 2 + .../BussDocumentLibraryEOServiceImpl.java | 1 + .../impl/FileSplitItemsEOServiceImpl.java | 487 ++++++++++-------- 3 files changed, 267 insertions(+), 223 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/IBussDocumentLibraryEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/IBussDocumentLibraryEOService.java index 75ca620c7..a41a7923c 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/IBussDocumentLibraryEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/IBussDocumentLibraryEOService.java @@ -194,4 +194,6 @@ public interface IBussDocumentLibraryEOService extends IService ids); List> queryListByIds(String ids); + + List> getListBySerialNumber(String serialNumbers); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java index b327b3235..36cf29387 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java @@ -4062,6 +4062,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl> getListBySerialNumber(String serialNumbers) { return bussDocumentLibraryEOMapper.getListBySerialNumber(serialNumbers); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java index c8792c886..a8506783c 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java @@ -59,6 +59,7 @@ import org.apache.http.entity.ContentType; import org.apache.poi.common.usermodel.HyperlinkType; import org.apache.poi.hssf.usermodel.*; import org.apache.poi.hssf.util.HSSFColor; +import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.xssf.usermodel.XSSFCellStyle; @@ -201,14 +202,14 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl itemValIds = new ArrayList<>(); //删除VAL表前台删掉的条目信息 if (com.jero.modules.system.util.StringUtils.isNotEmpty(delIds)) { @@ -458,8 +459,8 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl splitItemsMap : getMenuList) { SarFileSplitMenuEO sarMenuEO = new SarFileSplitMenuEO(); - sarMenuEO.setId(splitItemsMap.get("menu_id").toString()); + sarMenuEO.setId((String)splitItemsMap.get("menu_id")); List list = sarFileSplitMenuEOMapper.queryByPidExcpetSelf(sarMenuEO); if(list != null && !list.isEmpty()){ // String menuNameStr = list.stream().map(SarFileSplitMenuEO :: getName).collect(Collectors.joining(";")); @@ -756,7 +757,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl newItemMap = firstItemMap; - String newItemId = firstItemMap.get("id").toString(); + String newItemId = (String) firstItemMap.get("id"); for (OnlCgformField onlCgformField : formFieldList){ StringBuilder conditionSb = new StringBuilder(); String fieldType = onlCgformField.getFieldShowType(); @@ -809,7 +810,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl { - if(StringUtils.isNotBlank(item.get(dbFieldName).toString())) { + if(StringUtils.isNotBlank((String)item.get(dbFieldName))) { con.append(",").append(item.get(dbFieldName).toString()); } }); // 合并 @@ -823,14 +824,14 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl oldItemMap : oldItemMapList){ - if(StringUtils.isNotBlank(oldItemMap.get(dbFieldName).toString())){ + if(StringUtils.isNotBlank((String)oldItemMap.get(dbFieldName))){ connectIds += oldItemMap.get(dbFieldName).toString(); } } if(connectIds != null){ List ossFileList = ossFileService.getFileInfosByConnectId(connectIds); ossFileList.forEach(file->{ - file.setConnectId(firstItemMap.get(dbFieldName).toString()); + file.setConnectId((String)firstItemMap.get(dbFieldName)); }); ossFileService.updateFileInfo(ossFileList); } @@ -916,7 +917,8 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl importSplitItemsData(List> list, - String menuId, String filepath, + String menuId, + String filepath, String infoId, String cut, List getSheetTableList) { @@ -955,6 +957,9 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl oldItems = addItemsEOList.get(addItemsEOList.size()-1); if (itemNum > 0 && importDto.get("items_num").equals(oldItems.get("items_num")) && importDto.get("items_name").equals(oldItems.get("items_name"))) { + if(ObjectUtil.isEmpty(importDto.get("iterms_conditions"))){ + continue; + } addItemValList = (List) oldItems.get("itemValEOList"); String itemContent = oldItems.get("iterms_conditions").toString() + importDto.get("iterms_conditions").toString(); oldItems.put("iterms_conditions", itemContent); @@ -1002,9 +1007,58 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl 0) { + for (int i = 0; i < valArr.length; i++) { + SarFileSplitItemsValEO valEO = new SarFileSplitItemsValEO(); + boolean isText = true; + if (getSheetTableList != null && !getSheetTableList.isEmpty()) { + for (SplitTableInfo splitTableInfo : getSheetTableList) { + if (splitTableInfo.getTableName().equals(valArr[i])) { + isText = false; + valEO.setType("TABLE"); + valEO.setItemContent(splitTableInfo.getTableHtml()); + } + } + } + List nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i]); + if (nowfilelist != null && !nowfilelist.isEmpty()) { + String url = nowfilelist.get(0).getPath(); + MultipartFile multipartFile = createMfileByPath(url); + String state = "0"; + String fileSuffix = url.substring(url.lastIndexOf(".")); + String fileTypeStr = ".doc,.DOC,.docx,.DOCX,.xls, .XLS,.xlsx,.XLSX,.pdf,.PDF"; + if (fileTypeStr.contains(fileSuffix)) { + state = "1"; + } + OSSFile oSSFile = ossFileService.uploadLocal(multipartFile, "", state); + if (oSSFile != null) { + oSSFile = ossFileService.getById(oSSFile.getId()); + isText = false; + String path = imgpath + oSSFile.getUrl().substring(oSSFile.getUrl().lastIndexOf("/")); + String imgCon = ""; + valEO.setType("IMG"); +// valEO.setItemContent(imgCon); + valEO.setItemContent(path); + } + } + if (isText) { + valEO.setType("TEXT"); + valEO.setItemContent(valArr[i]); + } + addItemValList.add(valEO); + } + } + importDto.put("itemValEOList", addItemValList); + } + addItemsEOList.add(importDto); + } + } else { + if(ObjectUtil.isNotEmpty(importDto.get("iterms_conditions"))) { String[] valArr = importDto.get("iterms_conditions").toString().split("\n"); if (valArr != null && valArr.length > 0) { - for (int i=0;i nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i]); if (nowfilelist != null && !nowfilelist.isEmpty()) { - String url = nowfilelist.get(0).getPath(); - MultipartFile multipartFile = createMfileByPath(url); - String state = "0"; - String fileSuffix = url.substring(url.lastIndexOf(".")); - String fileTypeStr = ".doc,.DOC,.docx,.DOCX,.xls, .XLS,.xlsx,.XLSX,.pdf,.PDF"; - if (fileTypeStr.contains(fileSuffix)) { - state = "1"; - } - OSSFile oSSFile = ossFileService.uploadLocal(multipartFile, "",state); - if(oSSFile!=null){ - oSSFile = ossFileService.getById(oSSFile.getId()); + OSSFile oSSFile = ossFileService.uploadLocal((MultipartFile) nowfilelist.get(0), "", "1"); + if (oSSFile != null) { isText = false; String path = imgpath + oSSFile.getUrl().substring(oSSFile.getUrl().lastIndexOf("/")); String imgCon = ""; valEO.setType("IMG"); -// valEO.setItemContent(imgCon); +// valEO.setItemContent(imgCon); valEO.setItemContent(path); } } @@ -1045,43 +1090,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl 0) { - for (int i=0;i nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i]); - if (nowfilelist != null && !nowfilelist.isEmpty()) { - OSSFile oSSFile = ossFileService.uploadLocal((MultipartFile) nowfilelist.get(0), "","1"); - if(oSSFile!=null){ - isText = false; - String path = imgpath + oSSFile.getUrl().substring(oSSFile.getUrl().lastIndexOf("/")); - String imgCon = ""; - valEO.setType("IMG"); -// valEO.setItemContent(imgCon); - valEO.setItemContent(path); - } - } - if (isText) { - valEO.setType("TEXT"); - valEO.setItemContent(valArr[i]); - } - addItemValList.add(valEO); - } - } - importDto.put("itemValEOList", addItemValList); addItemsEOList.add(importDto); } itemNum++; @@ -1162,7 +1171,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl itemsEO : addItemsEOList) { if(menuAndItemMap.get(itemsEO.get("id")) != null) { - createItemsInfo(itemsEO, menuAndItemMap.get(itemsEO.get("id").toString()), infoId); + createItemsInfo(itemsEO, menuAndItemMap.get((String)itemsEO.get("id")), infoId); } countSuccess++; } @@ -1353,94 +1362,97 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl> read(File file, List dbfieldList, String[] titles) { - try { - //最终返回数据 - List> list = new ArrayList<>(); + private List> read(File file, List dbfieldList, String[] titles) throws IOException, InvalidFormatException { - Workbook workbook = null; - InputStream is = new FileInputStream(file); - String name = file.getName().toLowerCase(); - // 创建excel操作对象 - if (name.contains(".xlsx") || name.contains(".xls")) { - workbook = WorkbookFactory.create(is); - } - //得到一个工作表 - Sheet sheet = workbook.getSheetAt(0); + //最终返回数据 + List> list = new ArrayList<>(); - //获得数据的总行数 - int totalRowNum = sheet.getLastRowNum(); + Workbook workbook = null; + InputStream is = new FileInputStream(file); + String name = file.getName().toLowerCase(); + // 创建excel操作对象 + if (name.contains(".xlsx") || name.contains(".xls")) { + workbook = WorkbookFactory.create(is); + } + //得到一个工作表 + Sheet sheet = workbook.getSheetAt(0); - //获得总列数 - int cellLength = sheet.getRow(0).getPhysicalNumberOfCells(); - // 验证模板表头是否正确 - Row row = sheet.getRow(0); - for (int i = 0; i < cellLength; i++) { - if (!(row == null)) { - Cell cell = row.getCell(i); - if(ObjectUtil.isNotNull(cell)){ - //设置单元格类型 - cell.setCellType(CellType.STRING); - String cellValue = cell.getStringCellValue(); - if(!cellValue.equals(titles[i])){ - throw new JeroBootException("请导入正确模板!"); - } - } else{ + //获得数据的总行数 + int totalRowNum = sheet.getLastRowNum(); + + //获得总列数 + int cellLength = sheet.getRow(0).getPhysicalNumberOfCells(); + // 验证模板表头是否正确 + Row rowTitle = sheet.getRow(0); + for (int i = 0; i < cellLength; i++) { + if (rowTitle != null) { + Cell cell = rowTitle.getCell(i); + if(ObjectUtil.isNotNull(cell)){ + //设置单元格类型 + cell.setCellType(CellType.STRING); + String cellValue = cell.getStringCellValue().substring(cell.getStringCellValue().indexOf("*")+1); + if(!cellValue.equals(titles[i])){ throw new JeroBootException("请导入正确模板!"); } - }else{ + } else{ throw new JeroBootException("请导入正确模板!"); } + }else{ + throw new JeroBootException("请导入正确模板!"); } + } - Map map = null; - //获得所有数据 - //从第x行开始获取 - for (int x = 2; x <= totalRowNum; x++) { - map = new HashMap(); - //获得第i行对象 - Row rowTitle = sheet.getRow(x); - //如果一行里的所有单元格都为空则不放进list里面 - int a = 0; - for (int y = 0; y < cellLength; y++) { - if (!(row == null)) { - Cell cell = row.getCell(y); // cell 为空时会抛空指针异常 - if(ObjectUtil.isNull(cell)) { - continue; - } + Map map = null; + //获得所有数据 + //从第x行开始获取 + for (int x = 2; x <= totalRowNum; x++) { + map = new HashMap(); + //获得第i行对象 + Row row= sheet.getRow(x); + //如果一行里的所有单元格都为空则不放进list里面 + int a = 0; + for (int y = 0; y < cellLength; y++) { + if (!(row == null)) { + Cell cell = row.getCell(y); // cell 为空时会抛空指针异常 + if(ObjectUtil.isNull(cell)) { + map.put(dbfieldList.get(y), ""); + continue; + } + String cellValue = null; + if (cell.getCellTypeEnum().equals("NUMERIC") && HSSFDateUtil.isCellDateFormatted(cell)) { + // 获取日期类型的单元格的值 + Date d = cell.getDateCellValue(); + // 进行格式转换 + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + cellValue = formatter.format(d); + } else { //设置单元格类型 cell.setCellType(CellType.STRING); - String cellValue = null; - boolean isMerge = isMergedRegion(sheet, row.getRowNum(), cell.getColumnIndex()); - //判断是否具有合并单元格 - if (isMerge) { - cellValue = getMergedRegionValue(sheet, row.getRowNum(), cell.getColumnIndex()); - } else { - cellValue = cell.getStringCellValue(); - } - // - if (cell == null) { - map.put(dbfieldList.get(y), ""); - } else { - map.put(dbfieldList.get(y), cellValue); - } - if (map.get(dbfieldList.get(y)) == null || "".equals(map.get(dbfieldList.get(y)))) { - a++; - } + } + + boolean isMerge = isMergedRegion(sheet, row.getRowNum(), cell.getColumnIndex()); + //判断是否具有合并单元格 + if (isMerge) { + cellValue = getMergedRegionValue(sheet, row.getRowNum(), cell.getColumnIndex()); + } else { + cellValue = cell.getStringCellValue(); + } + // + map.put(dbfieldList.get(y), cellValue); + if (map.get(dbfieldList.get(y)) == null || "".equals(map.get(dbfieldList.get(y)))) { + a++; } } - // 当前行所有单元格均不为空时 - if (a != cellLength && row != null) { - list.add(map); - } } - return list; - } catch (Exception e) { - e.printStackTrace(); + // 当前行所有单元格均不为空时 + if (a != cellLength && row != null) { + list.add(map); + } } - return null; + return list; } + /** * 获取合并单元格的值 * @@ -1554,7 +1566,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl map : fieldList) { String fieldName = (String) map.get("db_field_txt");//中文名称 @@ -1570,12 +1582,12 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl Long.parseLong(dbLength)) { - errorMsg += fieldName + "不能超过" + dbLength + "个字符"; + errorMsg += fieldName + "不能超过" + dbLength + "个字符;"; countError++; } //判断数据是否匹配 @@ -1583,12 +1595,12 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl valueIdList = new ArrayList<>(); //文字转ID if (StringUtils.isNotBlank(value)) { value = value.replace(",",","); @@ -1602,51 +1614,61 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl e.getEnName().equals(valueTemp)).collect(Collectors.toList()); } if (collect.size() != 0) { - valueId += collect.get(0).getId(); + valueIdList.add(collect.get(0).getId()); } } } - value = valueId; + value = StringUtils.join(valueIdList, ","); } } else if (FieldTypeEnum.TEXT_STRING.getValue().equals(fieldShowType)) { //输入框 //判断是否必填 if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isBlank(value)) { - errorMsg += fieldName + "为必填项,不能为空"; + errorMsg += fieldName + "为必填项,不能为空;"; countError++; } //判断长度 if (StringUtils.isNotBlank(value) && value.length() > Long.parseLong(dbLength)) { - errorMsg += fieldName + "不能超过" + dbLength + "个字符"; + errorMsg += fieldName + "不能超过" + dbLength + "个字符;"; countError++; } } else if (FieldTypeEnum.TEXT_NUMBER.getValue().equals(fieldShowType)) { + //输入框(数字) + //判断是否必填 + if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isBlank(value)) { + errorMsg += fieldName + "为必填项,不能为空;"; + countError++; + } //正则判断仅能为 负号(-),小数点(.)和数字 - + String regexNumber = "^(\\-|\\+)?\\d+(\\.\\d+)?$"; + if(StringUtils.isNotBlank(value) && !value.matches(regexNumber)){ + errorMsg += fieldName + "仅能为 负号(-),小数点(.)和数字;"; + countError++; + } } else if (FieldTypeEnum.PULL_SINGLE.getValue().equals(fieldShowType)) { //下拉单选 //判断是否必填 if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isBlank(value)) { - errorMsg += fieldName + "为必填项,不能为空"; + errorMsg += fieldName + "为必填项,不能为空;"; countError++; } //判断长度 if (StringUtils.isNotBlank(value) && value.length() > Long.parseLong(dbLength)) { - errorMsg += fieldName + "不能超过" + dbLength + "个字符"; + errorMsg += fieldName + "不能超过" + dbLength + "个字符;"; countError++; } //判断是否是单选 if (StringUtils.isNotBlank(value) && value.contains(",")) { - errorMsg += fieldName + "为单选项"; + errorMsg += fieldName + "为单选项;"; countError++; } //判断数据是否匹配 if (StringUtils.isNotBlank(value)) { if (!itemNameList.contains(value)) { - errorMsg += fieldName + "中的" + value + "与数据字典不匹配"; + errorMsg += fieldName + "中的" + value + "与数据字典不匹配;"; countError++; } } @@ -1666,12 +1688,12 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl Long.parseLong(dbLength)) { - errorMsg += fieldName + "不能超过" + dbLength + "个字符"; + errorMsg += fieldName + "不能超过" + dbLength + "个字符;"; countError++; } //下拉多选 @@ -1679,7 +1701,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl Long.parseLong(dbLength)) { - errorMsg += fieldName + "不能超过" + dbLength + "个字符"; + errorMsg += fieldName + "不能超过" + dbLength + "个字符;"; countError++; } if (StringUtils.isNotBlank(value)) { @@ -1777,20 +1800,21 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl Long.parseLong(dbLength)) { - errorMsg += key + "不能超过" + dbLength + "个字符"; + errorMsg += key + "不能超过" + dbLength + "个字符;"; countError++; } //判断库中是否存在,如果存在则存id,如果不存在则存输入的值 - List> listBySerialNumber = getListBySerialNumber(value); + value = value.replace(",",","); + List> listBySerialNumber = documentLibraryEOService.getListBySerialNumber(value); String serialNumberStr = ""; StringBuilder sb = new StringBuilder(); List list = new ArrayList<>(); @@ -1812,7 +1836,43 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl userIdList = new ArrayList<>(); + for(int u=0 ; u -1 && imgContent.length()>(pathIndex+16)) { - String imgPath = imgContent.substring(pathIndex+16,imgContent.length()-2); - String imgName = imgUUIndex + "-" +imgPath.substring(imgPath.lastIndexOf("/")+1,imgPath.length()); - lastOne.setValContent(imgUUIndex+".png"); - valContent.add(lastOne); - FileSplitValImgExportDto fileSplitValImgExportDto = new FileSplitValImgExportDto(); - fileSplitValImgExportDto.setImgName(imgUUIndex+".png"); - if (com.jero.modules.system.util.StringUtils.isNotEmpty(itemsValEO.getImgName())) { - fileSplitValImgExportDto.setImgPath(itemsValEO.getImgName()); - } else { - fileSplitValImgExportDto.setImgPath(imgPath); - } - allImgList.add(fileSplitValImgExportDto); - imgIndex++; - page.setImgIndex(imgIndex); - } + lastOne.setValContent(imgUUIndex+".png"); + valContent.add(lastOne); + FileSplitValImgExportDto fileSplitValImgExportDto = new FileSplitValImgExportDto(); + fileSplitValImgExportDto.setImgName(imgUUIndex+".png"); + fileSplitValImgExportDto.setImgPath(imgContent.substring(imgContent.lastIndexOf("/")+1)); + allImgList.add(fileSplitValImgExportDto); + imgIndex++; + page.setImgIndex(imgIndex); + +// int pathIndex = imgContent.indexOf("src='uploadPath"); +// if (pathIndex > -1 && imgContent.length()>(pathIndex+16)) { +// String imgPath = imgContent.substring(pathIndex+16,imgContent.length()-2); +// String imgName = imgUUIndex + "-" +imgPath.substring(imgPath.lastIndexOf("/")+1,imgPath.length()); +// lastOne.setValContent(imgUUIndex+".png"); +// valContent.add(lastOne); +// FileSplitValImgExportDto fileSplitValImgExportDto = new FileSplitValImgExportDto(); +// fileSplitValImgExportDto.setImgName(imgUUIndex+".png"); +// if (com.jero.modules.system.util.StringUtils.isNotEmpty(itemsValEO.getImgName())) { +// fileSplitValImgExportDto.setImgPath(itemsValEO.getImgName()); +// } else { +// fileSplitValImgExportDto.setImgPath(imgPath); +// } +// allImgList.add(fileSplitValImgExportDto); +// imgIndex++; +// page.setImgIndex(imgIndex); +// } } } preType = itemsValEO.getType(); @@ -2654,23 +2723,17 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl startRow) { - sheetItems.addMergedRegion(new CellRangeAddress(startRow,allRow,0,0)); - sheetItems.addMergedRegion(new CellRangeAddress(startRow,allRow,1,1)); -// sheetItems.addMergedRegion(new CellRangeAddress(startRow,allRow,3,3)); -// sheetItems.addMergedRegion(new CellRangeAddress(startRow,allRow,4,4)); -// sheetItems.addMergedRegion(new CellRangeAddress(startRow,allRow,5,5)); -// sheetItems.addMergedRegion(new CellRangeAddress(startRow,allRow,6,6)); -// sheetItems.addMergedRegion(new CellRangeAddress(startRow,allRow,7,7)); -// sheetItems.addMergedRegion(new CellRangeAddress(startRow,allRow,8,8)); + for(int cellNum = 0; cellNum < fieldList.size(); cellNum++) { + if (!"iterms_conditions".equals(fieldList.get(cellNum))) { + sheetItems.addMergedRegion(new CellRangeAddress(startRow, allRow, cellNum, cellNum)); + } + } // if (countFile > 0) { // for (int i=0;i<=countFile;i++) { // sheetItems.addMergedRegion(new CellRangeAddress(startRow,allRow,9+i,9+i)); @@ -2789,25 +2849,6 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl fileList = attFileEOService.getMultiFileInfos(exportDto.getRelevanceFile()); // if (fileList != null && !fileList.isEmpty()) {