From 9423f2936340d82b046ec615381c1c5e03698557 Mon Sep 17 00:00:00 2001
From: yuxc <yuxc@vci-tech.com>
Date: 星期五, 27 九月 2024 17:56:53 +0800
Subject: [PATCH] 1、主要完成对获取UI上下文的定义接口的优化,优化的方向为对多次获取业务类型对象进行转换而导致耗时较久的问题继续修改,还有对多次获取属性对象进行转换对象导致耗时过长问题进行修改。 2、对树的数据查询接口的优化,对多次获取属性对象进行转换对象导致耗时过长问题进行修改。

---
 Source/plt-web/plt-web-parent/plt-poi/src/main/java/com/vci/starter/poi/util/ExcelUtil.java |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/Source/plt-web/plt-web-parent/plt-poi/src/main/java/com/vci/starter/poi/util/ExcelUtil.java b/Source/plt-web/plt-web-parent/plt-poi/src/main/java/com/vci/starter/poi/util/ExcelUtil.java
index aedbcdf..34712cd 100644
--- a/Source/plt-web/plt-web-parent/plt-poi/src/main/java/com/vci/starter/poi/util/ExcelUtil.java
+++ b/Source/plt-web/plt-web-parent/plt-poi/src/main/java/com/vci/starter/poi/util/ExcelUtil.java
@@ -1,5 +1,6 @@
 package com.vci.starter.poi.util;
 
+import cn.hutool.core.collection.CollUtil;
 import com.vci.starter.poi.annotation.ExcelColumn;
 import com.vci.starter.poi.annotation.ExcelTitle;
 import com.vci.starter.poi.bo.*;
@@ -630,6 +631,8 @@
 					//鍐欏��
 					setCellValue(cell, value);
 				}
+				//璁剧疆鑷�傚簲鍒楀
+				sheet.autoSizeColumn(ed.getCol());
 				if(ed.getWidth()!=null && ed.getWidth()>0){
 					sheet.setColumnWidth(cell.getColumnIndex(),(int)(ed.getWidth() + 0.72)*256);
 				}
@@ -855,6 +858,7 @@
 				if (ed.getColTo() < ed.getCol()) {
 					ed.setColTo(ed.getCol());
 				}
+				List<CellRangeAddress> cellRangeAddressList = sheet.getMergedRegions();
 				sheet.addMergedRegion(new CellRangeAddress(ed.getRow(), ed.getRowTo(), ed.getCol(), ed.getColTo()));
 			});
 		}
@@ -867,7 +871,7 @@
 	 * @return 鏁版嵁鍒楄〃
 	 * @throws VciBaseException 鎵ц鍑洪敊鐨勬椂鍊欎細鎶涘嚭寮傚父
 	 */
-	public static  List<SheetDataSet> readDataObjectFromExcel(File file) throws VciBaseException {
+	public static List<SheetDataSet> readDataObjectFromExcel(File file) throws VciBaseException {
 		return readDataObjectFromExcel(file, SheetDataSet.class);
 	}
 
@@ -993,6 +997,7 @@
 		try {
 			for (int sheetIndex = 0; sheetIndex < workbook.getNumberOfSheets(); sheetIndex++) {
 				Sheet sheet = workbook.getSheetAt(sheetIndex);
+				String sheetName=sheet.getSheetName();
 				if(StringUtils.isNotBlank(excelOption.getSheetName())){
 					if(!sheet.getSheetName().equalsIgnoreCase(excelOption.getSheetName())){
 						continue;

--
Gitblit v1.10.0