From 8ef747cecc9208c7b4de320faef0b57743b095f9 Mon Sep 17 00:00:00 2001 From: JoJH Date: Tue, 5 Nov 2024 10:11:41 +0900 Subject: [PATCH] =?UTF-8?q?=EB=82=A9=EB=B6=80=EC=9E=90=20=EC=88=98?= =?UTF-8?q?=EC=A0=95,=20=EB=82=A9=EB=B6=80=EC=9E=90=EC=A3=BC=EC=86=8C=20?= =?UTF-8?q?=EC=9D=B4=EB=A0=A5=20=EC=86=8C=EC=8A=A4=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cmmn/service/CrdnPayerHstryService.java | 6 +++- .../bean/CrdnPayerHstryServiceBean.java | 8 +++-- .../cvlc/service/bean/CrdnCvlcptSubBean.java | 29 ++++++------------- .../xit/fims/excl/web/Excl01Controller.java | 10 +++---- .../xit/fims/payer/web/PayerController.java | 8 +++-- 5 files changed, 30 insertions(+), 31 deletions(-) diff --git a/src/main/java/cokr/xit/fims/cmmn/service/CrdnPayerHstryService.java b/src/main/java/cokr/xit/fims/cmmn/service/CrdnPayerHstryService.java index 79b3b74c..cbea61bf 100644 --- a/src/main/java/cokr/xit/fims/cmmn/service/CrdnPayerHstryService.java +++ b/src/main/java/cokr/xit/fims/cmmn/service/CrdnPayerHstryService.java @@ -2,6 +2,7 @@ package cokr.xit.fims.cmmn.service; import java.util.List; +import cokr.xit.fims.cmmn.CrdnPayerAddrHstry; import cokr.xit.fims.cmmn.CrdnPayerHstry; import cokr.xit.fims.cmmn.CrdnPayerHstryQuery; import cokr.xit.foundation.data.DataObject; @@ -13,10 +14,12 @@ import cokr.xit.foundation.data.DataObject; *
  * ============ 변경 이력 ============
  * 2023-08-16	leebj 최초 작성
+ * 2024-11-05   JoJH 납부자 주소이력 수정
  * ================================
  * 
