From 33464c2de8d86c3a5b685d13b2097b0a7683c203 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Wed, 13 Sep 2023 13:50:32 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8C=8C=EC=9D=BC=EB=B3=B5=EC=82=AC=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98(=EC=97=B0=EA=B3=84=EC=B2=A8=EB=B6=80?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EB=8B=A8=EC=86=8D=EC=B2=A8=EB=B6=80?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC)=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../crdn/service/bean/ImportServiceBean.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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); }