diff --git a/src/main/java/cokr/xit/fims/crdn/dao/CrdnUpdtMapper.java b/src/main/java/cokr/xit/fims/crdn/dao/CrdnUpdtMapper.java index 36ab7c6c..f7ff3459 100644 --- a/src/main/java/cokr/xit/fims/crdn/dao/CrdnUpdtMapper.java +++ b/src/main/java/cokr/xit/fims/crdn/dao/CrdnUpdtMapper.java @@ -12,6 +12,11 @@ import cokr.xit.foundation.component.AbstractMapper; */ @Mapper("crdnUpdtMapper") public interface CrdnUpdtMapper extends AbstractMapper { + /**단속 상태를 변경한다. + * @param crdn 단속 대장 + * @return 저장된 정보수 + */ + int updateCrdnStatus(Crdn crdn); /**표지정보 미확인 자료를 확인 자료로 수정한다. * @param crdn 단속 대장 diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngBean.java index 6f0f9dea..76dc11bc 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngBean.java @@ -153,6 +153,9 @@ public class CrdnStngBean extends AbstractComponent { } else if(taskSeCd.equals("ECA")) { + query.setAmtDcsnCdGroupId("FIM061"); + query.setAmtDcsnCd(crdn.getVltnCd()); + int ffnlgCrdnAmt = Integer.parseInt(ifEmpty(globalStngMapper.selectBasicAmt(query), () -> "0")); amt[0] = ffnlgCrdnAmt; amt[1] = (int)(ffnlgCrdnAmt * 0.8); diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/ImportBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/ImportBean.java index cc804b33..f3114ffc 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/ImportBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/ImportBean.java @@ -209,7 +209,7 @@ public class ImportBean extends AbstractComponent { CrdnCvlcpt cvlcpt = new CrdnCvlcpt(); cvlcpt.setCvlcptLinkId(petition.getInterfaceSeqN()); - cvlcpt.setDstrbncYn("03".equals(violation.getCode()) ? "Y" : "N"); + cvlcpt.setDstrbncYn("N"); String rcptYmd = parseDate.apply(petition.getAncRegD()); if (rcptYmd != null && rcptYmd.length() >= 8) cvlcpt.setCvlcptRcptYmd(rcptYmd.substring(0, 8)); diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn05Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn05Controller.java index 13629820..63f785e9 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn05Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn05Controller.java @@ -101,7 +101,8 @@ public class Crdn05Controller extends ApplicationController { switch(urlTaskSeCd) { case "PVS" -> { vltnByTask = "WEB002"; } case "BPV" -> { vltnByTask = "FIM005"; } - case "DPV","ECA" -> { vltnByTask = "FIM006"; } + case "DPV" -> { vltnByTask = "FIM006"; } + case "ECA" -> { vltnByTask = "FIM061"; } } Map> commonCodes = getCodesOf("FIM011","FIM053","LVS005",vltnByTask); mav.addObject("FIM011List", commonCodes.get("FIM011")); 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 1c98b427..5848236b 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 @@ -147,7 +147,7 @@ public class CrdnCvlcptBean extends AbstractComponent { crdnQuery.setAnsSeCd("3"); crdnQuery.setAnsRsnCd("3"+dataInfo.string("VLTN_CD")); - if(dataInfo.string("DSTRBNC_YN").equals("Y")) { + if(crdnQuery.getAnsRsnCd().equals("301") && dataInfo.string("DSTRBNC_YN").equals("Y")) { crdnQuery.setDstrbncYn("Y"); } @@ -216,10 +216,8 @@ public class CrdnCvlcptBean extends AbstractComponent { Petition petition = new Petition(); petition.setInterfaceSeqN(cvlcptInfo.string("CVLCPT_LINK_ID")); //민원연계키 - petition.setSysGubunC("EC010008"); //시스템 구분 --> ex)EC010008 과태료시스템 - String APLY_NSTT_CD = cvlcptInfo.string("PETI_ANC_CODE_V"); - petition.setAncCodeV(APLY_NSTT_CD); //기관 코드(신청기관코드) - petition.setPetiAncCodeV(APLY_NSTT_CD); //민원 기관 코드(최초신청기관코드) + petition.setSysGubunC("EC010008"); //시스템 구분("EC010008") + petition.setPetiAncCodeV(cvlcptInfo.string("PETI_ANC_CODE_V")); //민원 기관 코드(최초신청기관코드) petition.setPetiGubunC(isSendBack ? "140" : "180"); //민원구분 petition.setSendYnC(isSendBack? "1" : "2"); // 송신 여부 @@ -229,20 +227,23 @@ public class CrdnCvlcptBean extends AbstractComponent { petition.setPetiTitleV(cvlcptInfo.string("CVLCPT_APLY_TTL_NM")); //민원제목 petition.setCivilGistV(cvlcptInfo.string("CVLCPT_GIST")); //민원요지 petition.setCivilAbstractL(cvlcptInfo.string("CVLCPT_PRCS_SUMRY")); //민원 처리 요약 - petition.setPcdDeptV(cvlcptInfo.string("CVLCPT_PRCS_DEPT_CD")); //처리 부서 코드(7자리) + petition.setAncCodeV(cvlcptInfo.string("CVLCPT_PRCS_NSTT_CD")); //기관 코드 + petition.setPcdDeptV(cvlcptInfo.string("CVLCPT_PRCS_DEPT_CD")); //처리 부서 코드 + petition.setPcdAncCodeV(cvlcptInfo.string("CVLCPT_PRCS_DEPT_CD")); //민원 실 처리 기관 코드 petition.setPcdDeptNmV(cvlcptInfo.string("CVLCPT_PRCS_DEPT_NM")); //민원 처리 부서명 petition.setDutyIdV(cvlcptInfo.string("CVLCPT_PRCS_PIC_NM")); //민원 처리 담당자 명 petition.setPcdEmailV(cvlcptInfo.string("CVLCPT_PRCS_PIC_EMAIL")); //담당자 이메일 petition.setPcdTelV(cvlcptInfo.string("CVLCPT_PRCS_PIC_TELNO")); //담당자 전화번호 petition.setPcdRstContL(cvlcptInfo.string("CVLCPT_PRCS_RSLT_CN")); //민원 처리 결과 petition.setDoRegD(cvlcptInfo.string("CVLCPT_PRCS_CMPTN_DT")); //민원 처리 완료 일자 - petition.setPcdAncCodeV(cvlcptInfo.string("CVLCPT_PRCS_")); //민원 실 처리 기관 코드 - petition.setPcdRstContAttachYnC("N"); //민원 처리 결과 첨부 여부 + petition.setRegD((new SimpleDateFormat("yyyyMMddHHmmss")).format(new Date())); // 등록 일자 - petition.setPcdGubunV("");// 처리 구분1? - petition.setPcdGubun2V("");// 처리 구분2? - petition.setPcdGubun3V("");//처리 구분3? + //not use + petition.setPcdRstContAttachYnC("N"); //민원 처리 결과 첨부 여부 + petition.setPcdGubunV(""); //처리 구분1 + petition.setPcdGubun2V("");//처리 구분2 + petition.setPcdGubun3V("");//처리 구분3 //DB --> XML petition.setApplyGubunC("N"); //완료구분 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 ecf0ed52..ea6526d2 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 @@ -304,9 +304,47 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv throw new RuntimeException("반송 처리 중 단속민원답변 수정에 실패하였습니다."); } + boolean result = crdnCvlcptBean.insertTransmitInfo(true, crdnInfo.string("CVLCPT_LINK_ID")); + if (!result) { + throw new RuntimeException("반송 처리 중 전송자료 등록에 실패하였습니다."); + } + } + + //단속상태를 변경한다. + Crdn crdn = new Crdn(); + crdn.setCrdnId(crdnId); + crdn.setCrdnSttsCd("81"); + saved = crdnUpdtMapper.updateCrdnStatus(crdn) == 1 ? true : false; + if (!saved) { + throw new RuntimeException("반송처리 중 단속상태변경에 실패하였습니다."); } - //TODO : 단속상태변경? + //부과제외 대장을 등록 한다. + Excl01 excl01 = new Excl01(); + excl01.setSggCd(globalStngMapper.selectSggCdForCurrentUser()); + excl01.setTaskSeCd(crdnInfo.string("TASK_SE_CD")); + excl01.setCrdnId(crdnInfo.string("CRDN_ID")); + excl01.setLevyExclYmd((new SimpleDateFormat("yyyyMMdd")).format(new Date())); + excl01.setLevyExclSeCd("1"); + excl01.setLevyExclRsnCd("191"); + excl01.setEtcCn("이송(이첩)"); + saved = excl01Bean.createLevyExcl(excl01); + if (!saved) { + throw new RuntimeException("반송처리 중 부과제외 대장 등록에 실패하였습니다."); + } + + //단속상태 변경 이력 기록 + CrdnSttsHstry crdnSttsHstry = new CrdnSttsHstry(); + crdnSttsHstry.setCrdnId(crdnId); + crdnSttsHstry.setBfrSttsCd(crdnInfo.string("CRDN_STTS_CD")); + crdnSttsHstry.setBfrSttsChgDt(crdnInfo.string("CRDN_STTS_CHG_DT")); + crdnSttsHstry.setCrdnSttsCd("81"); + crdnSttsHstry.setTaskDtlId(excl01.getLevyExclId()); + crdnSttsHstry.setEtcCn("이송(이첩)"); + saved = crdnSttsHstryMapper.insert(crdnSttsHstry); + if (!saved) { + throw new RuntimeException("반송 처리 중 단속상태이력 등록에 실패하였습니다."); + } return saved; } @@ -351,7 +389,7 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv crdnQuery.setSggCd(globalStngMapper.selectSggCdForCurrentUser()); crdnQuery.setTaskSeCd(crdn.getTaskSeCd()); crdnQuery.setAnsRsnCd(ansRsnCd); - if(ifEmpty(crdnCvlcpt.getDstrbncYn(), () -> "").equals("Y")) { + if(crdn.getVltnCd().equals("01") && ifEmpty(crdnCvlcpt.getDstrbncYn(), () -> "").equals("Y")) { crdnQuery.setDstrbncYn("Y"); } diff --git a/src/main/java/cokr/xit/fims/cvlc/web/Cvlc01Controller.java b/src/main/java/cokr/xit/fims/cvlc/web/Cvlc01Controller.java index 29ed9096..a835945b 100644 --- a/src/main/java/cokr/xit/fims/cvlc/web/Cvlc01Controller.java +++ b/src/main/java/cokr/xit/fims/cvlc/web/Cvlc01Controller.java @@ -148,7 +148,8 @@ public class Cvlc01Controller extends ApplicationController { switch(urlTaskSeCd) { case "PVS" -> { vltnByTask = "WEB002"; } case "BPV" -> { vltnByTask = "FIM005"; } - case "DPV","ECA" -> { vltnByTask = "FIM006"; } + case "DPV" -> { vltnByTask = "FIM006"; } + case "ECA" -> { vltnByTask = "FIM061"; } } Map> commonCodes = getCodesOf("FIM011","FIM053","LVS005",vltnByTask); mav.addObject("FIM011List", commonCodes.get("FIM011")); diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn-updt-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn-updt-mapper.xml index 09b11ecc..473d8ed9 100644 --- a/src/main/resources/sql/mapper/fims/crdn/crdn-updt-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/crdn-updt-mapper.xml @@ -2,6 +2,16 @@ + + /* 단속 상태 수정(crdnUpdtMapper.updateCrdnStatus) */ + UPDATE TB_CRDN + SET MDFCN_DT = /* 수정일시 */ + , MDFR = #{modifiedBy} /* 수정자 */ + , CRDN_STTS_CD = #{crdnSttsCd} /* 단속 상태 */ + , CRDN_STTS_CHG_DT = /* 단속 상태 변경 일시 */ + WHERE CRDN_ID = #{crdnId} /* 단속 ID */ + + /* 단속정보 수정(crdnUpdtMapper.updateCrdn) */ UPDATE TB_CRDN diff --git a/src/main/resources/sql/mapper/fims/crdn/import-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/import-mapper.xml index 304011a3..60d2abc2 100644 --- a/src/main/resources/sql/mapper/fims/crdn/import-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/import-mapper.xml @@ -20,7 +20,8 @@ SELECT CASE WHEN A.SGG_CD = B.SGG_CD THEN A.SGG_CD ELSE 'DIFF' END SGG_CD