|
|
@@ -39,22 +39,21 @@ public class GenerateReportWordService { |
|
|
|
// String titleName = airDataType.getDataType() + "报告"; |
|
|
|
// wordUtils.insertTitlePattern(titleName, wordUtils.rtfGsBt1); |
|
|
|
|
|
|
|
wordUtils.insertContext(airDataType.getDataType() + "浓度分布", 10, Font.BOLD, Element.ALIGN_LEFT, 20, 0, 0); |
|
|
|
|
|
|
|
wordUtils.insertContext("检测时间:" + detectionTime, 10, Font.NORMAL, Element.ALIGN_LEFT, 20, 0, 0); |
|
|
|
wordUtils.insertContext("监测设备:" + equipmentMountCode, 10, Font.NORMAL, Element.ALIGN_LEFT, 20, 0, 0); |
|
|
|
wordUtils.insertContext("检测方式:" + airDataType.getDetection(), 10, Font.NORMAL, Element.ALIGN_LEFT, 20, 0, 0); |
|
|
|
wordUtils.insertContext("采样点数量:" + request.getSamplingPointsNum(), 10, Font.NORMAL, Element.ALIGN_LEFT, 20, 0, 0); |
|
|
|
wordUtils.insertContext("检测区域网格平均尺寸:" + request.getAverageGridSize(), 10, Font.NORMAL, Element.ALIGN_LEFT, 20, 0, 0); |
|
|
|
wordUtils.insertContext("总检测区域网格面积:" + request.getGridArea(), 10, Font.NORMAL, Element.ALIGN_LEFT, 20, 0, 0); |
|
|
|
wordUtils.insertContext("检测区域中心点经纬度:" + request.getCenterPointLongitudeAndLatitude(), 10, Font.NORMAL, Element.ALIGN_LEFT, 20, 0, 0); |
|
|
|
wordUtils.insertContext(airDataType.getDataType() + "检测区域平均浓度:" + request.getAverageConcentration(), 10, Font.NORMAL, Element.ALIGN_LEFT, 20, 0, 0); |
|
|
|
wordUtils.insertContext(airDataType.getDataType() + "网格浓度最高值:" + request.getGridConcentrationMax(), 10, Font.NORMAL, Element.ALIGN_LEFT, 20, 0, 0); |
|
|
|
wordUtils.insertContext(airDataType.getDataType() + "网格浓度最小值:" + request.getGridConcentrationMix(), 10, Font.NORMAL, Element.ALIGN_LEFT, 20, 0, 0); |
|
|
|
wordUtils.insertContext(airDataType.getDataType() + "单点浓度最高值:" + request.getSinglePointConcentrationMax(), 10, Font.NORMAL, Element.ALIGN_LEFT, 20, 0, 0); |
|
|
|
wordUtils.insertContext(airDataType.getDataType() + "单点浓度最低值:" + request.getSinglePointConcentrationMix(), 10, Font.NORMAL, Element.ALIGN_LEFT, 20, 0, 0); |
|
|
|
wordUtils.insertImg(request.getOssUrl(), Image.ALIGN_CENTER, 400, 500, 100, 100, 100, 0); |
|
|
|
wordUtils.insertImg(airDataType.getReferenceIndicatorHorizontalImage(), Image.ALIGN_CENTER, 100, 500, 100, 100, 100, 0); |
|
|
|
wordUtils.insertContext(airDataType.getDataType() + "浓度分布", 14, Font.BOLD, Element.ALIGN_LEFT, 20, 2, 2); |
|
|
|
wordUtils.insertContext("检测时间:" + detectionTime, 12, Font.NORMAL, Element.ALIGN_LEFT, 20, 2, 2); |
|
|
|
wordUtils.insertContext("监测设备:" + equipmentMountCode, 12, Font.NORMAL, Element.ALIGN_LEFT, 20, 2, 2); |
|
|
|
wordUtils.insertContext("检测方式:" + airDataType.getDetection(), 12, Font.NORMAL, Element.ALIGN_LEFT, 20, 2, 2); |
|
|
|
wordUtils.insertContext("采样点数量:" + request.getSamplingPointsNum(), 12, Font.NORMAL, Element.ALIGN_LEFT, 20, 2, 2); |
|
|
|
wordUtils.insertContext("检测区域网格平均尺寸:" + request.getAverageGridSize(), 12, Font.NORMAL, Element.ALIGN_LEFT, 20, 2, 2); |
|
|
|
wordUtils.insertContext("总检测区域网格面积:" + request.getGridArea(), 12, Font.NORMAL, Element.ALIGN_LEFT, 20, 2, 2); |
|
|
|
wordUtils.insertContext("检测区域中心点经纬度:" + request.getCenterPointLongitudeAndLatitude(), 12, Font.NORMAL, Element.ALIGN_LEFT, 20, 2, 2); |
|
|
|
wordUtils.insertContext(airDataType.getDataType() + "检测区域平均浓度:" + request.getAverageConcentration(), 12, Font.NORMAL, Element.ALIGN_LEFT, 20, 2, 2); |
|
|
|
wordUtils.insertContext(airDataType.getDataType() + "网格浓度最高值:" + request.getGridConcentrationMax(), 12, Font.NORMAL, Element.ALIGN_LEFT, 20, 2, 2); |
|
|
|
wordUtils.insertContext(airDataType.getDataType() + "网格浓度最小值:" + request.getGridConcentrationMix(), 12, Font.NORMAL, Element.ALIGN_LEFT, 20, 2, 2); |
|
|
|
wordUtils.insertContext(airDataType.getDataType() + "单点浓度最高值:" + request.getSinglePointConcentrationMax(), 12, Font.NORMAL, Element.ALIGN_LEFT, 20, 2, 2); |
|
|
|
wordUtils.insertContext(airDataType.getDataType() + "单点浓度最低值:" + request.getSinglePointConcentrationMix(), 12, Font.NORMAL, Element.ALIGN_LEFT, 20, 2, 2); |
|
|
|
wordUtils.insertImg(request.getOssUrl(), Image.ALIGN_CENTER, 500, 400, 100, 100, 100, 0); |
|
|
|
wordUtils.insertImg(airDataType.getReferenceIndicatorHorizontalImage(), Image.ALIGN_CENTER, 500, 10, 100, 10, 10, 0); |
|
|
|
} catch (DocumentException e) { |
|
|
|
log.info("生成报告word异常"); |
|
|
|
throw new RuntimeException(e); |