From 31b442e563d0a49d2c8e4a663e00452289c5d864 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Fri, 26 Apr 2024 10:40:44 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8C=8C=EC=9D=BC=EC=95=95=EC=B6=95=20?= =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EB=B8=8C=EB=9F=AC=EB=A6=AC=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 8 ------- .../xit/fims/cmmn/OutsourcingFileMaker.java | 8 +++---- .../crdn/service/bean/CrdnServiceBean.java | 21 ++++++++++++++----- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/pom.xml b/pom.xml index ca194eac..1754c410 100644 --- a/pom.xml +++ b/pom.xml @@ -150,14 +150,6 @@ 0.5 - - - - net.lingala.zip4j - zip4j - 2.11.5 - - com.google.zxing diff --git a/src/main/java/cokr/xit/fims/cmmn/OutsourcingFileMaker.java b/src/main/java/cokr/xit/fims/cmmn/OutsourcingFileMaker.java index b52804b1..f44e66c3 100644 --- a/src/main/java/cokr/xit/fims/cmmn/OutsourcingFileMaker.java +++ b/src/main/java/cokr/xit/fims/cmmn/OutsourcingFileMaker.java @@ -18,10 +18,10 @@ import java.util.Map; import org.egovframe.rte.fdl.string.EgovStringUtil; +import cokr.xit.base.file.ZIP; import cokr.xit.foundation.Downloadable; import cokr.xit.foundation.data.DataFormat; import cokr.xit.foundation.data.DataObject; -import net.lingala.zip4j.ZipFile; public class OutsourcingFileMaker { protected String printKorName; @@ -240,10 +240,8 @@ public class OutsourcingFileMaker { String zipFileName = yyyymmdd + printKorName + ".zip"; String zipFilePath = outsourcingResultPath + File.separator + zipFileName; - ZipFile zipFile = new ZipFile(zipFilePath); - zipFile.addFile(new File(metaFilePath)); - zipFile.addFolder(new File(imagesFolderPath)); - zipFile.close(); + ZIP zip = new ZIP(); + zip.compress(zipFilePath, metaFilePath, imagesFolderPath); metaFile.delete(); File[] images = imagesFolderPathFile.listFiles(); diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java index 3e178d15..63c9e1da 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java @@ -15,6 +15,7 @@ import org.springframework.stereotype.Service; import cokr.xit.base.code.CommonCode; import cokr.xit.base.code.service.bean.CodeBean; import cokr.xit.base.file.FileInfo; +import cokr.xit.base.file.ZIP; import cokr.xit.base.file.service.FileQuery; import cokr.xit.base.file.service.bean.FileBean; import cokr.xit.fims.cmmn.CmmnQuery; @@ -42,7 +43,7 @@ import cokr.xit.fims.sprt.dao.TotalInfoMapper; import cokr.xit.fims.sprt.service.bean.MediaBean; import cokr.xit.foundation.component.AbstractServiceBean; import cokr.xit.foundation.data.DataObject; -import net.lingala.zip4j.ZipFile; +import cokr.xit.interfaces.filejob.JobConf; @Service("crdnService") public class CrdnServiceBean extends AbstractServiceBean implements CrdnService { @@ -516,7 +517,6 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService } String zipFilePath = workPath + "/" + linkFileMaker.getZipFileName(); - ZipFile zipFile = new ZipFile(zipFilePath); File[] fileList = workFolder.listFiles(new FilenameFilter() { @Override @@ -524,11 +524,13 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService return !(name.toUpperCase().endsWith(".ZIP")); } }); - for(File file : fileList) { - zipFile.addFile(file); + String[] fileNameList = new String[fileList.length]; + for(int i=0; i