whycxzp
2022-08-11 32a59d44469685e6a7665e21fc2411a2260b80c1
更新散装件审批
1个文件已修改
16 ■■■■ 已修改文件
src/main/java/com/whyc/service/ComponentApprovingService.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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 @@
        //遍历解压后的文件夹路径,解析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);
            //查询到xls数据
@@ -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();