diff --git a/src/main/java/externalsystem/nxrp/web/NxrpController.java b/src/main/java/externalsystem/nxrp/web/NxrpController.java index 52702d7a..952ed41a 100644 --- a/src/main/java/externalsystem/nxrp/web/NxrpController.java +++ b/src/main/java/externalsystem/nxrp/web/NxrpController.java @@ -1,10 +1,14 @@ package externalsystem.nxrp.web; +import java.util.HashMap; +import java.util.Map; + import javax.servlet.http.HttpServletRequest; import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.bind.annotation.ResponseBody; import cokr.xit.foundation.web.AbstractController; @@ -13,11 +17,29 @@ import cokr.xit.foundation.web.AbstractController; public class NxrpController extends AbstractController { @RequestMapping(name="세외수입 연계", value="/ltis") - public ModelAndView conn(HttpServletRequest req) { - - ModelAndView mav = new ModelAndView("jsonView"); + @ResponseBody + public String conn(HttpServletRequest req, @RequestBody HashMap map) { + String returnStr = "{}"; String customHeader_ifId = req.getHeader("if_id"); + String customHeader_src_org_cd = req.getHeader("src_org_cd"); + String customHeader_src_sys_cd = req.getHeader("src_sys_cd"); + + Map head = (Map)map.get("head"); + + String ifDate = head.get("ifDate"); + String ifMsgKey = head.get("ifMsgKey"); + String ifId = head.get("ifId"); + String source = head.get("source"); + String target = head.get("target"); + String ifType = head.get("ifType"); + String ifFormat = head.get("ifFormat"); + String retName = head.get("retName"); + String retCode = head.get("retCode"); + + Map body = (Map)map.get("body"); + Map reqVo = (Map)body.get("reqVo"); + if(customHeader_ifId.equals("ERR_Z000012LGS_1741000NIS_0011")) { // 특화 b-11 과태료 대장 목록 조회 } else if(customHeader_ifId.equals("ERR_Z000012LGS_1741000NIS_0012")) { //특화 b-12 과태료 대장 상세 조회 @@ -27,24 +49,9 @@ public class NxrpController extends AbstractController { } else if(customHeader_ifId.equals("ERR_Z000001LGE_1741000NIS_0002")) { //개별 a03 과태료 대장 등록 자료 상세 조회 } - String customHeader_src_org_cd = req.getHeader("src_org_cd"); - String customHeader_src_sys_cd = req.getHeader("src_sys_cd"); - - - String head = req.getParameter("head"); - String ifDate; - String ifMsgKey; - String ifId; - String source; - String target; - String ifType; - String ifFormat; - String retName; - String retCode; - - String body = req.getParameter("body"); + //returnStr = toJson(someObj); - return mav; + return returnStr; } }