diff --git a/src/main/java/cokr/xit/fims/payer/service/PayerService.java b/src/main/java/cokr/xit/fims/payer/service/PayerService.java index 9b846197..f9df43c9 100644 --- a/src/main/java/cokr/xit/fims/payer/service/PayerService.java +++ b/src/main/java/cokr/xit/fims/payer/service/PayerService.java @@ -5,6 +5,7 @@ import java.util.List; import cokr.xit.fims.payer.Payer; import cokr.xit.fims.payer.PayerQuery; import cokr.xit.foundation.data.DataObject; +import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtRequest; import cokr.xit.interfaces.lvis.service.reg.BasicInfoRequest; /**납부자 대장 관리 서비스 인터페이스. @@ -72,6 +73,12 @@ public interface PayerService { */ Payer getVehicleOwner(BasicInfoRequest req); + /**주어진 조건의 차량 및 소유자(납부자) 정보를 반환한다. + * @param req 자동차 기본정보 조회 조건 + * @return 차량 및 소유자(납부자) 정보 + */ + Payer getVehicleOwner(BasicInfoExtRequest req); + /**지정한 조건에 따라 납부자 대장 정보를 반환한다.
* @param req 납부자 대장 조회 조건 * @return 납부자 대장 정보 diff --git a/src/main/java/cokr/xit/fims/payer/service/bean/PayerServiceBean.java b/src/main/java/cokr/xit/fims/payer/service/bean/PayerServiceBean.java index f5b756b3..ffa89e29 100644 --- a/src/main/java/cokr/xit/fims/payer/service/bean/PayerServiceBean.java +++ b/src/main/java/cokr/xit/fims/payer/service/bean/PayerServiceBean.java @@ -11,6 +11,7 @@ import cokr.xit.fims.payer.PayerQuery; import cokr.xit.fims.payer.service.PayerService; import cokr.xit.foundation.component.AbstractServiceBean; import cokr.xit.foundation.data.DataObject; +import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtRequest; import cokr.xit.interfaces.lvis.service.reg.BasicInfoRequest; /**납부자 대장 서비스 구현체. @@ -66,6 +67,12 @@ public class PayerServiceBean extends AbstractServiceBean implements PayerServic return !payers.isEmpty() ? payers.get(0) : null; } + @Override + public Payer getVehicleOwner(BasicInfoExtRequest req) { + List payers = payerBean.getVehicleOwners(req); + return !payers.isEmpty() ? payers.get(0) : null; + } + @Override public DataObject getPayerInfo(PayerQuery req) { if (req.getCallPurpose() == null) { diff --git a/src/main/java/cokr/xit/fims/payer/web/PayerController.java b/src/main/java/cokr/xit/fims/payer/web/PayerController.java index 1a26a349..9aadc17f 100644 --- a/src/main/java/cokr/xit/fims/payer/web/PayerController.java +++ b/src/main/java/cokr/xit/fims/payer/web/PayerController.java @@ -18,6 +18,7 @@ import cokr.xit.fims.payer.PayerQuery; import cokr.xit.fims.payer.service.PayerService; import cokr.xit.fims.task.Task; import cokr.xit.foundation.data.DataObject; +import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtRequest; import cokr.xit.interfaces.lvis.service.reg.BasicInfoRequest; /**납부자 서비스의 웹 컨트롤러 @@ -112,14 +113,35 @@ public class PayerController extends ApplicationController { @Task("CMN") @PostMapping(name = "차량/납부자 조회", value = "/vehicle.do") - public ModelAndView getVehicleOwner(BasicInfoRequest req) { - Payer payer = payerService.getVehicleOwner(req); + public ModelAndView getVehicleOwner(HttpServletRequest hreq) { + Payer payer = null; + + if(1 == 1) { //TODO:행공센연계여부 + BasicInfoExtRequest req = new BasicInfoExtRequest(); + req.setInqire_se_code(hreq.getParameter("inqire_se_code")); + req.setLevy_stdde(hreq.getParameter("levy_stdde")); + req.setVhrno(hreq.getParameter("vhrno")); + req.setVin(hreq.getParameter("vin")); + payer = payerService.getVehicleOwner(req); + } else { + BasicInfoRequest req = new BasicInfoRequest(); + req.setSggCd(hreq.getParameter("sggCd")); + req.setInqire_se_code(hreq.getParameter("inqire_se_code")); + req.setLevy_stdde(hreq.getParameter("levy_stdde")); + req.setOwner_mber_no(hreq.getParameter("owner_mber_no")); + req.setVhrno(hreq.getParameter("vhrno")); + req.setVin(hreq.getParameter("vin")); + payer = payerService.getVehicleOwner(req); + } + boolean found = payer != null; - return new ModelAndView("jsonView") - .addObject("found", found) - .addObject("rtpyrId", found ? payer.getRtpyrId() : null) - .addObject("addrSn", found ? payer.getAddrSn() : null) - .addObject("vehicle", found ? payer.getVehicleInfo() : null); + + ModelAndView mav = new ModelAndView("jsonView"); + mav.addObject("found", found); + mav.addObject("rtpyrId", found ? payer.getRtpyrId() : null); + mav.addObject("addrSn", found ? payer.getAddrSn() : null); + mav.addObject("vehicle", found ? payer.getVehicleInfo() : null); + return mav; } /**납부자 정보를 반환한다.