ci로 휴대폰번호 조회 추가

main
이범준 8 months ago
parent 357040de7e
commit 985aac35a3

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Class-Path:

@ -0,0 +1,85 @@
/**
* Class Name : MemberCiReqVO.java
* Description :
* Version : 1.0
* Since : 2025. 04.07
* Author :
*
<pre>
</pre>
*/
package gtpa.brs.openapi.dao;
/**
* Class Name : MemberCiReqVO Class
* Description :
* Version : 1.0
* Since : 2025. 04.07
* Author :
*
<pre>
</pre>
*/
public class MemberCiReqVO {
private String insttNo; //기관 번호
private String insttCntcJobSe; //기관 업무 구분
private String mberCi; //회원CI
private String vhcleNo; //차량번호
public MemberCiReqVO() {
super();
// TODO Auto-generated constructor stub
}
public MemberCiReqVO(String insttNo, String insttCntcJobSe, String mberCi, String vhcleNo) {
super();
this.insttNo = insttNo;
this.insttCntcJobSe = insttCntcJobSe;
this.mberCi = mberCi;
this.vhcleNo = vhcleNo;
}
public String getInsttNo() {
return insttNo;
}
public void setInsttNo(String insttNo) {
this.insttNo = insttNo;
}
public String getInsttCntcJobSe() {
return insttCntcJobSe;
}
public void setInsttCntcJobSe(String insttCntcJobSe) {
this.insttCntcJobSe = insttCntcJobSe;
}
public String getMberCi() {
return mberCi;
}
public void setMberCi(String mberCi) {
this.mberCi = mberCi;
}
public String getVhcleNo() {
return vhcleNo;
}
public void setVhcleNo(String vhcleNo) {
this.vhcleNo = vhcleNo;
}
@Override
public String toString() {
return "{\"insttNo\":\"" + insttNo +
"\", \"insttCntcJobSe\":\"" + insttCntcJobSe +
"\", \"vhcleNo\":\"" + vhcleNo +
"\", \"mberCi\":\"" + mberCi + "\"}";
}
}

@ -0,0 +1,52 @@
/**
* Class Name : MemberCiResVO.java
* Description :
* Version : 1.0
* Since : 2025. 04.07
* Author :
*
<pre>
</pre>
*/
package gtpa.brs.openapi.dao;
/**
* Class Name : MemberCiResVO Class
* Description :
* Version : 1.0
* Since : 2025. 04.07
* Author :
*
<pre>
</pre>
*/
public class MemberCiResVO {
private String mobileNo; //회원_전화번호
public MemberCiResVO() {
super();
// TODO Auto-generated constructor stub
}
public MemberCiResVO(String mobileNo) {
super();
this.mobileNo = mobileNo;
}
public String getMobileNo() {
return mobileNo;
}
public void setMobileNo(String mobileNo) {
this.mobileNo = mobileNo;
}
@Override
public String toString() {
return "{\"mobileNo\":\"" + mobileNo+ "\"}";
}
}

@ -473,5 +473,13 @@ public interface GtpaBrsOpenapiService {
* @throws UnsupportedEncodingException
*/
String instVhcleSttusHist(Map<String, Object> phm) throws SQLException, Exception;
/**
*
* @param param
* @return
* @throws UnsupportedEncodingException
*/
Map selectMemberMobileInfo(Map param) throws SQLException, Exception;
}

@ -1,4 +1,4 @@
/**
/**
* Class Name : GtpaBrsOpenapiServiceImpl.java
* Description : (Mybatis)
* Version : 1.0
@ -1121,4 +1121,16 @@ public class GtpaBrsOpenapiServiceImpl extends EgovAbstractServiceImpl implement
// 1 is Success, 0 is fail
return res;
}
/**
*
* @param param
* @return
* @throws UnsupportedEncodingException
*/
@Override
public Map selectMemberMobileInfo(Map param) throws SQLException, Exception {
LOGGER.debug(param.toString());
return openapiDAO.selectMemberMobileInfo(param);
}
}

@ -287,4 +287,7 @@ public interface OpenapiMapper {
// 회원 번호 조회
HashMap<String, String> selectTbBrsMberConfirm(HashMap<String, String> param) throws SQLException, Exception;
//회원 휴대전화번호 조회
Map selectMemberMobileInfo(Map param) throws SQLException, Exception;
}

