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