From fe0bd7214ebb6defb709c1be6cd13c1a6aa824cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E5=B5=A9?= Date: Tue, 28 Mar 2023 10:04:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91OTA=E5=A4=87=E6=A1=88?= =?UTF-8?q?=E5=B7=A5=E5=85=B7-=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/OtaBaCxAqcsServiceImpl.java | 62 ++- .../service/impl/OtaBaCxJbxxServiceImpl.java | 76 +-- .../impl/OtaBaCxJsfzbacsServiceImpl.java | 513 +++++++++--------- .../impl/OtaBaCxKsjxtmccsServiceImpl.java | 3 + .../impl/OtaBaCxZxsjyqServiceImpl.java | 98 ++-- 5 files changed, 381 insertions(+), 371 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java index 1cdd57027..63696717d 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java @@ -239,45 +239,47 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl attList = JSONArray.parseArray(attStr, AttachmentEO.class); - if (ObjectUtils.isNotEmpty(attList)) { - for (AttachmentEO aeo : attList) { - List ossFileList = ossFileService.getFileInfos(aeo.getId()); - for (OSSFile ossFile : ossFileList) { - String filePath = ossFile.getUrl(); - boolean b = CosBootUtil.doesObjectExist(filePath); - if (b) { - InputStream download = CosBootUtil.download(filePath); - ImportFileUtil.writeToLocal(attFile.getCanonicalPath() + "/" + ossFile.getFileName(), download); - sb.append(ossFile.getFileName()).append(","); + StringBuilder sb = new StringBuilder(); + String attStr = aqcs.getZmcl(); + List attList = JSONArray.parseArray(attStr, AttachmentEO.class); + if (ObjectUtils.isNotEmpty(attList)) { + for (AttachmentEO aeo : attList) { + List ossFileList = ossFileService.getFileInfos(aeo.getId()); + for (OSSFile ossFile : ossFileList) { + String filePath = ossFile.getUrl(); + boolean b = CosBootUtil.doesObjectExist(filePath); + if (b) { + InputStream download = CosBootUtil.download(filePath); + ImportFileUtil.writeToLocal(attFile.getCanonicalPath() + "/" + ossFile.getFileName(), download); + sb.append(ossFile.getFileName()).append(","); + } } } } + cell.setCellValue(sb.toString()); } - cell.setCellValue(sb.toString()); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJbxxServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJbxxServiceImpl.java index 282f53525..34087c8b7 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJbxxServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJbxxServiceImpl.java @@ -239,45 +239,47 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl sjmkList = OtaBaCxSjmkService.queryByOtaId(otaId); - int startRow = 63; - for (OtaBaCxSjmk sjmk : sjmkList) { - row = s.getRow(startRow); - cell = row.createCell(0); - cell.setCellValue(sjmk.getBjmc()); - cell = row.createCell(1); - cell.setCellValue(ImportFileUtil.getCellValueYesOrNo(sjmk.getPzqk())); - cell = row.createCell(2); - cell.setCellValue(sjmk.getKzqmc()); - cell = row.createCell(3); - cell.setCellValue(sjmk.getYjggxh()); - cell = row.createCell(4); - cell.setCellValue(sjmk.getYjscqy()); - cell = row.createCell(5); - cell.setCellValue(sjmk.getRjbb()); - cell = row.createCell(6); - cell.setCellValue(sjmk.getRjkfqy()); - cell = row.createCell(7); - cell.setCellValue(sjmk.getBzwz()); - startRow++; + List sjmkList = OtaBaCxSjmkService.queryByOtaId(otaId); + int startRow = 63; + for (OtaBaCxSjmk sjmk : sjmkList) { + row = s.getRow(startRow); + cell = row.createCell(0); + cell.setCellValue(sjmk.getBjmc()); + cell = row.createCell(1); + cell.setCellValue(ImportFileUtil.getCellValueYesOrNo(sjmk.getPzqk())); + cell = row.createCell(2); + cell.setCellValue(sjmk.getKzqmc()); + cell = row.createCell(3); + cell.setCellValue(sjmk.getYjggxh()); + cell = row.createCell(4); + cell.setCellValue(sjmk.getYjscqy()); + cell = row.createCell(5); + cell.setCellValue(sjmk.getRjbb()); + cell = row.createCell(6); + cell.setCellValue(sjmk.getRjkfqy()); + cell = row.createCell(7); + cell.setCellValue(sjmk.getBzwz()); + startRow++; + } } - } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjxtmccsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjxtmccsServiceImpl.java index f4f3d2c04..843ec4da0 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjxtmccsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjxtmccsServiceImpl.java @@ -365,6 +365,9 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl attList = JSONArray.parseArray(attStr, AttachmentEO.class); - if (ObjectUtils.isNotEmpty(attList)) { - for (AttachmentEO aeo : attList) { - List ossFileList = ossFileService.getFileInfos(aeo.getId()); - for (OSSFile ossFile : ossFileList) { - String filePath = ossFile.getUrl(); - boolean b = CosBootUtil.doesObjectExist(filePath); - if (b) { - InputStream download = CosBootUtil.download(filePath); - ImportFileUtil.writeToLocal(attFile.getCanonicalPath() + "/" + ossFile.getFileName(), download); - sb.append(ossFile.getFileName()).append(","); + row = s.getRow(2); + cell = row.getCell(3); + StringBuilder sb = new StringBuilder(); + String attStr = otaBaCxZxsjyq.getZmcl(); + List attList = JSONArray.parseArray(attStr, AttachmentEO.class); + if (ObjectUtils.isNotEmpty(attList)) { + for (AttachmentEO aeo : attList) { + List ossFileList = ossFileService.getFileInfos(aeo.getId()); + for (OSSFile ossFile : ossFileList) { + String filePath = ossFile.getUrl(); + boolean b = CosBootUtil.doesObjectExist(filePath); + if (b) { + InputStream download = CosBootUtil.download(filePath); + ImportFileUtil.writeToLocal(attFile.getCanonicalPath() + "/" + ossFile.getFileName(), download); + sb.append(ossFile.getFileName()).append(","); + } } } } + cell.setCellValue(sb.toString()); } - cell.setCellValue(sb.toString()); } }