From f3ca021ef7f962ea8e30a7bd71276decb8b8545c Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq.com> Date: 星期一, 16 六月 2025 10:38:34 +0800 Subject: [PATCH] 验收信息表导出修改 --- src/main/java/com/whyc/service/BomAcceptanceService.java | 21 +++++++-------------- 1 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/whyc/service/BomAcceptanceService.java b/src/main/java/com/whyc/service/BomAcceptanceService.java index c49e2f8..583416e 100644 --- a/src/main/java/com/whyc/service/BomAcceptanceService.java +++ b/src/main/java/com/whyc/service/BomAcceptanceService.java @@ -285,7 +285,6 @@ //缂栬緫澶氫釜鍥剧墖涓婁紶 public Response updatePartPic(List<MultipartFile> multipartFileList, int num) throws IOException { String rootFile = CommonUtil.getRootFile(); - rootFile=rootFile.replace("doc_file",""); QueryWrapper wrapper=new QueryWrapper(); wrapper.eq("num",num); wrapper.last("limit 1"); @@ -329,19 +328,10 @@ } String devRoot=rootFile.replace("doc_file", ""); List<String> devPicList=new ArrayList<>(); - if(bomAcceptance.getDevPicleft()!=null||!bomAcceptance.getDevPicleft().isEmpty()){ - devPicList.add(bomAcceptance.getDevPicleft()); - } - if(bomAcceptance.getDevPicright()!=null||!bomAcceptance.getDevPicright().isEmpty()){ - devPicList.add(bomAcceptance.getDevPicright()); - } - if(bomAcceptance.getDevPicfront()!=null||!bomAcceptance.getDevPicfront().isEmpty()){ - devPicList.add(bomAcceptance.getDevPicfront()); - } - if(bomAcceptance.getDevPicback()!=null||!bomAcceptance.getDevPicback().isEmpty()){ - devPicList.add(bomAcceptance.getDevPicback()); - } - + devPicList.add(bomAcceptance.getDevPicleft()); + devPicList.add(bomAcceptance.getDevPicfront()); + devPicList.add(bomAcceptance.getDevPicright()); + devPicList.add(bomAcceptance.getDevPicback()); String fileName="浜у搧楠屾敹淇℃伅璁板綍"; //鍒涘缓鍗曚釜sheet HSSFWorkbook wb = new HSSFWorkbook(); @@ -469,6 +459,9 @@ ByteArrayOutputStream byteArrayOut = null; for(int i=0;i<devPicList.size();i++){ String picUrl=devPicList.get(i); + if(picUrl.length()==0){ + continue; + } try { byteArrayOut = new ByteArrayOutputStream(); String path=devRoot+File.separator+picUrl; -- Gitblit v1.9.1