From a0fed7dfddc116fc68910f4804341b799b2cb237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E5=B5=A9?= Date: Thu, 8 Jun 2023 16:20:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9OTA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/ota/service/impl/OtaBaSjGnxtwhServiceImpl.java | 2 +- .../modules/ota/service/impl/OtaBaSjSjxtbhServiceImpl.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjGnxtwhServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjGnxtwhServiceImpl.java index 8dc9643e2..6abfcea2d 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjGnxtwhServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjGnxtwhServiceImpl.java @@ -141,7 +141,7 @@ public class OtaBaSjGnxtwhServiceImpl extends ServiceImpl oldYjbbList = otaBaSjSjxtbh.stream().map(OtaBaSjSjxtbh::getYjbb).distinct().collect(Collectors.toList()); List oldTempFileNameList = new ArrayList<>(); oldYjbbList.forEach(sjSjxtbh -> { - oldTempFileNameList.add(sjSjxtbh.replaceAll("见","") + ".docx"); + if (StringUtils.isNotEmpty(sjSjxtbh)) { + oldTempFileNameList.add(sjSjxtbh.replaceAll("见", "") + ".docx"); + } }); int tempFileIndex = 1; String tempFilePath = uploadPath + "tempFile" + "/" + otaId; File tempFile = new File(tempFilePath); - if(!tempFile.exists()){ + if (!tempFile.exists()) { tempFile.mkdirs(); } List tempFileNames = new ArrayList<>();