lin пре 3 година
родитељ
комит
53db197a02

+ 1 - 1
zoniot-rmcp/zoniot-rmcp-web/src/main/java/com/zcxk/rmcp/web/excel/resolver/listener/InstallPlanListener.java

@@ -44,7 +44,7 @@ public class InstallPlanListener extends AnalysisEventListener<InstallPlanExcelD
             excelData.getFailNum().incrementAndGet();
             return;
         }
-        excelData.getSuccessNum().incrementAndGet();
+
         ResultMessage resultMessage = installPlanService.handleExcelData(data,excelData);
         if(resultMessage.getStatus()){
             excelData.getSuccessNum().incrementAndGet();

+ 1 - 1
zoniot-rmcp/zoniot-rmcp-web/src/main/java/com/zcxk/rmcp/web/excel/resolver/strategy/InstallHandleExcelStrategy.java

@@ -48,7 +48,7 @@ public class InstallHandleExcelStrategy implements HandleExcelStrategy {
         InstallImportListener listener = new InstallImportListener(installListService,data);
 
 
-        ReadSheet readSheet1 = EasyExcel.readSheet(0).head(InstallMeterData.class).headRowNumber(7).registerReadListener(listener).build();
+        ReadSheet readSheet1 = EasyExcel.readSheet("安装计划").head(InstallMeterData.class).headRowNumber(7).registerReadListener(listener).build();
         // 这里注意 一定要把sheet1 sheet2 一起传进去,不然有个问题就是03版的excel 会读取多次,浪费性能
         excelReader.read(readSheet1);
         // 这里千万别忘记关闭,读的时候会创建临时文件,到时磁盘会崩的

+ 1 - 1
zoniot-rmcp/zoniot-rmcp-web/src/main/java/com/zcxk/rmcp/web/excel/resolver/strategy/InstallPlanHandleExcelStrategy.java

@@ -53,7 +53,7 @@ public class InstallPlanHandleExcelStrategy implements HandleExcelStrategy {
         CommDataListener communityListener = new CommDataListener();
         CommDataListener orgListener = new CommDataListener();
 
-        ReadSheet readSheet1 = EasyExcel.readSheet(0).head(InstallPlanExcelData.class).headRowNumber(10).registerReadListener(listener).build();
+        ReadSheet readSheet1 = EasyExcel.readSheet("安装计划模板").head(InstallPlanExcelData.class).headRowNumber(10).registerReadListener(listener).build();
         ReadSheet readSheet2 = EasyExcel.readSheet("公司").head(CommImportData.class).registerReadListener(orgListener).build();
         ReadSheet readSheet3 = EasyExcel.readSheet("小区").head(CommImportData.class).registerReadListener(communityListener).build();
         ReadSheet readSheet4 = EasyExcel.readSheet("设备型号").head(CommImportData.class).registerReadListener(deviceTypeListener).build();

+ 4 - 4
zoniot-rmcp/zoniot-rmcp-web/src/main/java/com/zcxk/rmcp/web/excel/resolver/strategy/WaterDeviceHandleExcelStrategy.java

@@ -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);
         // 这里千万别忘记关闭,读的时候会创建临时文件,到时磁盘会崩的