whycxzp
2023-08-11 e2977d55d9338387a13478713a1f90fa3de3ae11
src/main/java/com/whyc/service/ProductService.java
@@ -182,7 +182,9 @@
                //存储图片信息及所在分页
                Map<Integer,PictureData> pictureDataMap = new HashMap<>();
                if(excelType == 1){ //.xls
                    List<HSSFShape> children = ((HSSFSheet) sheet).getDrawingPatriarch().getChildren();
                    HSSFPatriarch drawingPatriarch = ((HSSFSheet) sheet).getDrawingPatriarch();
                    if(drawingPatriarch!=null) {
                        List<HSSFShape> children = drawingPatriarch.getChildren();
                    for (HSSFShape child : children) {
                        HSSFPicture picture = (HSSFPicture)child;
                        HSSFPictureData pictureData = picture.getPictureData();
@@ -196,8 +198,11 @@
                        }
                    }
                }
                }
                else if(excelType == 2){ //.xlsx
                    List<XSSFShape> children = ((XSSFSheet) sheet).getDrawingPatriarch().getShapes();
                    XSSFDrawing drawingPatriarch = ((XSSFSheet) sheet).getDrawingPatriarch();
                    if(drawingPatriarch!=null) {
                        List<XSSFShape> children = drawingPatriarch.getShapes();
                    for (XSSFShape child : children) {
                        XSSFPicture picture = (XSSFPicture)child;
                        XSSFPictureData pictureData = picture.getPictureData();
@@ -211,6 +216,7 @@
                        }
                    }
                }
                }
                Set<Integer> pictureRowSet = new HashSet<>();
                if(!pictureDataMap.isEmpty()) {
                    pictureRowSet = pictureDataMap.keySet();