|
@@ -56,10 +56,10 @@ public class WaterDeviceHandleExcelStrategy implements HandleExcelStrategy {
|
|
|
CommDataListener communityListener = new CommDataListener();
|
|
|
CommDataListener orgListener = new CommDataListener();
|
|
|
|
|
|
- ReadSheet readSheet1 = EasyExcel.readSheet(0).head(DeviceImportData.class).headRowNumber(4).registerReadListener(deviceImportListener).build();
|
|
|
- ReadSheet readSheet2 = EasyExcel.readSheet(1).head(CommImportData.class).registerReadListener(deviceTypeListener).build();
|
|
|
- ReadSheet readSheet3 = EasyExcel.readSheet(2).head(CommImportData.class).registerReadListener(orgListener).build();
|
|
|
- ReadSheet readSheet4 = EasyExcel.readSheet(3).head(CommImportData.class).registerReadListener(communityListener).build();
|
|
|
+ ReadSheet readSheet1 = EasyExcel.readSheet("档案管理-批量导入").head(DeviceImportData.class).headRowNumber(4).registerReadListener(deviceImportListener).build();
|
|
|
+ ReadSheet readSheet2 = EasyExcel.readSheet("设备类型").head(CommImportData.class).registerReadListener(deviceTypeListener).build();
|
|
|
+ ReadSheet readSheet3 = EasyExcel.readSheet("公司").head(CommImportData.class).registerReadListener(orgListener).build();
|
|
|
+ ReadSheet readSheet4 = EasyExcel.readSheet("小区").head(CommImportData.class).registerReadListener(communityListener).build();
|
|
|
// 这里注意 一定要把sheet1 sheet2 一起传进去,不然有个问题就是03版的excel 会读取多次,浪费性能
|
|
|
excelReader.read(readSheet1, readSheet2, readSheet3, readSheet4);
|
|
|
// 这里千万别忘记关闭,读的时候会创建临时文件,到时磁盘会崩的
|