whycxzp
2022-08-11 d058913d325f68ee9045ca92597fcd44c9727c7e
更新散装件审批
1个文件已修改
8 ■■■■■ 已修改文件
src/main/java/com/whyc/service/ProductBomApprovingService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/ProductBomApprovingService.java
@@ -158,17 +158,18 @@
                short lastCellNum = row2.getLastCellNum();
                for (int k = 2; k < lastRowNum+1; k++) {
                    ProductBomApproving bomApproving = new ProductBomApproving();
                    for (int j = 1; j < lastCellNum; j++) {
                    for (int j = 0; j < lastCellNum; j++) {
                        Row row = sheet.getRow(k);
                        Cell cell = row.getCell(j);
                        String cellValue = null;
                        Double cellValueInt = 0d;
                        if(j == 9){
                        if(j == 9 ||j== 0){
                            cellValueInt = cell.getNumericCellValue();
                        }else if(j!=15){
                            cellValue = cell.getStringCellValue();
                        }
                        switch (j){
                            case 0:{bomApproving.setId(cellValueInt.intValue());}break;
                            case 1:{bomApproving.setParentCode(cellValue);}break;
                            case 2:{bomApproving.setParentName(cellValue);}break;
                            case 3:{bomApproving.setParentModel(cellValue);}break;
@@ -374,8 +375,9 @@
                newBomList.addAll(approvingList);
            }
        });
        List<ProductBomApproving> collect = newBomList.stream().sorted(Comparator.comparing(ProductBomApproving::getId)).collect(Collectors.toList());
        String nextTitle = originalFilename.substring(0,originalFilename.lastIndexOf("."));
        return response.setIII(1,true,bomList,nextTitle,"解析完成");
        return response.setIII(1,true,collect,nextTitle,"解析完成");
    }
    private List<FileUrlDTO> getDwgList(List<String> fileList) {