Browse Source

#poi版本问题解决

zhongwei
yang_shj 1 year ago
parent
commit
973fe5f096
  1. 23
      hzims-service/operational/pom.xml
  2. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/RunMonthReportServiceImpl.java
  3. 5
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/utils/ExcelUtil.java

23
hzims-service/operational/pom.xml

@ -69,11 +69,34 @@
<groupId>com.xuxueli</groupId> <groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId> <artifactId>xxl-job-core</artifactId>
</dependency> </dependency>
<!-- 导出功能 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.15</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.15</version>
</dependency>
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId> <artifactId>poi-ooxml-schemas</artifactId>
<version>3.15</version> <version>3.15</version>
</dependency> </dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-base</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-annotation</artifactId>
<version>3.2.0</version>
</dependency>
<!-- 由于poi使用的poi-ooxml-schemas是ooxml-schemas的精简版,所以在was服务器上导出Excel可能会报错--> <!-- 由于poi使用的poi-ooxml-schemas是ooxml-schemas的精简版,所以在was服务器上导出Excel可能会报错-->
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/RunMonthReportServiceImpl.java

@ -815,8 +815,8 @@ public class RunMonthReportServiceImpl extends ServiceImpl<RunMonthReportMapper,
if (StringUtil.isNotBlank(analyseDataTaosVO.getVal())) { if (StringUtil.isNotBlank(analyseDataTaosVO.getVal())) {
vo.setValue(Double.valueOf(analyseDataTaosVO.getVal())); vo.setValue(Double.valueOf(analyseDataTaosVO.getVal()));
} }
//vo.setName(signKeyMap.get(record.getSignage())); vo.setName(signKeyMap.get(record.getSignage()));
//vo.setSignage(record.getSignage()); vo.setSignage(record.getSignage());
vo.setTs(analyseDataTaosVO.getTs()); vo.setTs(analyseDataTaosVO.getTs());
runMonthReportDataVoList.add(vo); runMonthReportDataVoList.add(vo);
} }

5
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/utils/ExcelUtil.java

@ -2,15 +2,10 @@ package com.hnac.hzims.safeproduct.utils;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.EasyExcelFactory; import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelReader;
import com.alibaba.excel.event.AnalysisEventListener; import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.excel.metadata.BaseRowModel;
import com.alibaba.excel.write.handler.WriteHandler; import com.alibaba.excel.write.handler.WriteHandler;
import com.hnac.hzims.common.constant.CommonConstant;
import org.apache.poi.sl.usermodel.Sheet;
import org.apache.poi.ss.formula.functions.T; import org.apache.poi.ss.formula.functions.T;
import org.omg.CORBA_2_3.portable.OutputStream; import org.omg.CORBA_2_3.portable.OutputStream;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.File; import java.io.File;

Loading…
Cancel
Save