From 90148ba20aadc6facc6cce61d0dcedc92503caf6 Mon Sep 17 00:00:00 2001 From: whycxzp <perryhsu@163.com> Date: 星期三, 10 八月 2022 16:41:21 +0800 Subject: [PATCH] 更新散装件审批 --- src/main/java/com/whyc/service/ComponentApprovingService.java | 42 +----------------------------------------- 1 files changed, 1 insertions(+), 41 deletions(-) diff --git a/src/main/java/com/whyc/service/ComponentApprovingService.java b/src/main/java/com/whyc/service/ComponentApprovingService.java index 899de86..e6c0e26 100644 --- a/src/main/java/com/whyc/service/ComponentApprovingService.java +++ b/src/main/java/com/whyc/service/ComponentApprovingService.java @@ -81,7 +81,7 @@ String productModel = row2.getCell(5).getStringCellValue(); Row row3 = sheet.getRow(3); String productVersion = row3.getCell(5).getStringCellValue(); - for (int l = 9; l < lastRowNum-1; l++) { + for (int l = 8; l < lastRowNum-1; l++) { ProductBomApproving bomApproving = new ProductBomApproving(); bomApproving.setParentModel(productModel); bomApproving.setParentVersion(productVersion); @@ -101,14 +101,6 @@ } else if(m ==7){ cellValueDouble = cell.getNumericCellValue(); - if(cellValueDouble.equals(0d)){ - cellValue = ""; - }else{ - cellValue = cellValueDouble.toString(); - } - } - else if(m==8){ - cellValueDouble = cell.getNumericCellValue(); } else { cellValue = cell.getStringCellValue(); @@ -119,43 +111,11 @@ case 3:{bomApproving.setSubCode(cellValue);}break; case 4:{bomApproving.setSubName(cellValue);}break; case 5:{ - /*bomApproving.setSubModel(cellValue); - //鍒ゆ柇鍥剧焊鏌ョ湅鏄惁瀛樺湪 - bomApproving.setDwgExist(0); - String dwgFileName = cellValue+".dwg"; - for (int n = 0; n < dwgExistsList.size(); n++) { - FileUrlDTO fileUrlDTO = dwgExistsList.get(n); - if(dwgFileName.equals(fileUrlDTO.getFileName())){ - //瀛樺湪 - bomApproving.setDwgExist(1); - bomApproving.setDwgUrl(fileUrlDTO.getHttpFileUrl()); - break; - } - }*/ }break; case 6:{bomApproving.setMaterial(cellValue);}break; case 7:{bomApproving.setThickness(cellValue);}break; case 8:{bomApproving.setQuantity(cellValueDouble.intValue());}break; case 9:{bomApproving.setSurfaceDetail(cellValue);}break; - case 10:{bomApproving.setNotes(cellValue);}break; - case 11:{ - //鍥剧墖,浠�0寮�濮�,鍒板浘鐗噑ize涓烘 - int k = l-9; - if(k<allPictures.size()-1){ - PictureData pictureData = allPictures.get(k+1); - //鍥剧墖瀛樺偍 doc_file/product_approving/${username}/{dateFormat}/${timeStamp} - String suffix = pictureData.suggestFileExtension(); - String picturePath = filePath + File.separator + bomApproving.getSubModel() + "." + suffix; - String picturePathFront = "doc_file" + File.separator + "product_approving" + File.separator + user.getName() + File.separator + dateFormat + File.separator + timeStamp + File.separator + bomApproving.getSubModel() + "." + suffix; - byte[] data = pictureData.getData(); - FileOutputStream fileOutputStream = null; - File pictureFile = new File(picturePath); - fileOutputStream = new FileOutputStream(pictureFile); - fileOutputStream.write(data); - - bomApproving.setPictureUrl(picturePathFront); - } - }break; } } list.add(bomApproving); -- Gitblit v1.9.1