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