From 87cb07d21a3eae3fa9e88c20d47f86dda19d1e49 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Wed, 23 Aug 2023 14:07:34 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AF=BC=EC=9B=90=EB=8B=B5=EB=B3=80=EC=99=84?= =?UTF-8?q?=EB=A3=8C=EC=8B=9C=20=EC=9D=B8=ED=84=B0=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=8A=A4=20=ED=85=8C=EC=9D=B4=EB=B8=94=20INSERT=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/cvlc/dao/CrdnCvlcptMapper.java | 6 ++ .../cvlc/service/bean/CrdnCvlcptBean.java | 62 ++++++++++++++++++- .../service/bean/CrdnCvlcptServiceBean.java | 7 +++ .../mapper/fims/cvlc/crdnCvlcpt-mapper.xml | 29 +++++++++ 4 files changed, 103 insertions(+), 1 deletion(-) diff --git a/src/main/java/cokr/xit/fims/cvlc/dao/CrdnCvlcptMapper.java b/src/main/java/cokr/xit/fims/cvlc/dao/CrdnCvlcptMapper.java index b6ec892a..54efa925 100644 --- a/src/main/java/cokr/xit/fims/cvlc/dao/CrdnCvlcptMapper.java +++ b/src/main/java/cokr/xit/fims/cvlc/dao/CrdnCvlcptMapper.java @@ -133,4 +133,10 @@ public interface CrdnCvlcptMapper extends AbstractMapper { */ int updateAnswerTargetTransmitStatus(CrdnCvlcpt crdnCvlcpt); + /**민원 연계 ID로 민원처리정보를 조회한다. + * @param cvlcptLinkId 민원 연계 ID + * @return 민원처리정보 + */ + DataObject selectCivilComplaintProcessInfo(String cvlcptLinkId); + } 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 8368f887..1c98b427 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 @@ -1,5 +1,7 @@ package cokr.xit.fims.cvlc.service.bean; +import java.text.SimpleDateFormat; +import java.util.Date; import java.util.Map; import javax.annotation.Resource; @@ -19,6 +21,8 @@ import cokr.xit.fims.cvlc.dao.CrdnCvlcptMapper; import cokr.xit.foundation.AbstractComponent; import cokr.xit.foundation.UserInfo; import cokr.xit.foundation.data.DataObject; +import cokr.xit.interfaces.smg.Petition; +import cokr.xit.interfaces.smg.service.bean.SmgSenderBean; /** 민원 관리 Bean * @author leebj @@ -26,6 +30,9 @@ import cokr.xit.foundation.data.DataObject; @Component("crdnCvlcptBean") public class CrdnCvlcptBean extends AbstractComponent { + @Resource(name="smgSenderBean") + protected SmgSenderBean smgSenderBean; + @Resource(name = "crdnCvlcptMapper") private CrdnCvlcptMapper crdnCvlcptMapper; @@ -193,5 +200,58 @@ public class CrdnCvlcptBean extends AbstractComponent { return joinWords; } - + /** 국민신문고 답변전송 인터페이스 테이블에 자료를 등록한다. + * @param isSendBack 반송여부, cvlcptLinkId 민원 연계 ID + * @return 저장 여부 + * + */ + public boolean insertTransmitInfo(boolean isSendBack, String cvlcptLinkId) { + + //민원처리정보 조회 + DataObject cvlcptInfo = crdnCvlcptMapper.selectCivilComplaintProcessInfo(cvlcptLinkId); + + //전송 인터페이스 테이블 등록 + 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.setPetiGubunC(isSendBack ? "140" : "180"); //민원구분 + petition.setSendYnC(isSendBack? "1" : "2"); // 송신 여부 + + petition.setPetiNoC(cvlcptInfo.string("CVLCPT_APLY_NO")); //민원 신청 번호 + petition.setCivilNoC(cvlcptInfo.string("CVLCPT_RCPT_NO"));//민원 접수 번호 + 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.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? + + //DB --> XML + petition.setApplyGubunC("N"); //완료구분 + petition.setSendD(""); //송신 일자 + petition.setApplyD(""); //적용 일자 + petition.setSendInterfaceSeqN("");//전송인터페이스키 + petition.setSendStatus("");//전송상태 + petition.setSendStatusMsg("");//전송상태메시지 + + return smgSenderBean.createReply(petition); + } } 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 3e8056ae..c32a5ff7 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 @@ -598,6 +598,13 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv } } + + if(processType.equals("answerExecute")) { + boolean result = crdnCvlcptBean.insertTransmitInfo(false,""); + if (!result) { + throw new RuntimeException("민원 전송 상태 변경 중 전송자료 등록에 실패하였습니다."); + } + } } return true; 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 2cca6b5d..eb442983 100644 --- a/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml +++ b/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml @@ -690,4 +690,33 @@ UPDATE TB_CRDN_CVLCPT WHERE CVLCPT_LINK_ID = #{cvlcptLinkId} + + \ No newline at end of file