Pārlūkot izejas kodu

改:导出word图片尺寸比例

pull/98/head
suqin pirms 10 mēnešiem
vecāks
revīzija
b6a915701a
2 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airData/report/GenerateReportWordService.java
  2. +3
    -3
      tuoheng-service/tuoheng-admin/src/test/java/com/tuoheng/admin/service/InspectionServiceTest.java

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airData/report/GenerateReportWordService.java Parādīt failu

wordUtils.insertContext(airDataType.getDataType() + "单点浓度最高值:" + request.getSinglePointConcentrationMax(), 10, Font.NORMAL, Element.ALIGN_LEFT, 20, 2, 2); wordUtils.insertContext(airDataType.getDataType() + "单点浓度最高值:" + request.getSinglePointConcentrationMax(), 10, Font.NORMAL, Element.ALIGN_LEFT, 20, 2, 2);
wordUtils.insertContext(airDataType.getDataType() + "单点浓度最低值:" + request.getSinglePointConcentrationMin(), 10, Font.NORMAL, Element.ALIGN_LEFT, 20, 2, 2); wordUtils.insertContext(airDataType.getDataType() + "单点浓度最低值:" + request.getSinglePointConcentrationMin(), 10, Font.NORMAL, Element.ALIGN_LEFT, 20, 2, 2);
wordUtils.insertImg(request.getOssUrl(), Image.ALIGN_CENTER, 500, 400, 100, 40, 40, 0); wordUtils.insertImg(request.getOssUrl(), Image.ALIGN_CENTER, 500, 400, 100, 40, 40, 0);
wordUtils.insertImg(request.getReferenceIndicatorHorizontalImageUrl(), Image.ALIGN_CENTER, 500, 10, 100, 10, 10, 0);
wordUtils.insertImg(request.getReferenceIndicatorHorizontalImageUrl(), Image.ALIGN_CENTER, 540, 100, 100, 60, 0, 0);
} catch (DocumentException e) { } catch (DocumentException e) {
log.info("生成报告word异常"); log.info("生成报告word异常");
throw new RuntimeException(e); throw new RuntimeException(e);

+ 3
- 3
tuoheng-service/tuoheng-admin/src/test/java/com/tuoheng/admin/service/InspectionServiceTest.java Parādīt failu

AddInspectionRequest request = new AddInspectionRequest(); AddInspectionRequest request = new AddInspectionRequest();
request.setInspectionType(1); request.setInspectionType(1);
request.setAirportId(1); request.setAirportId(1);
request.setAirportName("禄口-2022112501");
// request.setAirportName("禄口-2022112501");
request.setInspectionLine(1); request.setInspectionLine(1);
JSONObject json = (JSONObject) JSONObject.toJSON(request); JSONObject json = (JSONObject) JSONObject.toJSON(request);
log.info("-----> 新增任务请求参数:json={}", json); log.info("-----> 新增任务请求参数:json={}", json);
request.setId("1f2ed1f784eb36165785d5235350ef7d"); request.setId("1f2ed1f784eb36165785d5235350ef7d");
request.setInspectionType(2); request.setInspectionType(2);
request.setAirportId(1); request.setAirportId(1);
request.setAirportName("禄口1");
// request.setAirportName("禄口1");
request.setInspectionLine(1); request.setInspectionLine(1);
request.setInspectionLineName("路线11");
// request.setInspectionLineName("路线11");
request.setIsLive(1); request.setIsLive(1);
request.setStartLatitude("11"); request.setStartLatitude("11");
request.setStartLongitude("11"); request.setStartLongitude("11");

Notiek ielāde…
Atcelt
Saglabāt