diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/ImportServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/ImportServiceBean.java index 99d735f6..4064a8c7 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/ImportServiceBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/ImportServiceBean.java @@ -1,6 +1,5 @@ package cokr.xit.fims.crdn.service.bean; -import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -40,18 +39,19 @@ public class ImportServiceBean extends AbstractServiceBean implements ImportServ if (crdns.isEmpty()) return 0; List intfSeqs = crdns.stream().map(Crdn::getLinkId).toList(); - Map> byInfoKey = fileBean.getFilesOf("010", intfSeqs.toArray(new String[intfSeqs.size()])).stream() - .collect(Collectors.groupingBy(FileInfo::getInfoKey)); + + List smgFileInfoList = fileBean.getFilesOf("010", intfSeqs.toArray(new String[intfSeqs.size()])); + Map> byInfoKey = smgFileInfoList.stream().collect(Collectors.groupingBy(FileInfo::getInfoKey)); for (Crdn crdn: crdns) { List files = byInfoKey.get(crdn.getLinkId()); - Iterator it = files.iterator(); - while(it.hasNext()){ - FileInfo n = it.next(); - if (n.getMimeType().startsWith("video")) { - it.remove(); - } - } + + for(FileInfo file : files) { + file.setInputStream(file.getInputStream()); //신규 인풋스트림 생성 + file.setUrl(""); //인터페이스 첨부파일정보 제거 + file.setPath(""); //국민신문고 첨부파일정보 제거 + } + crdn.setCvlcptLinkYn("Y"); crdnBean.create(null, crdn, files); }