Browse Source

sailfish升级到0.0.4,excelbug修改

menglu 3 years ago
parent
commit
8bd1e3aa44

+ 1 - 1
ibms-data-sdk/pom.xml

@@ -211,7 +211,7 @@
 		<dependency>
 			<groupId>com.persagy</groupId>
 			<artifactId>sailfish</artifactId>
-			<version>0.0.3</version>
+			<version>0.0.4</version>
 		</dependency>
 	</dependencies>
 

+ 2 - 4
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/util/ExeclReadEquipStaticInfoUtil.java

@@ -3,8 +3,6 @@ package com.persagy.ibms.data.sdk.util;
 import java.io.BufferedInputStream;
 import java.io.File;
 import java.io.FileInputStream;
-import java.util.LinkedHashMap;
-import java.util.List;
 
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -23,7 +21,7 @@ public class ExeclReadEquipStaticInfoUtil {
 		FileInputStream fis = new FileInputStream(new File(filepath));
 		Workbook workbook = WorkbookFactory.create(new BufferedInputStream(fis));
 		Sheet sheet = workbook.getSheet(sheetName);
-		JSONObject object = new JSONObject(new LinkedHashMap());
+		JSONObject object = new JSONObject();
 		for (int i = 0; i < sheet.getNumMergedRegions(); i++) {
 			// 获取合并单元格的值
 			CellRangeAddress ca = sheet.getMergedRegion(i);
@@ -32,7 +30,7 @@ public class ExeclReadEquipStaticInfoUtil {
 			Cell fCell = fRow.getCell(0);
 			String caVal = getCellValue(fCell);
 			// 获取合并单元格之后的值,形成树形结构
-			List dic = new JSONArray();
+			JSONArray dic = new JSONArray();
 			for (int j = firstRow; j <= ca.getLastRow(); j++) {
 				Row row = sheet.getRow(j);
 				JSONObject obj = new JSONObject();