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 425121e6..7391def5 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 @@ -442,20 +442,6 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv for(int i=0; i < targetDataList.size(); i++) { - CrdnCvlcpt crdnCvlcpt = new CrdnCvlcpt(); - crdnCvlcpt.setCvlcptLinkId(targetDataList.get(i).string("CVLCPT_LINK_ID")); - if(processType.equals("answerExecute")) { - crdnCvlcpt.setCvlcptTrsmCd("04"); - if(ifEmpty(targetDataList.get(i).string("CVLCPT_PRCS_RSLT_CN"), () -> "").equals("")) { - String answerWords = crdnCvlcptMainBean.mappingAnswerWords(targetDataList.get(i).string("CRDN_ID"), currentUserInstitute, currentUserAcnt); - crdnCvlcpt.setCvlcptPrcsRsltCn(answerWords); - } - } else if(processType.equals("answerComplete")){ - crdnCvlcpt.setCvlcptTrsmCd("09"); - } else { - return false; - } - //단속상태 변경(차적조회완료 -> 부과대상) if(targetDataList.get(i).string("CRDN_STTS_CD").equals("21")) { CrdnSttsHstry crdnSttsHstry = new CrdnSttsHstry(); @@ -471,6 +457,20 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv } } + CrdnCvlcpt crdnCvlcpt = new CrdnCvlcpt(); + crdnCvlcpt.setCvlcptLinkId(targetDataList.get(i).string("CVLCPT_LINK_ID")); + if(processType.equals("answerExecute")) { + crdnCvlcpt.setCvlcptTrsmCd("04"); + if(ifEmpty(targetDataList.get(i).string("CVLCPT_PRCS_RSLT_CN"), () -> "").equals("")) { + String answerWords = crdnCvlcptMainBean.mappingAnswerWords(targetDataList.get(i).string("CRDN_ID"), currentUserInstitute, currentUserAcnt); + crdnCvlcpt.setCvlcptPrcsRsltCn(answerWords); + } + } else if(processType.equals("answerComplete")){ + crdnCvlcpt.setCvlcptTrsmCd("09"); + } else { + throw new RuntimeException("민원 전송 상태 변경에 실패하였습니다."); + } + int effected = crdnCvlcptMapper.updateAnswerTargetTransmitStatus(crdnCvlcpt); if(effected != 1) { throw new RuntimeException("민원 전송 상태 변경 중 오류가 발생하였습니다.");