@ -0,0 +1,268 @@
/**
* Class Name : BrsMemberCiMobileController.java
* Description :
* Version : 1.0
* Since : 2025. 04.03
* Author :
*
<pre>
</pre>
*/
package gtpa.brs.openapi.web;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.ArrayList;
import egovframework.rte.fdl.property.EgovPropertyService;
//import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import gtpa.brs.openapi.service.GtpaBrsOpenapiService;
import gtpa.brs.openapi.common.BrsCommonMessage;
import gtpa.brs.openapi.dao.MemberCiReqVO;
import gtpa.brs.openapi.dao.MemberCiResVO;
import gtpa.brs.openapi.dao.MemberOneResVO;
import gtpa.brs.openapi.dao.ResponseJsonArrayVO;
import gtpa.brs.openapi.dao.ResponseJsonVO;
import javax.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springmodules.validation.commons.DefaultBeanValidator;
/**
* Class Name : BrsMemberCiMobileController Class
* Description :
* Version : 1.0
* Since : 2019. 04.16
* Author :
*
<pre>
</pre>
*/
@RestController
public class BrsMemberCiMobileController {
private static final Logger LOGGER = LoggerFactory.getLogger(BrsMemberCiMobileController.class);
/** GtpaBrsOpenapiService */
@Resource(name = "openapiService")
private GtpaBrsOpenapiService openapiService;
/** EgovPropertyService */
@Resource(name = "propertiesService")
protected EgovPropertyService propertiesService;
/** Validator */
@Resource(name = "beanValidator")
protected DefaultBeanValidator beanValidator;
private final static int SEQ_START = 0;
private final static int SEQ_END = 99999999;
protected static int iSequence = 0;
protected static Object objSequence = new Object();
/**
* ITF_BRS_I
*/
//ITF_BRS_I 사전등록 회원 휴대전화번호 요청 수신
@PostMapping("/member/ciMobile")
public ResponseJsonVO jsonMemberManychild(@ModelAttribute MemberCiReqVO param) { //클라이언트에서 JSON반식으로 데이터 요청
//SimpleDateFormat debugFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS ");
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
//String appr_dtm = debugFormat.format(new Date());
BrsCommonMessage cmmMsg = new BrsCommonMessage();
MemberCiResVO resData = new MemberCiResVO();
ResponseJsonVO resJson = new ResponseJsonVO();
final String sIFNo = "026"; //인터페이스 번호 eq.연계구분
LOGGER.info("[IF_BRS_"+sIFNo+"] /member/ciMobile > Param "+param.toString());
//TODO 변수 선언
final String sInsttNo = param.getInsttNo(); //기관 번호
final String sInsttCntcJobSe = param.getInsttCntcJobSe(); //기관 업무 구분
String sLogMno = sIFNo+"_"+dateFormat.format(new Date()).substring(0, 8); //세션 로그 관리번호
iSequence = 0; //초기값
//String resInsert = "";
String resUpdate = "";
String sqlException = "";
try
{
//TODO 로그 기록 IN
sLogMno = sLogMno+String.format("%08d", Integer.parseInt(openapiService.seqBrsBrsLog())); //세션 로그 관리번호
serviceBrsLogInsert(sLogMno,sInsttCntcJobSe,sInsttNo,"RequestJson : /member/ciMobile?"+param.toString());
//TODO 기본 파라미터 검증
if(param.getInsttNo() == null || "".equals(param.getInsttNo()) || "null".equals(param.getInsttNo()) || param.getInsttNo().length() > 12 ||
param.getInsttCntcJobSe() == null || "".equals(param.getInsttCntcJobSe()) || "null".equals(param.getInsttCntcJobSe()) || param.getInsttCntcJobSe().length() > 3 ||
param.getMberCi() == null || "".equals(param.getMberCi()) || "null".equals(param.getMberCi()) || param.getMberCi().length() > 90 ||
param.getVhcleNo() == null || "".equals(param.getVhcleNo()) || "null".equals(param.getVhcleNo()) || param.getVhcleNo().length() > 9 ){
//응답 오류메세지 전달
resJson.setResult("FAIL");
resJson.setResultCode("EC0001");
resJson.setResultMessage(cmmMsg.resultMessage(resJson.getResultCode()));
resJson.setData(null);
serviceBrsLogInsert(sLogMno,sInsttCntcJobSe,sInsttNo,"ResponseJson:"+resJson.toErrString());
LOGGER.info("[IF_BRS_"+sIFNo+"] "+resJson.getResult()+" > "+resJson.getResultCode()+"/"+resJson.getResultMessage());
return resJson;
}
//TODO 등록요청에 필요한 DB Select
//TODO DB Select 기관검증
HashMap<String, String> mInsttInfo = new HashMap<String, String>();
mInsttInfo.put("instt_no",sInsttNo); //기관번호
mInsttInfo = openapiService.selectTbBrsInsttInfo(mInsttInfo);
if(mInsttInfo == null || mInsttInfo.get("INSTT_NO").equals(sInsttNo) != true)
{
///응답 오류메세지 전달
resJson.setResult("FAIL");
resJson.setResultCode("ES0001");
resJson.setResultMessage(cmmMsg.resultMessage(resJson.getResultCode()));
resJson.setData(null);
serviceBrsLogInsert(sLogMno,sInsttCntcJobSe,sInsttNo,"ResponseJson:"+resJson.toErrString());
LOGGER.info("[IF_BRS_"+sIFNo+"] "+resJson.getResult()+" > "+resJson.getResultCode()+"/"+resJson.getResultMessage());
return resJson;
}
LOGGER.debug("[IF_BRS_"+sIFNo+"] openapiService.selectTbBrsInsttInfo : "+mInsttInfo.get("INSTT_NO")+"/"+
mInsttInfo.get("INSTT_NM")+"/"+
mInsttInfo.get("INSTT_CHRGE_SE")+"/"+
mInsttInfo.get("INSTT_CHRGE_DETAIL")+"/"+
mInsttInfo.get("HMPG")+"/"+
mInsttInfo.get("MNGR_NM")+"/"+
mInsttInfo.get("MNGR_CTTPC")+"/"+
mInsttInfo.get("REGIST_DT")+"/"+
mInsttInfo.get("REGISTER_ID")+"/"+
mInsttInfo.get("UPDT_DT")+"/"+
mInsttInfo.get("UPDUSR_ID") );
//TODO DB Select 기관운영검증
HashMap<String, String> mInsttOper = new HashMap<String, String>();
mInsttOper.put("instt_no",sInsttNo); //기관번호
mInsttOper.put("instt_cntc_job_se",sInsttCntcJobSe); //기관 연계 업무구분
mInsttOper.put("use_at","Y");
mInsttOper = openapiService.selectTbBrsInsttOperInfo(mInsttOper);
if(mInsttOper == null || sIFNo.equals(sInsttCntcJobSe) != true)
{
///응답 오류메세지 전달
resJson.setResult("FAIL");
resJson.setResultCode("ES0002");
resJson.setResultMessage(cmmMsg.resultMessage(resJson.getResultCode()));
resJson.setData(null);
serviceBrsLogInsert(sLogMno,sInsttCntcJobSe,sInsttNo,"ResponseJson:"+resJson.toErrString());
LOGGER.info("[IF_BRS_"+sIFNo+"] "+resJson.getResult()+" > "+resJson.getResultCode()+"/"+resJson.getResultMessage());
return resJson;
}
LOGGER.debug("[IF_BRS_"+sIFNo+"] openapiService.selectTbBrsInsttOperInfo : "+mInsttOper.get("INSTT_NO")+"/"+
mInsttOper.get("INSTT_CNTC_JOB_SE")+"/"+
mInsttOper.get("USE_AT")+"/"+
mInsttOper.get("REQUST_URL")+"/"+
mInsttOper.get("RSPNS_URL") );
//TODO 회원 전화번호 가져오기
HashMap<String, String> mMberCi = new HashMap<String, String>();
mMberCi.put("mber_ci",param.getMberCi()); //회원 필터 조건
mMberCi.put("vhcle_no",param.getVhcleNo()); //회원 필터 조건
Map mMberMobileInfo = openapiService.selectMemberMobileInfo(mMberCi);
if(mMberMobileInfo == null)
{
///응답 오류메세지 전달
resJson.setResult("FAIL");
resJson.setResultCode("ES9999");
resJson.setResultMessage("휴대전화번호가 없는 회원입니다.");
resJson.setData(null);
serviceBrsLogInsert(sLogMno,sInsttCntcJobSe,sInsttNo,"ResponseJson:"+resJson.toErrString());
LOGGER.info("[IF_BRS_"+sIFNo+"] "+resJson.getResult()+" > "+resJson.getResultCode()+"/"+resJson.getResultMessage());
return resJson;
}
resData.setMobileNo((String) mMberMobileInfo.get("MOBILE_NO"));
resJson.setResult("SUCCESS");
resJson.setResultCode("E0000");
resJson.setResultMessage("정상");
resJson.setData((Object)resData);
//TODO 로그 기록 OUT
serviceBrsLogInsert(sLogMno,sInsttCntcJobSe,sInsttNo,"ResponseJson:"+resJson.toString());
} catch(RuntimeException e) {
resJson.setResult("EXCEPTION");
resJson.setResultCode("EE9000");
resJson.setResultMessage(cmmMsg.resultMessage(resJson.getResultCode()));
resJson.setData(null);
serviceBrsLogInsert(sLogMno,sInsttCntcJobSe,sInsttNo,"RuntimeException:"+resJson.getResultCode()+"/"+resJson.getResultMessage()+"/"+e.getClass().getName());
LOGGER.error("[IF_BRS_"+sIFNo+"] "+resJson.getResult()+" > "+resJson.getResultCode()+"/"+resJson.getResultMessage()+"/"+e.getClass().getName());
LOGGER.error("[IF_BRS_"+sIFNo+"] /member/ciMobile RuntimeException : " + e);
return resJson;
} catch(Exception e) {
resJson.setResult("EXCEPTION");
resJson.setResultCode("EE9000");
resJson.setResultMessage(cmmMsg.resultMessage(resJson.getResultCode()));
resJson.setData(null);
serviceBrsLogInsert(sLogMno,sInsttCntcJobSe,sInsttNo,"Exception:"+resJson.getResultCode()+"/"+resJson.getResultMessage()+"/"+e.getClass().getName());
LOGGER.error("[IF_BRS_"+sIFNo+"] "+resJson.getResult()+" > "+resJson.getResultCode()+"/"+resJson.getResultMessage()+"/"+e.getClass().getName());
LOGGER.error("[IF_BRS_"+sIFNo+"] /member/ciMobile Exception : " + e);
return resJson;
}
LOGGER.info("[IF_BRS_"+sIFNo+"] /member/ciMobile > Response "+resJson);
return resJson;
}
/**
* .
*/
public String serviceBrsLogInsert(String sLogMno, String sInsttCntcJobSe, String sInsttNo, String requstMsssage)
{
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
HashMap<String, String> mLog = new HashMap<String, String>(); //리턴 응답값
mLog.put("brs_log_mno", sLogMno); //발행번호 채번
mLog.put("seq_no",getSeqNumber());
mLog.put("instt_cntc_job_se", sInsttCntcJobSe);
mLog.put("instt_no", sInsttNo);
mLog.put("request_dt", dateFormat.format(new Date()));
mLog.put("requst_msssage",requstMsssage);
//DB insert
String res = openapiService.insertTbBrsLog(mLog);
mLog.clear();
if("1".equals(res) != true)
{
LOGGER.debug("[IF_BRS_"+sInsttCntcJobSe+"] openapiService.insertTbBrsLog("+res+") >"+sLogMno+"/"+sInsttNo+"/"+sInsttCntcJobSe+"/"+requstMsssage);
}
return res;
}
/**
* 퀀 . (+1)
*/
public static String getSeqNumber() {
synchronized (objSequence) {
if (iSequence == SEQ_END)
iSequence = SEQ_START;
iSequence++;
return Integer.toString(iSequence);
}
}
}

