파일압축 라이브러리 제거

main
이범준 7 months ago
parent c471ff80df
commit 31b442e563

@ -150,14 +150,6 @@
<version>0.5</version>
</dependency>
<!-- 파일압축 라이브러리 -->
<dependency>
<groupId>net.lingala.zip4j</groupId>
<artifactId>zip4j</artifactId>
<version>2.11.5</version>
</dependency>
<!-- 바코드 관련 -->
<dependency>
<groupId>com.google.zxing</groupId>

@ -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();

@ -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<fileList.length; i++) {
fileNameList[i] = fileList[i].getPath();
}
zipFile.close();
ZIP zip = new ZIP();
zip.compress(zipFilePath, fileNameList);
for(File file : fileList) {
if(!file.delete()) {
@ -536,6 +538,15 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService
}
}
String ESB_Folder_Path = JobConf.get().getDir("send")+"/"+JobConf.get().getDirCode("lntris");
if(!new File(ESB_Folder_Path).exists()) {
new File(ESB_Folder_Path).mkdirs();
}
File src = new File(zipFilePath);
File dst = new File(ESB_Folder_Path+"/"+linkFileMaker.getZipFileName());
src.renameTo(dst);
Crdn crdn = new Crdn();
crdn.setCrdnId(crdnID);
crdn.setModifiedBy(currentUser().getId());

Loading…
Cancel
Save