From 0b665277ed853441046e52f47f08afadffdc647b Mon Sep 17 00:00:00 2001 From: leebj Date: Wed, 17 Jul 2024 18:18:37 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BB=A4=EB=B0=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/adds/nims/web/AddsNimsController.java | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java b/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java index e605eb3..3a5f7f9 100644 --- a/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java +++ b/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java @@ -260,6 +260,12 @@ public class AddsNimsController extends ApplicationController { return setCollectionInfo(new ModelAndView("jsonView"), dsuseMgtDocService.getDsuseMgtDocList(query),"",""); } + @RequestMapping(value = "/getHwpForRptDoc.do", name="보고문서 출력 상세 목록 조회", produces = "application/json;charset=UTF-8") + public ModelAndView getHwpForRptDoc(@ModelAttribute NimsApiRequest.DsuseMgtInqReq dto) { + return null; + + } + @RequestMapping(value="/makeDisposeResultReportHwp.do", name="폐기결과보고서 HWP파일 생성") public ModelAndView makeDisposeResultReportHwp(String dtls) { ModelAndView mav = new ModelAndView(); @@ -631,13 +637,27 @@ public class AddsNimsController extends ApplicationController { ApiBaseResponse> parse = json.parse(rslt, new TypeReference<>() {}); + List respData = parse.getData(); + List dataForRptdoc = new ArrayList<>(); + for(JSONObject mgtMaster : respData) { + List mgtDetails = (List)mgtMaster.get("dsuseMgtDtls"); + String[] keys = mgtMaster.keySet().toArray(new String[mgtMaster.keySet().size()]); + mgtDetails.stream().map((detail)->{ + for(String key : keys) { + if(key.equals("dsuseMgtDtls")) { + continue; + } + if(key.equals("bsshNm") || key.equals("bsshCd")){ + detail.put(key+"0", mgtMaster.get(key)); + } + } + return detail; + }).toList(); - - - - + dataForRptdoc.addAll(mgtDetails); + } return parse; }