| | |
| | | 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; |
| | |
| | | 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) { |