*/ public interface CrdnPayerHstryService { + /**지정한 조건에 따라 단속 납부자 이력 목록을 조회하여 반환한다. * @param req 단속 납부자 이력 조회 조건 * @return 단속 납부자 이력 목록 @@ -45,5 +48,6 @@ public interface CrdnPayerHstryService { *
  • 그렇지 않으면 false
  • * */ - boolean createHstryUpdateCrdnPayer(CrdnPayerHstry crdnPayerHstry); + boolean createHstryUpdateCrdnPayerAddr(CrdnPayerAddrHstry crdnPayerAddrHstry); + } \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/cmmn/service/bean/CrdnPayerHstryServiceBean.java b/src/main/java/cokr/xit/fims/cmmn/service/bean/CrdnPayerHstryServiceBean.java index cfa9c57f..9ddf8ede 100644 --- a/src/main/java/cokr/xit/fims/cmmn/service/bean/CrdnPayerHstryServiceBean.java +++ b/src/main/java/cokr/xit/fims/cmmn/service/bean/CrdnPayerHstryServiceBean.java @@ -6,6 +6,7 @@ import javax.annotation.Resource; import org.springframework.stereotype.Service; +import cokr.xit.fims.cmmn.CrdnPayerAddrHstry; import cokr.xit.fims.cmmn.CrdnPayerHstry; import cokr.xit.fims.cmmn.CrdnPayerHstryQuery; import cokr.xit.fims.cmmn.service.CrdnPayerHstryService; @@ -19,11 +20,13 @@ import cokr.xit.foundation.data.DataObject; *
      * ============ 변경 이력 ============
      * 2023-08-16	leebj 최초 작성
    + * 2024-11-05   JoJH 납부자 주소이력 수정
      * ================================
      * 
    */ @Service("crdnPayerHstryService") public class CrdnPayerHstryServiceBean extends AbstractServiceBean implements CrdnPayerHstryService { + /** 단속 납부자 이력 정보 Bean */ @Resource(name = "crdnPayerHstryBean") private CrdnPayerHstryBean crdnPayerHstryBean; @@ -44,7 +47,8 @@ public class CrdnPayerHstryServiceBean extends AbstractServiceBean implements Cr } @Override - public boolean createHstryUpdateCrdnPayer(CrdnPayerHstry crdnPayerHstry) { - return crdnPayerHstryBean.createHstryUpdateCrdnPayer(crdnPayerHstry); + public boolean createHstryUpdateCrdnPayerAddr(CrdnPayerAddrHstry crdnPayerAddrHstry) { + return crdnPayerHstryBean.createHstryUpdateCrdnPayerAddr(crdnPayerAddrHstry); } + } \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptSubBean.java b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptSubBean.java index c5d738dc..7eeeeebc 100644 --- a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptSubBean.java +++ b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptSubBean.java @@ -18,6 +18,7 @@ import cokr.xit.base.file.FileInfo.Relation; import cokr.xit.base.file.service.FileQuery; import cokr.xit.base.file.service.bean.FileBean; import cokr.xit.base.file.web.FileInfoFactory; +import cokr.xit.fims.cmmn.CrdnPayerAddrHstry; import cokr.xit.fims.cmmn.CrdnPayerHstry; import cokr.xit.fims.cmmn.CrdnSttsHstry; import cokr.xit.fims.cmmn.dao.CrdnPayerHstryMapper; @@ -244,29 +245,17 @@ public class CrdnCvlcptSubBean extends AbstractBean { throw new RuntimeException("단속민원답변 수정 중 단속정보변경에 실패하였습니다."); } - //단속 납부자 변경 이력 등록 - if(((String)nonQueryRequest.get("changePayerYn")).equals("Y")) { - CrdnPayerHstry crdnPayerHstry = new CrdnPayerHstry(); - - crdnPayerHstry.setCrdnId(crdn.getCrdnId()); - crdnPayerHstry.setRtpyrId(crdn.getRtpyrId()); - - boolean retSuccess = crdnPayerHstryMapper.insertCrdnPayerHstry(crdnPayerHstry); - if(!retSuccess) { - throw new RuntimeException("단속민원답변 수정 중 단속납부자변경 이력 등록에 실패하였습니다."); - } - } - //단속 납부자 주소 변경 이력 등록 - if(((String)nonQueryRequest.get("changePayerAddrYn")).equals("Y")) { - CrdnPayerHstry crdnPayerHstry = new CrdnPayerHstry(); + if(((String)nonQueryRequest.get("changePayerYn")).equals("Y") || + ((String)nonQueryRequest.get("changePayerAddrYn")).equals("Y")) { + CrdnPayerAddrHstry crdnPayerAddrHstry = new CrdnPayerAddrHstry(); - crdnPayerHstry.setCrdnId(crdn.getCrdnId()); - crdnPayerHstry.setRtpyrId(crdn.getRtpyrId()); - crdnPayerHstry.setAddrSn(crdn.getAddrSn()); + crdnPayerAddrHstry.setCrdnId(crdn.getCrdnId()); + crdnPayerAddrHstry.setRtpyrId(crdn.getRtpyrId()); + crdnPayerAddrHstry.setAddrSn(crdn.getAddrSn()); - boolean retSuccess = crdnPayerHstryMapper.insertCrdnPayerAddrHstry(crdnPayerHstry); - if(!retSuccess) { + int rtnNocs = crdnPayerHstryMapper.insertCrdnPayerAddrHstry(crdnPayerAddrHstry); + if(rtnNocs != 1) { throw new RuntimeException("단속민원답변 수정 중 단속납부자변경 이력 등록에 실패하였습니다."); } } diff --git a/src/main/java/cokr/xit/fims/excl/web/Excl01Controller.java b/src/main/java/cokr/xit/fims/excl/web/Excl01Controller.java index b319bd25..4571b954 100644 --- a/src/main/java/cokr/xit/fims/excl/web/Excl01Controller.java +++ b/src/main/java/cokr/xit/fims/excl/web/Excl01Controller.java @@ -197,11 +197,11 @@ public class Excl01Controller extends ApplicationController { addCodes(commonCodes, mav, "FIM021", "FIM022"); return mav - .addObject("callPurpose", req.getCallPurpose()) // 호출 용도 - .addObject("pageName", "excl01020") // jsp pageName - .addObject("prefixUrl", CLASS_URL) // prefixUrl - .addObject("FIM021List", commonCodes.get("FIM021")) // 부과 제외 구분 코드(LEVY_EXCL_SE_CD) - .addObject("FIM022List", commonCodes.get("FIM022")) // 부과 제외 사유 코드(LEVY_EXCL_RSN_CD) + .addObject("callPurpose", req.getCallPurpose()) // 호출 용도 + .addObject("pageName", "excl01020") // jsp pageName + .addObject("prefixUrl", CLASS_URL) // prefixUrl + .addObject("FIM021List", commonCodes.get("FIM021")) // 부과 제외 구분 코드(LEVY_EXCL_SE_CD) + .addObject("FIM022List", commonCodes.get("FIM022")) // 부과 제외 사유 코드(LEVY_EXCL_RSN_CD) .addObject("saveCallbackFuncName", hReq.getParameter("saveCallbackFuncName")) .addObject("savedCallbackFuncName", hReq.getParameter("savedCallbackFuncName")) ; 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 56e74ca7..19b1081f 100644 --- a/src/main/java/cokr/xit/fims/payer/web/PayerController.java +++ b/src/main/java/cokr/xit/fims/payer/web/PayerController.java @@ -35,6 +35,8 @@ import cokr.xit.interfaces.lvis.service.reg.BasicInfoRequest; @RequestMapping(name="납부자", value="/payer") public class PayerController extends ApplicationController { + public static final String CLASS_URL = "/payer"; + public class METHOD_URL { public static final String create = "/create.do" // 납부자 등록 @@ -158,16 +160,16 @@ public class PayerController extends ApplicationController { ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/payer/payer01020-info"); DataObject payerInfo = payerService.getPayerInfo(req); + mav.addObject("info", json ? payerInfo : toJson(payerInfo)); // View(jsp)에서 사용할 공통코드를 조회 - Map> commonCodes = getCodesOf("FIM011", "FIM014", "FIM054"); + Map> commonCodes = getCodesOf("FIM011", "FIM014"); return mav .addObject("pageName", "payer01020") // jsp pageName - .addObject("Info", json ? payerInfo : toJson(payerInfo)) + .addObject("prefixUrl", CLASS_URL) // prefixUrl .addObject("FIM011List", commonCodes.get("FIM011")) // 납부자 구분 코드(RTPYR_SE_CD) .addObject("FIM014List", commonCodes.get("FIM014")) // 납부자 상태 코드(RTPYR_STTS_CD) - .addObject("FIM054List", commonCodes.get("FIM054")) // 업무 구분 코드(TASK_SE_CD) ; }