From dfd927151093a90dd0aaf48bc376adde7b9db399 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Fri, 26 Jan 2024 11:09:32 +0800 Subject: [PATCH] =?UTF-8?q?#=E8=BF=90=E8=A1=8C=E6=9C=88=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E5=AF=BC=E5=87=BAchart?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims/operational/report/vo/AttributeVo.java | 22 ++ .../operational/report/vo/CurveAttrValueVo.java | 26 ++ .../hzims/operational/report/vo/CurveYArrayVo.java | 22 ++ .../hnac/hzims/operational/report/vo/EchartVo.java | 2 +- .../hzims/operational/report/vo/RunDataShowVo.java | 3 - .../operation/report/impl/ReportServiceImpl.java | 12 +- .../report/service/impl/RunMonthServiceImpl.java | 364 ++++++++++++++++----- 7 files changed, 359 insertions(+), 92 deletions(-) create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/AttributeVo.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveAttrValueVo.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveYArrayVo.java diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/AttributeVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/AttributeVo.java new file mode 100644 index 0000000..e1f653d --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/AttributeVo.java @@ -0,0 +1,22 @@ +package com.hnac.hzims.operational.report.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author ysj + */ +@Data +@ApiModel("曲线对象") +public class AttributeVo { + + @ApiModelProperty("设备编码") + private String deviceCode; + + @ApiModelProperty("属性") + private String signage; + + @ApiModelProperty("属性名称") + private String signageName; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveAttrValueVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveAttrValueVo.java new file mode 100644 index 0000000..41f7c52 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveAttrValueVo.java @@ -0,0 +1,26 @@ +package com.hnac.hzims.operational.report.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.models.auth.In; +import lombok.Data; + +/** + * @author ysj + */ +@Data +@ApiModel("运行数据对象") +public class CurveAttrValueVo { + + @ApiModelProperty("属性") + private String attribute; + + @ApiModelProperty("属性名称") + private String attributeName; + + @ApiModelProperty("时间") + private Integer time; + + @ApiModelProperty("值") + private Double value; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveYArrayVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveYArrayVo.java new file mode 100644 index 0000000..9522491 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveYArrayVo.java @@ -0,0 +1,22 @@ +package com.hnac.hzims.operational.report.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author ysj + */ +@Data +@ApiModel("运行数据对象") +public class CurveYArrayVo { + + @ApiModelProperty("属性") + private String attribute; + + @ApiModelProperty("属性名称") + private String attributeName; + + @ApiModelProperty("值:数组") + private Number[] values; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/EchartVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/EchartVo.java index 4dfdfda..24a5d1a 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/EchartVo.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/EchartVo.java @@ -14,7 +14,7 @@ import java.util.List; public class EchartVo { @ApiModelProperty("时间:day") - private String time; + private Integer time; @ApiModelProperty("数据值对象") List values; diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/RunDataShowVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/RunDataShowVo.java index 49daf8c..6bde33a 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/RunDataShowVo.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/RunDataShowVo.java @@ -31,7 +31,4 @@ public class RunDataShowVo extends RunMonthEntity { @ApiModelProperty("年计划完成率") private Double yearRate; - - @ApiModelProperty("曲线转换对象") - private List curveEcharts; } diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/report/impl/ReportServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/report/impl/ReportServiceImpl.java index fc589d6..81b5dae 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/report/impl/ReportServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/report/impl/ReportServiceImpl.java @@ -980,11 +980,7 @@ public class ReportServiceImpl implements ReportService { item.setSignage(data.getSignage()); Date date = DateUtil.parse(item.getTs(), "yyyy-MM-dd HH:mm:ss.s"); day.setTime(date); - if(day.get(Calendar.DAY_OF_MONTH) <= 9){ - item.setTs("0" + day.get(Calendar.DAY_OF_MONTH)); - }else{ - item.setTs(day.get(Calendar.DAY_OF_MONTH) + ""); - } + item.setTs(String.valueOf(day.get(Calendar.DAY_OF_MONTH))); }).collect(Collectors.toList())); }); if(CollectionUtil.isEmpty(analyseDatas)){ @@ -993,7 +989,7 @@ public class ReportServiceImpl implements ReportService { Map> map = analyseDatas.stream().collect(Collectors.groupingBy(AnalyseDataTaosVO::getTs)); return map.entrySet().stream().map(entry->{ EchartVo echart = new EchartVo(); - echart.setTime(entry.getKey()); + echart.setTime(Integer.valueOf(entry.getKey())); echart.setValues(entry.getValue().stream().map(value->{ EchartValueVo echartValue = new EchartValueVo(); echartValue.setAttribute(value.getSignage()); @@ -1061,12 +1057,12 @@ public class ReportServiceImpl implements ReportService { attributes.add(A_tem); AttributeVo B_tem = new AttributeVo(); - B_tem.setSignage(HomePageConstant.A_PHASE_IRON_CORE_TEMP); + B_tem.setSignage(HomePageConstant.B_PHASE_IRON_CORE_TEMP); B_tem.setSignageName("B相铁芯温度1"); attributes.add(B_tem); AttributeVo C_tem = new AttributeVo(); - C_tem.setSignage(HomePageConstant.A_PHASE_IRON_CORE_TEMP); + C_tem.setSignage(HomePageConstant.C_PHASE_IRON_CORE_TEMP); C_tem.setSignageName("C相铁芯温度1"); attributes.add(C_tem); break; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonthServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonthServiceImpl.java index e44e5bf..c6d39e2 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonthServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonthServiceImpl.java @@ -9,18 +9,18 @@ import com.hnac.hzims.operational.report.service.RunMonthService; import com.hnac.hzims.operational.report.vo.*; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.apache.poi.hssf.usermodel.*; +import org.apache.poi.hssf.usermodel.HSSFFont; import org.apache.poi.hssf.util.HSSFColor; -import org.apache.poi.ss.usermodel.BorderStyle; -import org.apache.poi.ss.usermodel.FillPatternType; -import org.apache.poi.ss.usermodel.HorizontalAlignment; -import org.apache.poi.ss.usermodel.VerticalAlignment; +import org.apache.poi.ss.usermodel.*; +import org.apache.poi.ss.usermodel.charts.*; import org.apache.poi.ss.util.CellRangeAddress; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.ObjectUtil; +import org.springblade.core.tool.utils.StringUtil; import org.springframework.stereotype.Service; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; @@ -32,7 +32,7 @@ import java.math.BigDecimal; import java.math.RoundingMode; import java.net.URLEncoder; import java.util.ArrayList; -import java.util.Collections; +import java.util.Comparator; import java.util.List; import java.util.stream.Collectors; @@ -103,7 +103,7 @@ public class RunMonthServiceImpl extends BaseServiceImpl runData = JSONObject.parseObject(entity.getRunData(),new TypeReference>(){}); - row = this.runDataFill(hssWB,sheet,row,runData); + row = this.runDataFill(hssWB,sheet,row,entity.getRunData()); + // 二、表头格式设置 this.titleHeader(hssWB, sheet,"2、告警报表",row); row += 1; @@ -155,36 +156,217 @@ public class RunMonthServiceImpl extends BaseServiceImpl runAlarm = JSONObject.parseObject(entity.getAlarmData(),new TypeReference>(){}); - row = this.alarmDataFill(hssWB,sheet,row,runAlarm); + row = this.alarmDataFill(hssWB,sheet,row,entity.getAlarmData()); // 三、表头格式设置 this.titleHeader(hssWB, sheet,"3、机组负荷、温度曲线",row); row += 1; - + // 绘制机组曲线 + row = this.drawCurves(hssWB,sheet,row,entity.getCurveData()); // 四、表头格式设置 this.titleHeader(hssWB, sheet,"4、运行数据分析",row); row += 1; - + // 运行数据分析填充 + row = this.analysisDataFill(hssWB,sheet,row,entity.getAnalysisData()); // 五、表头格式设置 this.titleHeader(hssWB, sheet,"5、运行建议及其他",row); row += 1; + // 运行建议及其他填充 + this.runProposeFill(hssWB,sheet,row,entity.getRunPropose()); return hssWB; } + + /** + * 绘制机组曲线 + * @param hssWB + * @param rowNumber + * @param data + * @return + */ + private int drawCurves(Workbook hssWB,Sheet sheet, int rowNumber, String data) { + if(StringUtil.isEmpty(data)){ + // 绘制空表格 + this.emptyRow(hssWB,sheet,rowNumber); + CellRangeAddress region = new CellRangeAddress(rowNumber, rowNumber, (short) 0, (short) 7); + sheet.addMergedRegion(region); + return rowNumber + 1; + } + List curves = JSONObject.parseObject(data,new TypeReference>(){}); + if(CollectionUtil.isEmpty(curves)){ + // 绘制空表格 + this.emptyRow(hssWB,sheet,rowNumber); + CellRangeAddress region = new CellRangeAddress(rowNumber, rowNumber, (short) 0, (short) 7); + sheet.addMergedRegion(region); + return rowNumber + 1; + } + // 遍历机组 + for(CurveEchartVo device : curves) { + // 负荷曲线 + rowNumber = this.drawCurve(hssWB,sheet,rowNumber,device.getLoadCurve(),device.getDeviceName() + "_负荷曲线"); + // 轴承温度 + rowNumber = this.drawCurve(hssWB,sheet,rowNumber,device.getBearingTempCurve(),device.getDeviceName() + "_轴承温度曲线"); + // 定子温度曲线 + rowNumber = this.drawCurve(hssWB,sheet,rowNumber,device.getStatorTempCurve(),device.getDeviceName() + "_定子温度曲线"); + } + return rowNumber; + } + + /** + * 绘制曲线 + * @param loadCurve + * @param rowNumber + */ + private int drawCurve(Workbook hssWB,Sheet sheet,int rowNumber,List loadCurve,String title) { + // 标题 + Row row_1 = sheet.createRow(rowNumber); + this.setTitileStyle(hssWB, row_1, 7, false, false, HorizontalAlignment.LEFT); + row_1.getCell(0).setCellValue(title); + CellRangeAddress region1 = new CellRangeAddress(rowNumber, rowNumber, (short) 0, (short) 7); + sheet.addMergedRegion(region1); + rowNumber += 1; + + if(CollectionUtil.isEmpty(loadCurve)){ + // 绘制空表格 + this.emptyRow(hssWB,sheet,rowNumber); + CellRangeAddress region2 = new CellRangeAddress(rowNumber, rowNumber, (short) 0, (short) 7); + sheet.addMergedRegion(region2); + return rowNumber + 1; + } + + // 合并chart范围 + CellRangeAddress region2 = new CellRangeAddress(rowNumber, rowNumber + 7, (short) 0, (short) 7); + sheet.addMergedRegion(region2); + + // 画布 + Drawing drawing = sheet.createDrawingPatriarch(); + // 固定位置 : 前4个参数偏移位置, col1 : 起始列数 row1 : 起始行数 col2 : 结束行数 row2 : 结束行数 + ClientAnchor anchor = drawing.createAnchor(0, 0, 0, 0, 0, rowNumber, 8, rowNumber + 7); + // Chart图表 + Chart chart = drawing.createChart(anchor); + // 折线图 + ChartLegend chartLegend = chart.getOrCreateLegend(); + // 停靠位置 : 右上 + chartLegend.setPosition(LegendPosition.TOP_RIGHT); + // 折线图数据存储对象 + LineChartData lineChartData = chart.getChartDataFactory().createLineChartData(); + // X 轴位置 : 下 + ChartAxis xAxis = chart.getChartAxisFactory().createCategoryAxis(AxisPosition.BOTTOM); + // Y 轴位置 : 左 + ValueAxis yAxis = chart.getChartAxisFactory().createValueAxis(AxisPosition.LEFT); + // 轴交叉点 + yAxis.setCrosses(AxisCrosses.AUTO_ZERO); + // X 轴数据散点 + ChartDataSource xds = DataSources.fromArray(loadCurve.stream().map(EchartVo::getTime).toArray(Number[]::new)); + // 曲线条目集合 + List curveYArray = this.curveToArray(loadCurve); + // Y 轴曲线 : 平滑散点值 + for(CurveYArrayVo array : curveYArray){ + ChartDataSource yds = DataSources.fromArray(array.getValues()); + LineChartSeries series = lineChartData.addSeries(xds,yds); + // 曲线名称 + series.setTitle(array.getAttributeName()); + } + chart.plot(lineChartData, xAxis, yAxis); + return rowNumber + 8; + } + + /** + * 曲线转数组对象 + * @param curves + * @return + */ + private List curveToArray(List curves) { + List attrValues = new ArrayList<>(); + curves.forEach(curve->{ + attrValues.addAll(curve.getValues().stream().map(value->{ + CurveAttrValueVo attrValue = new CurveAttrValueVo(); + attrValue.setAttribute(value.getAttribute()); + attrValue.setAttributeName(value.getAttributeName()); + attrValue.setTime(curve.getTime()); + attrValue.setValue(value.getValue()); + return attrValue; + }).collect(Collectors.toList())); + }); + return attrValues.stream().collect(Collectors.groupingBy(CurveAttrValueVo::getAttribute)).entrySet().stream().map(entry->{ + CurveYArrayVo yArray = new CurveYArrayVo(); + yArray.setAttribute(entry.getKey()); + yArray.setAttributeName(entry.getValue().get(0).getAttributeName()); + yArray.setValues(entry.getValue().stream().sorted(Comparator.comparing(CurveAttrValueVo::getTime)).map(CurveAttrValueVo::getValue).toArray(Double[]::new)); + return yArray; + }).collect(Collectors.toList()); + } + + /** + * 运行数据分析填充 + * @param hssWB + * @param sheet + * @param rowNumber + * @param analysisData + */ + private int analysisDataFill(Workbook hssWB, Sheet sheet, int rowNumber, String analysisData) { + if(StringUtil.isEmpty(analysisData)){ + // 绘制空表格 + this.emptyRow(hssWB,sheet,rowNumber); + CellRangeAddress region2 = new CellRangeAddress(rowNumber, rowNumber, (short) 0, (short) 7); + sheet.addMergedRegion(region2); + return rowNumber + 1; + } + + for(int i = 0; i < 4;i++){ + // 运行数据分析赋值 + Row row = sheet.createRow(rowNumber + i); + this.setTitileStyle(hssWB, row, 7, false, false, HorizontalAlignment.LEFT); + if(i == 0){ + row.getCell(0).setCellValue(analysisData); + } + } + CellRangeAddress region1 = new CellRangeAddress(rowNumber, rowNumber + 3, (short) 0, (short) 7); + sheet.addMergedRegion(region1); + return rowNumber + 4; + } + + /** + * 运行建议及其他填充 + * @param hssWB + * @param sheet + * @param rowNumber + * @param runPropose + */ + private void runProposeFill(Workbook hssWB, Sheet sheet, int rowNumber, String runPropose) { + if(StringUtil.isEmpty(runPropose)){ + // 绘制空表格 + this.emptyRow(hssWB,sheet,rowNumber); + CellRangeAddress region2 = new CellRangeAddress(rowNumber, rowNumber, (short) 0, (short) 7); + sheet.addMergedRegion(region2); + } + + for(int i = 0; i < 4;i++){ + // 运行数据分析赋值 + Row row = sheet.createRow(rowNumber + i); + this.setTitileStyle(hssWB, row, 7, false, false, HorizontalAlignment.LEFT); + if(i == 0){ + row.getCell(0).setCellValue(runPropose); + } + } + CellRangeAddress region1 = new CellRangeAddress(rowNumber, rowNumber + 3, (short) 0, (short) 7); + sheet.addMergedRegion(region1); + } + + /** * 设置头部 * @param hssWB * @param sheet */ - private void firstHeader(HSSFWorkbook hssWB, HSSFSheet sheet,String headerName) { + private void firstHeader(Workbook hssWB, Sheet sheet,String headerName) { // 第一行 - HSSFRow fisrtRow = sheet.createRow(0); + Row fisrtRow = sheet.createRow(0); this.setTitileStyle(hssWB, fisrtRow, 7, true,true,HorizontalAlignment.CENTER); // 第一个单元格 - HSSFCell headCell = fisrtRow.getCell(0); + Cell headCell = fisrtRow.getCell(0); headCell.setCellValue(headerName); // 首行合并情况 CellRangeAddress region1 = new CellRangeAddress(0, 0, (short) 0, (short) 7); @@ -196,11 +378,11 @@ public class RunMonthServiceImpl extends BaseServiceImpl runData) { + private int runDataFill(Workbook hssWB, Sheet sheet, int rowNumber,String data) { + if(StringUtil.isEmpty(data)){ + // 绘制空表格 + this.emptyRow(hssWB,sheet,rowNumber); + CellRangeAddress region = new CellRangeAddress(rowNumber, rowNumber, (short) 0, (short) 7); + sheet.addMergedRegion(region); + return rowNumber + 1; + } + List runData = JSONObject.parseObject(data,new TypeReference>(){}); if(CollectionUtil.isEmpty(runData)){ // 绘制空表格 this.emptyRow(hssWB,sheet,rowNumber); + CellRangeAddress region = new CellRangeAddress(rowNumber, rowNumber, (short) 0, (short) 7); + sheet.addMergedRegion(region); return rowNumber + 1; } int row = rowNumber; int endRow = rowNumber + runData.size(); for (;row < endRow; row ++){ // 创建行 - HSSFRow frow = sheet.createRow(row); + Row frow = sheet.createRow(row); this.setTitileStyle(hssWB, frow, 7, false,false,HorizontalAlignment.CENTER); // 组名 - HSSFCell frow_cell_1 = frow.getCell(0); + Cell frow_cell_1 = frow.getCell(0); frow_cell_1.setCellValue(runData.get(row - rowNumber).getDeviceName()); // 本月累计运行时长 - HSSFCell frow_cell_2 = frow.getCell(1); + Cell frow_cell_2 = frow.getCell(1); frow_cell_2.setCellValue(runData.get(row - rowNumber).getRunHours() + "小时"); // 机组发电量 - HSSFCell frow_cell_3 = frow.getCell(2); + Cell frow_cell_3 = frow.getCell(2); frow_cell_3.setCellValue(runData.get(row - rowNumber).getGenerate()); if(row == rowNumber){ // 计划发电量 - HSSFCell frow_cell_4 = frow.getCell(3); + Cell frow_cell_4 = frow.getCell(3); frow_cell_4.setCellValue(runData.stream().mapToDouble(RunDataVo::getPlan).sum()); // 实发电量 - HSSFCell frow_cell_5 = frow.getCell(4); + Cell frow_cell_5 = frow.getCell(4); frow_cell_5.setCellValue(runData.stream().mapToDouble(RunDataVo::getGenerate).sum()); // 完成率 - HSSFCell frow_cell_6 = frow.getCell(5); + Cell frow_cell_6 = frow.getCell(5); double monSumGenerate = runData.stream().mapToDouble(RunDataVo::getGenerate).sum(); double monSumPlan = runData.stream().mapToDouble(RunDataVo::getPlan).sum(); if(Math.abs(monSumGenerate) > 0 && Math.abs(monSumPlan) > 0){ @@ -279,10 +473,10 @@ public class RunMonthServiceImpl extends BaseServiceImpl 0 && Math.abs(yearSumPlan) > 0){ @@ -312,26 +506,26 @@ public class RunMonthServiceImpl extends BaseServiceImpl runAlarm) { + private int alarmDataFill(Workbook hssWB, Sheet sheet, int rowNumber, String data) { + if(StringUtil.isEmpty(data)){ + // 绘制空表格 + this.emptyRow(hssWB,sheet,rowNumber); + CellRangeAddress region = new CellRangeAddress(rowNumber, rowNumber, (short) 0, (short) 7); + sheet.addMergedRegion(region); + return rowNumber + 1; + } + List runAlarm = JSONObject.parseObject(data,new TypeReference>(){}); if(CollectionUtil.isEmpty(runAlarm)){ // 绘制空表格 this.emptyRow(hssWB,sheet,rowNumber); + CellRangeAddress region = new CellRangeAddress(rowNumber, rowNumber, (short) 0, (short) 7); + sheet.addMergedRegion(region); return rowNumber + 1; } int row = rowNumber; int endRow = rowNumber + runAlarm.size(); for (;row < endRow ; row ++){ // 创建行 - HSSFRow frow = sheet.createRow(row); + Row frow = sheet.createRow(row); this.setTitileStyle(hssWB, frow, 7, false,false,HorizontalAlignment.CENTER); // 组名 - HSSFCell frow_cell_1 = frow.getCell(0); + Cell frow_cell_1 = frow.getCell(0); frow_cell_1.setCellValue(runAlarm.get(row - rowNumber).getDeviceName()); // 首次时间 - HSSFCell frow_cell_2 = frow.getCell(1); + Cell frow_cell_2 = frow.getCell(1); frow_cell_2.setCellValue(runAlarm.get(row - rowNumber).getAlarmTime()); // 事件内容 - HSSFCell frow_cell_3 = frow.getCell(2); + Cell frow_cell_3 = frow.getCell(2); frow_cell_3.setCellValue(runAlarm.get(row - rowNumber).getContent()); // 告警类型 - HSSFCell frow_cell_4 = frow.getCell(3); + Cell frow_cell_4 = frow.getCell(3); frow_cell_4.setCellValue(runAlarm.get(row - rowNumber).getTypeName()); // 次数 - HSSFCell frow_cell_5 = frow.getCell(4); + Cell frow_cell_5 = frow.getCell(4); frow_cell_5.setCellValue(runAlarm.get(row - rowNumber).getCount()); // 原因初步分析 - HSSFCell frow_cell_6 = frow.getCell(5); + Cell frow_cell_6 = frow.getCell(5); frow_cell_6.setCellValue(runAlarm.get(row - rowNumber).getReason()); // 处置 - HSSFCell frow_cell_7 = frow.getCell(6); + Cell frow_cell_7 = frow.getCell(6); frow_cell_7.setCellValue(runAlarm.get(row - rowNumber).getDispose()); // 备注 - HSSFCell frow_cell_8 = frow.getCell(7); + Cell frow_cell_8 = frow.getCell(7); frow_cell_8.setCellValue(runAlarm.get(row - rowNumber).getMemo()); } return endRow; @@ -420,10 +624,10 @@ public class RunMonthServiceImpl extends BaseServiceImpl