@ -1603,8 +1603,8 @@
, TRIM(DGUARD.DECRYPT('ENC','COL',B.MBER_MOBLPHON_NO)) AS MBER_MOBLPHON_NO
, TRIM(NVL(C.SU_PBLMNG_PRKPLCE,'Y')) AS SU_PBLMNG_PRKPLCE
, TRIM(NVL(C.NAMSAN_PASMNY,'Y')) AS NAMSAN_PASMNY
, TRIM(NVL(C.NAMSAN_FFNLG,'Y')) AS NAMSAN_FFNLG
, TRIM(NVL(C.NAMSAN_PASMNY,'N')) AS NAMSAN_PASMNY
, TRIM(NVL(C.NAMSAN_FFNLG,'N')) AS NAMSAN_FFNLG
, TRIM(NVL(C.GREEN_TRNSPORT_FFNLG,'Y')) AS GREEN_TRNSPORT_FFNLG
, TRIM(NVL(C.JMP_SETLE_AGRE_TY,'N')) AS JMP_SETLE_AGRE_TY
@ -2423,4 +2423,15 @@
AND VHCLE_OWNER_CI = TRIM(#{vhcle_owner_ci})
AND VHCLE_STTUS_TY = '02'
</select>
<!-- 회원 휴대전화번호 조회 -->
<select id="selectMemberMobileInfo" parameterType="Map" resultType="Map">
SELECT DGUARD.DECRYPT('ENC', 'COL', A.mber_moblphon_no) as MOBILE_NO
FROM DBUSER_BRSPW.TB_BRS_MBER_INFO A
, DBUSER_BRSPW.TB_BRS_VHCLE_REGIST_INFO B
WHERE A.MBER_NO = B.MBER_NO
AND B.VHCLE_OWNER_CI = TRIM(#{mber_ci})
AND B.VHCLE_NO = #{vhcle_no}
group by mber_moblphon_no
</select>
</mapper>

@ -1,7 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<!-- 삭제 : xmlns="http://java.sun.com/xml/ns/javaee" -->
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID"
version="3.0">
<display-name>gtpa.brs.openapi</display-name>
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>

1
target/.gitignore vendored

@ -0,0 +1 @@
/classes/
Loading…
Cancel
Save