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; }