From 32a59d44469685e6a7665e21fc2411a2260b80c1 Mon Sep 17 00:00:00 2001 From: whycxzp <perryhsu@163.com> Date: 星期四, 11 八月 2022 17:28:35 +0800 Subject: [PATCH] 更新散装件审批 --- src/main/java/com/whyc/service/ComponentApprovingService.java | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/whyc/service/ComponentApprovingService.java b/src/main/java/com/whyc/service/ComponentApprovingService.java index aa84468..b157fcd 100644 --- a/src/main/java/com/whyc/service/ComponentApprovingService.java +++ b/src/main/java/com/whyc/service/ComponentApprovingService.java @@ -8,6 +8,7 @@ import com.whyc.pojo.DocUser; import com.whyc.util.ActionUtil; import com.whyc.util.CommonUtil; +import com.whyc.util.FileUtil; import com.whyc.util.Zip4jUtil; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.ss.usermodel.*; @@ -64,7 +65,7 @@ //閬嶅巻瑙e帇鍚庣殑鏂囦欢澶硅矾寰�,瑙f瀽excel System.out.println(filePath); List<String> fileList = new ArrayList<>(); - + fileList = FileUtil.getStaticFilePath(parentFile,fileList); for (int i = 0; i < fileList.size(); i++) { String fileTempUrl = fileList.get(i); //鏌ヨ鍒皒ls鏁版嵁 @@ -88,6 +89,11 @@ Row row3 = sheet.getRow(3); String productVersion = row3.getCell(5).getStringCellValue(); for (int l = 8; l < lastRowNum-1; l++) { + Cell cellTemp = sheet.getRow(l).getCell(1); + cellTemp.setCellType(Cell.CELL_TYPE_STRING); + if(cellTemp.getStringCellValue().equals("")){ + break; + } ComponentApproving approving = new ComponentApproving(); approving.setCreateDate(new Date()); @@ -98,9 +104,11 @@ int cellValueInt = 0; Double cellValueDouble = null; if(m == 3){ - cellValueDouble = cell.getNumericCellValue(); - DecimalFormat decimalFormat = new DecimalFormat("0"); - cellValue = decimalFormat.format(cellValueDouble); + //cellValueDouble = cell.getNumericCellValue(); + //DecimalFormat decimalFormat = new DecimalFormat("0"); + //cellValue = decimalFormat.format(cellValueDouble); + cell.setCellType(Cell.CELL_TYPE_STRING); + cellValue = cell.getStringCellValue(); } else if(m ==7){ cellValueDouble = cell.getNumericCellValue(); -- Gitblit v1.9.1