From 0bafc8f984cef7105b0f39c2fa53c5cfb324bc47 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Mon, 14 Aug 2023 15:40:01 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AF=BC=EC=9B=90=20=EC=A0=80=EC=9E=A5=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cokr/xit/fims/crdn/Crdn.java | 5 ++ .../cvlc/service/bean/CrdnCvlcptBean.java | 3 +- .../service/bean/CrdnCvlcptServiceBean.java | 77 +++++++++++++++++-- .../sql/mapper/fims/crdn/crdn-info-mapper.xml | 2 + .../mapper/fims/cvlc/crdnCvlcpt-mapper.xml | 15 ++-- .../WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp | 6 +- 6 files changed, 91 insertions(+), 17 deletions(-) diff --git a/src/main/java/cokr/xit/fims/crdn/Crdn.java b/src/main/java/cokr/xit/fims/crdn/Crdn.java index 75ee8ab1..3497e174 100644 --- a/src/main/java/cokr/xit/fims/crdn/Crdn.java +++ b/src/main/java/cokr/xit/fims/crdn/Crdn.java @@ -336,4 +336,9 @@ public class Crdn extends AbstractEntity { * 부과 제외 사유 코드 */ private String levyExclRsnCd; + + /** + * 부과 제외 일자 + */ + private String levyExclYmd; } diff --git a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptBean.java b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptBean.java index f8215aa2..33e71483 100644 --- a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptBean.java +++ b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptBean.java @@ -79,7 +79,8 @@ public class CrdnCvlcptBean extends AbstractComponent { */ public boolean updateCrdn(Map nonQueryRequest, Crdn crdn) { DataObject params = new DataObject(); - params.set("currentUser", currentUser()); + UserInfo userInfo = currentUser(); + params.set("currentUser", userInfo); params.set("crdn", crdn); for(String key : nonQueryRequest.keySet()){ params.set(key, nonQueryRequest.get(key)); diff --git a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java index f1339627..5613b6c2 100644 --- a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java +++ b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java @@ -18,8 +18,11 @@ import cokr.xit.base.file.FileInfo; import cokr.xit.base.file.service.FileQuery; import cokr.xit.base.file.service.bean.FileBean; import cokr.xit.fims.cmmn.CmmnUtil; +import cokr.xit.fims.cmmn.CrdnSttsHstry; +import cokr.xit.fims.cmmn.dao.CrdnSttsHstryMapper; import cokr.xit.fims.cmmn.hwp.AddingParagraphBetweenHWPFile; import cokr.xit.fims.cmmn.hwp.InsertingImageCell; +import cokr.xit.fims.cmmn.service.bean.CrdnSttsHstryBean; import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.dao.Crdn05Mapper; @@ -28,6 +31,7 @@ import cokr.xit.fims.crdn.dao.CrdnInfoMapper; import cokr.xit.fims.cvlc.CrdnCvlcpt; import cokr.xit.fims.cvlc.dao.CrdnCvlcptMapper; import cokr.xit.fims.cvlc.service.CrdnCvlcptService; +import cokr.xit.fims.excl.Excl01; import cokr.xit.fims.excl.service.bean.Excl01Bean; import cokr.xit.fims.sprt.Sprt; import cokr.xit.foundation.UserInfo; @@ -50,9 +54,15 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv @Resource(name="excl01Bean") private Excl01Bean excl01Bean; + @Resource(name="crdnSttsHstryBean") + private CrdnSttsHstryBean crdnSttsHstryBean; + @Resource(name = "crdnCvlcptMapper") private CrdnCvlcptMapper crdnCvlcptMapper; + @Resource(name = "crdnSttsHstryMapper") + private CrdnSttsHstryMapper crdnSttsHstryMapper; + @Resource(name="crdnInfoMapper") private CrdnInfoMapper crdnInfoMapper; @@ -288,7 +298,7 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv if(acceptType.equals("someAccept") || acceptType.equals("nonAccept")) { //일부수용,불수용 // 비부과(서손)사유가 민원 답변대상인가? 민원 답변 문구(TB_CVLCPT_ANS_WORDS) 대장에 답변 사유 코드가 존재한다면.. - if (!infoCvlcptAnsWords.string("ANS_WORDS_ID").equals("")) { + if (infoCvlcptAnsWords != null) { newCvlcptPrcsCd = "04"; // 민원 처리 코드 - 불수용(과태료 부과제외) newCvlcptTrsmCd = "01"; // 민원 전송 코드 - 전송 대상 } else { @@ -296,16 +306,21 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv newCvlcptTrsmCd = "03"; // 민원 전송 코드 - 비부과(서손)사유가 전송 미대상 } } else { //수용일 때 + if(infoCvlcptAnsWords == null) { + throw new RuntimeException("단속민원답변 수정에 실패하였습니다."); + } newCvlcptPrcsCd = "02"; // 민원 처리 코드 - 수용 newCvlcptTrsmCd = "01"; // 민원 전송 코드 - 전송 대상 } crdnCvlcpt.setCvlcptPrcsCd(newCvlcptPrcsCd); // 민원 처리 코드 - crdnCvlcpt.setCvlcptPrcsSumry(infoCvlcptAnsWords.string("PRCS_SUMRY")); // 민원 처리 요약 - crdnCvlcpt.setCvlcptPrcsRsltCn(infoCvlcptAnsWords.string("PRCS_RSLT_CN")); // 민원 처리 결과 내용 + if (infoCvlcptAnsWords != null) { + crdnCvlcpt.setCvlcptPrcsSumry(infoCvlcptAnsWords.string("PRCS_SUMRY")); // 민원 처리 요약 + crdnCvlcpt.setCvlcptPrcsRsltCn(infoCvlcptAnsWords.string("PRCS_RSLT_CN")); // 민원 처리 결과 내용 + } crdnCvlcpt.setCvlcptPrcsPic(UserInfo.current().getId()); // 민원 처리 담당자 crdnCvlcpt.setCvlcptTrsmCd(newCvlcptTrsmCd); // 민원 전송 코드 - //민원정보변경 + //민원처리정보 변경 retSuccess = crdnCvlcptBean.updateCvlcptPrcsSe(crdnCvlcpt); if (!retSuccess) { @@ -318,6 +333,7 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv } + int fileInsertEffected = 0; int fileDeleteEffected = 0; @@ -340,8 +356,8 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv //nonQueryRequest.put("changeAmountYn","Y"); //} - //단속상태 변경 - nonQueryRequest.put("changeAmountYn","Y"); + //단속상태값 변경 + nonQueryRequest.put("changeStatusYn","Y"); if(acceptType.equals("accept")) { if(!crdnInfo.string("CRDN_REG_SE_CD").equals("02") || Arrays.asList(new String[]{"04","05","06"}).contains(crdnInfo.string("CVLCPT_TRSM_CD"))) { @@ -358,8 +374,57 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv throw new RuntimeException("단속민원답변 수정에 실패하였습니다."); } + //부과 제외 대장 등록 + String dtlTaskId = ""; + if(acceptType.equals("someAccept") || acceptType.equals("nonAccept")) { //일부수용,불수용 + boolean retSuccess = false; + Excl01 excl01 = new Excl01(); + excl01.setCrdnId(crdn.getCrdnId()); + excl01.setSggCd(crdn.getSggCd()); + excl01.setTaskSeCd(crdn.getTaskSeCd()); + excl01.setLevyExclYmd(crdn.getLevyExclYmd()); + excl01.setLevyExclSeCd(crdn.getLevyExclSeCd()); + excl01.setLevyExclRsnCd(crdn.getLevyExclRsnCd()); + excl01.setEtcCn(crdn.getEtcCn()); + + retSuccess = excl01Bean.createLevyExcl(excl01); + if (!retSuccess) { + // 예외를 발생시켜서 오류메세지를 보내고 DB Rollback + throw new RuntimeException("부과제외 대장 등록에 실패하였습니다."); + } + + dtlTaskId = excl01.getLevyExclId(); + } else { + dtlTaskId = crdn.getCrdnId(); + } + + //단속정보변경 saved = crdnCvlcptBean.updateCrdn(nonQueryRequest, crdn); + if(!saved) { + throw new RuntimeException("단속민원답변 수정 중 단속정보변경에 실패하였습니다."); + } + + //단속상태 변경 이력 등록 + if(((String)nonQueryRequest.get("changeStatusYn")).equals("Y")) { + CrdnSttsHstry crdnSttsHstry = new CrdnSttsHstry(); + + crdnSttsHstry.setCrdnId(crdn.getCrdnId()); + crdnSttsHstry.setBfrSttsCd(crdnInfo.string("CRDN_STTS_CD")); + crdnSttsHstry.setBfrSttsChgDt(crdnInfo.string("CRDN_STTS_CHG_DT")); + crdnSttsHstry.setCrdnSttsCd(crdn.getCrdnSttsCd()); + crdnSttsHstry.setTaskDtlId(dtlTaskId); + if(crdn.getCrdnSttsCd().equals("81") || crdn.getCrdnSttsCd().equals("83")) { + crdnSttsHstry.setEtcCn("부과제외 대장 등록"); + } else { + crdnSttsHstry.setEtcCn("민원 요청 수용"); + } + + boolean retSuccess = crdnSttsHstryMapper.insert(crdnSttsHstry); + if(!retSuccess) { + throw new RuntimeException("단속민원답변 수정 중 단속상태변경 이력 등록에 실패하였습니다."); + } + } return saved; } diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn-info-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn-info-mapper.xml index c6e7a67d..13172e5d 100644 --- a/src/main/resources/sql/mapper/fims/crdn/crdn-info-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/crdn-info-mapper.xml @@ -89,6 +89,8 @@ /* 단속정보 조회(crdnInfoMapper.getCrdnInfo) */ SELECT C.CRDN_ID , C.CRDN_REG_SE_CD + , C.CRDN_STTS_CD + , C.CRDN_STTS_CHG_DT , C.LINK_TBL_NM , C.LINK_ID , CC.CVLCPT_LINK_ID diff --git a/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml b/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml index 303a4fe9..43523770 100644 --- a/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml +++ b/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml @@ -331,6 +331,7 @@ SELECT C.CRDN_ID -/* 민원답변문구 대장 객체 가져오기(crdnCvlcptMapper.selectCvlcptAnsWords) */ + - +
@@ -517,7 +517,7 @@ $(document).ready(function(){ if(!customValidate($("#frmEdit--${pageName} input"))) return; - var vhrno = document.getElementById("#vhrno--${pageName}"); + var vhrno = document.getElementById("vhrno--${pageName}"); var rtpyrNm = document.getElementById("rtpyrNm--${pageName}"); if(vhrno.value == ""){ @@ -905,7 +905,7 @@ $(document).ready(function(){ /************************************************************************** * 초기화 **************************************************************************/ - var clsForTask = $("#taskSeCd--${pageName}").val().toLowerCase(); + var clsForTask = "${taskSeCd}".toLowerCase(); //업무별 입력 항목 renderForTask('frmEdit--${pageName}', clsForTask);