|
@@ -36,6 +36,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.core.io.ClassPathResource;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
@@ -492,12 +493,14 @@ public class PointCheckServiceImpl extends ServiceImpl<PointCheckDao, PointCheck
|
|
|
.in(PointCheckItemDo::getPointcheckid, excelData.getIds())).stream().collect(Collectors.groupingBy(PointCheckItemDo::getPointcheckid));
|
|
|
|
|
|
//3.获取点检记录模板
|
|
|
- String fullPath = pointCheckItemService.getExcelTempPath(excelData.getPagePartId(),excelData.getFileTemplateName());
|
|
|
+ // String fullPath = pointCheckItemService.getExcelTempPath(excelData.getPagePartId(),excelData.getFileTemplateName());
|
|
|
+
|
|
|
+ ClassPathResource classPathResource = new ClassPathResource("filetem/点检记录模板.xlsx");
|
|
|
|
|
|
XSSFWorkbook workbook =null;
|
|
|
|
|
|
try {
|
|
|
- InputStream fileInputStream = new FileInputStream(fullPath);
|
|
|
+ InputStream fileInputStream = classPathResource.getInputStream();
|
|
|
workbook = new XSSFWorkbook(fileInputStream);
|
|
|
XSSFSheet tempSheet = workbook.getSheetAt(0);
|
|
|
excelData.setStartIndex(0);
|