Browse Source

光伏负荷率、利用小时加艾肯

xushili 2 years ago
parent
commit
005813e5a1

+ 4 - 2
src/main/java/com/gyee/frame/schdule/windturbinestatetime/TaskLoadrateHourlyStatistics.java

@@ -52,7 +52,8 @@ public class TaskLoadrateHourlyStatistics {
         //getPowerCollect();
         getElectricityCollect();
         Map<Integer, String> ptMap = loadrateHourlyService.getPtMap();
-        for (int i = 0; i <5; i++) {
+        int i2 = sheets.getNumberOfSheets();
+        for (int i = 0; i <i2; i++) {
             XSSFSheet sheetAt = sheets.getSheetAt(i);
             for (int i1 = 0; i1 < sheetAt.getLastRowNum()-1; i1++) {
                 sheetAt.getRow(i1+2).getCell(4).setCellValue(DateUtils.format(instance.getTime(),"yyyy-MM-dd HH:mm:ss"));
@@ -83,7 +84,8 @@ public class TaskLoadrateHourlyStatistics {
         Map<String,TsPointData> powerPoint = remoteServiceBuilder.ShardingService().getHistorySection(powerTags, instance.getTimeInMillis());
         getPowerCollect();
         Map<Integer, String> ptMap = loadrateHourlyService.getPtMap();
-        for (int i = 0; i <5; i++) {
+        int i2 = sheets.getNumberOfSheets();
+        for (int i = 0; i <i2; i++) {
             XSSFSheet sheetAt = sheets.getSheetAt(i);
             for (int i1 = 0; i1 < sheetAt.getLastRowNum()-1; i1++) {
                 sheetAt.getRow(i1+2).getCell(4).setCellValue(DateUtils.format(instance.getTime(),"yyyy-MM-dd HH:mm:ss"));