diff --git a/pom.xml b/pom.xml index ef356fa..2f74d0f 100644 --- a/pom.xml +++ b/pom.xml @@ -50,6 +50,12 @@ xit-foundation 23.04.01-SNAPSHOT + + + cokr.xit.interfaces + xit-public-info + 23.04.01-SNAPSHOT + org.mariadb.jdbc diff --git a/src/main/java/cokr/xit/interfaces/lvis/dao/VehicleInfoMapper.java b/src/main/java/cokr/xit/interfaces/lvis/dao/VehicleInfoMapper.java index 862a797..bee9a68 100644 --- a/src/main/java/cokr/xit/interfaces/lvis/dao/VehicleInfoMapper.java +++ b/src/main/java/cokr/xit/interfaces/lvis/dao/VehicleInfoMapper.java @@ -7,6 +7,8 @@ import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.data.DataObject; +import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtRequest; +import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtResponse; import cokr.xit.interfaces.lvis.service.reg.BasicInfoRequest; import cokr.xit.interfaces.lvis.service.reg.BasicInfoResponse; @@ -54,4 +56,19 @@ public interface VehicleInfoMapper extends AbstractMapper { .set("bsno", bsno) ); } + + /**자동차 기본사항(연료제원 포함)을 반환한다. + * @param req + * @return + */ + List selectExtInfo(BasicInfoExtRequest req); + + /**자동차 기본사항 조회 로그를 등록한다. + * @param params 파라미터 + * + * @return 등록된 정보 수 + */ + int insertExtInfo(Map params); } \ No newline at end of file diff --git a/src/main/java/cokr/xit/interfaces/lvis/service/VehicleInfoService.java b/src/main/java/cokr/xit/interfaces/lvis/service/VehicleInfoService.java index 9c7d216..932d3f7 100644 --- a/src/main/java/cokr/xit/interfaces/lvis/service/VehicleInfoService.java +++ b/src/main/java/cokr/xit/interfaces/lvis/service/VehicleInfoService.java @@ -1,5 +1,7 @@ package cokr.xit.interfaces.lvis.service; +import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtRequest; +import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtResponse; import cokr.xit.interfaces.lvis.service.reg.BasicInfoRequest; import cokr.xit.interfaces.lvis.service.reg.BasicInfoResponse; import cokr.xit.interfaces.lvis.service.reg.CustodyTrgetRequest; @@ -33,6 +35,13 @@ public interface VehicleInfoService { */ BasicInfoResponse getBasicInfo(BasicInfoRequest req); + /**주어진 조건의 자동차 기본정보(연료제원 포함)를 반환한다.
+ * 이 메소드를 사용하려면 intf-conf 폴더의 gpki.conf, public-info.conf 파일을 구성해야 한다. + * @param req 자동차 기본정보(연료제원 포함) 조회 조건 + * @return 자동차 기본정보(연료제원 포함) + */ + BasicInfoExtResponse getBasicInfo(BasicInfoExtRequest req); + /**주어진 조건의 자동차 등록원부(갑)를 반환한다. * @param req 자동차 등록원부(갑) 조회 조건 * @return 자동차 등록원부(갑) diff --git a/src/main/java/cokr/xit/interfaces/lvis/service/bean/VehicleInfoBean.java b/src/main/java/cokr/xit/interfaces/lvis/service/bean/VehicleInfoBean.java index 3995b48..d98b881 100644 --- a/src/main/java/cokr/xit/interfaces/lvis/service/bean/VehicleInfoBean.java +++ b/src/main/java/cokr/xit/interfaces/lvis/service/bean/VehicleInfoBean.java @@ -11,7 +11,10 @@ import org.springframework.stereotype.Component; import cokr.xit.foundation.AbstractComponent; import cokr.xit.foundation.ApplicationException; import cokr.xit.foundation.data.DataObject; +import cokr.xit.foundation.data.JSON; import cokr.xit.interfaces.lvis.dao.VehicleInfoMapper; +import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtRequest; +import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtResponse; import cokr.xit.interfaces.lvis.service.reg.BasicInfoRequest; import cokr.xit.interfaces.lvis.service.reg.BasicInfoResponse; import cokr.xit.interfaces.lvis.service.reg.CustodyTrgetRequest; @@ -39,6 +42,8 @@ import cokr.xit.interfaces.lvis.service.seizure.seizure.AddAutoSeizureByEttffRet import cokr.xit.interfaces.lvis.service.seizure.seizure.FindAltrtvSeizureVhrnoReturn; import cokr.xit.interfaces.lvis.service.seizure.seizure.SeizureProxy; import cokr.xit.interfaces.lvis.service.types.WsRequestContext; +import cokr.xit.interfaces.publicinfo.ServiceClient; +import cokr.xit.interfaces.publicinfo.ServiceMessage; /**자동차관리 정보시스템(자망)과 연계하는 Bean * @author mjkhan @@ -70,8 +75,7 @@ public class VehicleInfoBean extends AbstractComponent { } log().debug("자동차 기본정보를 {}", (success ? "찾았습니다." : "찾지 못했습니다.")); - boolean keepLog = properties.getBoolean("lvis.log.basicInfo", false); - if (keepLog) { + if (keepLog()) { Map params = Map.of( "req", req, "info", result.getBasicInfo(), @@ -88,6 +92,10 @@ public class VehicleInfoBean extends AbstractComponent { } } + private boolean keepLog() { + return properties.getBoolean("lvis.log.basicInfo", false); + } + private void setRoadNameInfo(BasicInfoRequest req, BasicInfoResponse.BasicInfo basicInfo) { basicInfo.setSggCd(req.getSggCd()); DataObject roadNameInfo = vehicleInfoMapper.selectRoadNmAdres( @@ -129,6 +137,84 @@ public class VehicleInfoBean extends AbstractComponent { .toList(); } + /**주어진 조건의 자동차 기본정보(연료제원 포함)를 반환한다.
+ * 이 메소드를 사용하려면 intf-conf 폴더의 gpki.conf, public-info.conf 파일을 구성해야 한다. + * @param req 자동차 기본정보(연료제원 포함) 조회 조건 + * @return 자동차 기본정보(연료제원 포함) + */ + public BasicInfoExtResponse getBasicInfo(BasicInfoExtRequest req) { + req.setInfo_sys_id(stringProperty("lvis.info_sys.id")); + req.setInfo_sys_ip(stringProperty("lvis.info_sys.ip")); + req.setSigungu_code(stringProperty("lvis.sigungu.code")); + req.setCntc_info_code("AC1_AW0_76"); + req.setCharger_id(""); + req.setCharger_ip(stringProperty("lvis.charger.ip_adres")); + req.setCharger_nm(stringProperty("lvis.charger.nm")); + req.validate(); + if (lvisHost.isLocal()) + return getLocalExtInfo(req); + + JSON json = new JSON().configure(objectMapper -> + objectMapper.setPropertyNamingStrategy( + new JSON.CustomPropertyNames().customize(propertyName -> + "data".equals(propertyName) || "record".equals(propertyName) ? propertyName : propertyName.toUpperCase() + ) + ) + ); + + ServiceMessage.Response sresp = new ServiceClient() + .setConf("basic-info-ext") + .setJSON(json) + .request(req); + String body = sresp.getBody(); + + if (sresp.success()) { + String data = ServiceMessage.Support.peel(body); + BasicInfoExtResponse resp = json.parse(data, BasicInfoExtResponse.class); + + if (keepLog()) { + create(req, resp); + } + + return resp; + } else { + Throwable error = sresp.getError(); + if (error != null) + throw runtimeException(error); + else { + Map map = new JSON().parse(body, Map.class); + BasicInfoExtResponse resp = new BasicInfoExtResponse(); + resp.setError(map); + return resp; + } + } + } + + private BasicInfoExtResponse getLocalExtInfo(BasicInfoExtRequest req) { + List list = vehicleInfoMapper.selectExtInfo(req); +/* + boolean empty = list.isEmpty(); + BasicInfoExtResponse.ExtInfo extInfo = !empty ? list.get(0) : new BasicInfoExtResponse.ExtInfo(); + if (!empty) { + extInfo.setProcess_imprty_resn_code("00"); + } +*/ + BasicInfoExtResponse response = new BasicInfoExtResponse(); + response.setRecord(list); + return response; + } + + public void create(BasicInfoExtRequest req, BasicInfoExtResponse resp) { + DataObject params = new DataObject() + .set("req", req) + .set("resp", resp) + .set("currentUser", currentUser()); + + for (BasicInfoExtResponse.ExtInfo extInfo: resp.getRecord()) { + vehicleInfoMapper.insertExtInfo(params.set("info", extInfo)); + } + } + /**주어진 조건의 자동차 등록원부(갑)를 반환한다. * @param req 자동차 등록원부(갑) 조회 조건 * @return 자동차 등록원부(갑) diff --git a/src/main/java/cokr/xit/interfaces/lvis/service/bean/VehicleInfoServiceBean.java b/src/main/java/cokr/xit/interfaces/lvis/service/bean/VehicleInfoServiceBean.java index 2804b97..3ce8805 100644 --- a/src/main/java/cokr/xit/interfaces/lvis/service/bean/VehicleInfoServiceBean.java +++ b/src/main/java/cokr/xit/interfaces/lvis/service/bean/VehicleInfoServiceBean.java @@ -6,6 +6,8 @@ import org.springframework.stereotype.Service; import cokr.xit.foundation.component.AbstractServiceBean; import cokr.xit.interfaces.lvis.service.VehicleInfoService; +import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtRequest; +import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtResponse; import cokr.xit.interfaces.lvis.service.reg.BasicInfoRequest; import cokr.xit.interfaces.lvis.service.reg.BasicInfoResponse; import cokr.xit.interfaces.lvis.service.reg.CustodyTrgetRequest; @@ -34,6 +36,11 @@ public class VehicleInfoServiceBean extends AbstractServiceBean implements Vehic return vehicleInfoBean.getBasicInfo(req); } + @Override + public BasicInfoExtResponse getBasicInfo(BasicInfoExtRequest req) { + return vehicleInfoBean.getBasicInfo(req); + } + @Override public FrmrWlthReadngResponse getFrmrWlthReadng(FrmrWlthReadngRequest req) { return vehicleInfoBean.getFrmrWlthReadng(req); diff --git a/src/main/java/cokr/xit/interfaces/lvis/service/reg/BasicInfoExtRequest.java b/src/main/java/cokr/xit/interfaces/lvis/service/reg/BasicInfoExtRequest.java new file mode 100644 index 0000000..acca208 --- /dev/null +++ b/src/main/java/cokr/xit/interfaces/lvis/service/reg/BasicInfoExtRequest.java @@ -0,0 +1,48 @@ +package cokr.xit.interfaces.lvis.service.reg; + +import cokr.xit.foundation.Assert; +import lombok.Getter; +import lombok.Setter; + +/**자동차 기본정보(연료제원 포함) 조회 조건 + * @author mjkhan + */ +@Getter +@Setter +public class BasicInfoExtRequest { + /** 정보시스템ID */ + private String info_sys_id; + /** 정보시스템IP */ + private String info_sys_ip; + /** 시군구코드 */ + private String sigungu_code; + /** 연계정보코드 */ + private String cntc_info_code; + /** 담당자ID */ + private String charger_id; + /** 담당자IP */ + private String charger_ip; + /** 담당자명 */ + private String charger_nm; + /** 부과기준일 */ + private String levy_stdde; + /** 조회구분코드 */ + private String inqire_se_code; + /** 자동차등록번호 */ + private String vhrno; + /** 차대번호 */ + private String vin; + + public void validate() { + if (Assert.isEmpty(levy_stdde)) + throw new IllegalArgumentException("empty levy_stdde"); + if (Assert.isEmpty(vhrno) && Assert.isEmpty(vin)) + throw new IllegalArgumentException("empty vhrno, vin"); + if (!Assert.isEmpty(vhrno)) { + inqire_se_code = "3"; + } else { + if (!Assert.isEmpty(vin)) + inqire_se_code = "2"; + } + } +} \ No newline at end of file diff --git a/src/main/java/cokr/xit/interfaces/lvis/service/reg/BasicInfoExtResponse.java b/src/main/java/cokr/xit/interfaces/lvis/service/reg/BasicInfoExtResponse.java new file mode 100644 index 0000000..d35ffb9 --- /dev/null +++ b/src/main/java/cokr/xit/interfaces/lvis/service/reg/BasicInfoExtResponse.java @@ -0,0 +1,37 @@ +package cokr.xit.interfaces.lvis.service.reg; + +import java.util.List; +import java.util.Map; + +import lombok.Getter; +import lombok.Setter; + +/**자동차 기본정보(연료제원 포함) 조회 결과 + * @author mjkhan + */ +@Getter +@Setter +public class BasicInfoExtResponse { + private List record; + /** 연계결과코드 */ + private String cntc_result_code; + /** 연계결과상세 */ + private String cntc_result_dtls; + + private Map error; + + /**자동차 기본정보(연료제원 포함)조회 결과 상세 + * @author mjkhan + */ + @Getter + @Setter + public static class ExtInfo extends BasicInfoResponse.BasicInfo { + private static final long serialVersionUID = 1L; + /** 사용본거지전체주소 */ + private String usgsrhld_adres_full; + /** 연료소비율 */ + private String fuel_cnsmp_rt; + /** 전기복합연료소비율 */ + private String elcty_cmpnd_fuel_cnsmp_rt; + } +} \ No newline at end of file diff --git a/src/main/java/cokr/xit/interfaces/lvis/web/ApiController.java b/src/main/java/cokr/xit/interfaces/lvis/web/ApiController.java index 6541059..6e5d28e 100644 --- a/src/main/java/cokr/xit/interfaces/lvis/web/ApiController.java +++ b/src/main/java/cokr/xit/interfaces/lvis/web/ApiController.java @@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RestController; import cokr.xit.foundation.web.AbstractController; import cokr.xit.interfaces.lvis.service.VehicleInfoService; +import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtRequest; +import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtResponse; import cokr.xit.interfaces.lvis.service.reg.BasicInfoRequest; import cokr.xit.interfaces.lvis.service.reg.BasicInfoResponse; import cokr.xit.interfaces.lvis.service.reg.CustodyTrgetRequest; @@ -50,11 +52,25 @@ public class ApiController extends AbstractController { * } * @return 자동차 기본사항 */ - @RequestMapping(value = "/basicInfo", name = "자동차 기본사항 조회") + @PostMapping(value = "/basicInfo", name = "자동차 기본사항 조회") public BasicInfoResponse getBasicInfo(@RequestBody BasicInfoRequest req) { return service.getBasicInfo(req); } + /**자동차 기본사항을 조회한다. + * @param req 자동차 기본사항 조회를 위한 조건 + *
{
+	 *     "VIN": "차대번호",
+	 *     "VHRNO": "차량번호",
+	 *     "LEVY_STDDE": "부과기준일자"
+	 * }
+ * @return 자동차 기본사항 + */ + @PostMapping(value = "/basicInfoExt", name = "자동차 기본사항 조회") + public BasicInfoExtResponse getBasicInfo(@RequestBody BasicInfoExtRequest req) { + return service.getBasicInfo(req); + } + /**자동차 등록원부(갑)를 조회한다. * @param req 자동차 등록원부(갑) 조회를 위한 조건 *
{
@@ -69,7 +85,7 @@ public class ApiController extends AbstractController {
 	 * }
* @return 자동차 등록원부(갑) */ - @RequestMapping(value = "/frmrWlthReadng", name = "자동차 등록원부(갑) 조회") + @PostMapping(value = "/frmrWlthReadng", name = "자동차 등록원부(갑) 조회") public FrmrWlthReadngResponse getFrmrWlthReadng(@RequestBody FrmrWlthReadngRequest req) { return service.getFrmrWlthReadng(req); } @@ -87,7 +103,7 @@ public class ApiController extends AbstractController { * } * @return 자동차 등록원부(을) */ - @RequestMapping(value = "/scldgrReadng", name = "자동차 등록원부(을) 조회") + @PostMapping(value = "/scldgrReadng", name = "자동차 등록원부(을) 조회") public ScldgrReadngResponse getScldgrReadng(@RequestBody ScldgrReadngRequest req) { return service.getScldgrReadng(req); } @@ -102,7 +118,7 @@ public class ApiController extends AbstractController { * } * @return 압류내역 */ - @RequestMapping(value = "/seizureByVhrNo", name = "압류내역 조회") + @PostMapping(value = "/seizureByVhrNo", name = "압류내역 조회") public SeizureByVhrNoResponse getSeizureByVhrNo(@RequestBody SeizureByVhrNoRequest req) { return service.getSeizureByVhrNo(req); } @@ -152,7 +168,7 @@ public class ApiController extends AbstractController { * } * @return 대체 압류차량 정보 */ - @RequestMapping(value = "/altrtvSeizureVhrno", name = "대체 압류차량 조회") + @PostMapping(value = "/altrtvSeizureVhrno", name = "대체 압류차량 조회") public AltrtvSeizureVhrnoResponse getAltrtvSeizureVhrno(@RequestBody AltrtvSeizureVhrnoRequest req) { return service.getAltrtvSeizureVhrno(req); } @@ -164,7 +180,7 @@ public class ApiController extends AbstractController { * } * @return 대체 번호판 영치대상 정보 */ - @RequestMapping(value = "/custodyTrget", name = "번호판 영치대상 조회") + @PostMapping(value = "/custodyTrget", name = "번호판 영치대상 조회") public CustodyTrgetResponse getCustodyTrget(@RequestBody CustodyTrgetRequest req) { return service.getCustodyTrget(req); } @@ -179,7 +195,12 @@ public class ApiController extends AbstractController { map.put("messageId", "MSG50560"); map.put("messageName", "제공기관 구간 시스템 오류"); map.put("messageReason", "제공기관 구간 시스템 오류 : 기타 시스템 오류"); - map.put("exceptionStackTrace", ExceptionUtils.getStackTrace(rootCause(t))); + + Throwable cause = rootCause(t); + map.put("exceptionStackTrace", ExceptionUtils.getStackTrace(cause)); + + cause.printStackTrace(); + return map; } } \ No newline at end of file diff --git a/src/main/resources/intf-conf/gpki.conf b/src/main/resources/intf-conf/gpki.conf new file mode 100644 index 0000000..c0c18cb --- /dev/null +++ b/src/main/resources/intf-conf/gpki.conf @@ -0,0 +1,25 @@ +{ + "license": "C:\\GPKI\\Lic", /* 이용기관 GPKI API 라이센스 디렉토리 */ + + "charset": "UTF-8", /* 문자셋 */ + + "server": { + "local": "SVR1311000030", /* 이용기관 서버 CN */ + "targets": "SVR1500000015" /* 대상기관 서버인증서 아이디, 여러 개일 경우 컴마(,)로 구분 */ + }, + + "ldapUrl": "ldap://10.1.7.118:389/cn=", /* 대상기관 인증서 다운로드를 위한 행정망 LDAP URL */ + /*"ldapUrl": "ldap://152.99.57.127:389/cn=", 대상기관 인증서 다운로드를 위한 인터넷망 LDAP URL */ + "certDir": "C:\\GPKI\\Certificate\\class1", /* 서버 인증서, 키 저장 디렉토리 */ + + "env": { /* 이용기관 서버 인증서 */ + "certFile": "SVR1311000030_env.cer", + "privateKeyFile": "SVR1311000030_env.key", + "privateKeyPassword": "기후대기3395!" + }, + "sig": { /* 이용기관 서버 전자서명 */ + "certFile": "SVR1311000030_sig.cer", + "privateKeyFile": "SVR1311000030_sig.key", + "privateKeyPassword": "기후대기3395!" + } +} \ No newline at end of file diff --git a/src/main/resources/intf-conf/public-info.conf b/src/main/resources/intf-conf/public-info.conf new file mode 100644 index 0000000..2341a09 --- /dev/null +++ b/src/main/resources/intf-conf/public-info.conf @@ -0,0 +1,12 @@ +{ + "basic-info-ext": { /* 자동차 기본정보(연료제원 포함) 조회 설정 이름 */ + "apiKey": "59f26bf09ed196bfbd98210388c4c6ea9dd0f77bde3f35526f082647a305325b", /* 행정정보 공동이용 서비스가 발급한 api key */ + "apiUrl": "http://10.188.225.94:29001/piss/api/molit/SignguCarBassMatterInqireService", /* 서비스 api url */ + + "userServerId": "SVR1311000030", /* 이용기관 gpki server id */ + "providerServerId": "SVR1500000015", /* 보유기관 gpki server id */ + + "gpki": true, /* 데이터 암복호화 사용 여부 */ + "mock": false /* 보유기관 가상 데이터 사용 여부 */ + } +} \ No newline at end of file diff --git a/src/main/resources/intf-conf/xit-lvis.properties b/src/main/resources/intf-conf/xit-lvis.properties new file mode 100644 index 0000000..5e5cefa --- /dev/null +++ b/src/main/resources/intf-conf/xit-lvis.properties @@ -0,0 +1,34 @@ +#시군구코드(필수) +lvis.sigungu.code=28000 +#담당자 주민등록번호 +lvis.charger.ihinum= +#담당자 IP 어드레스 +lvis.charger.ip_adres= +#담당자명 +lvis.charger.nm=이광진 +#담당자 연락처 +lvis.charger.wrc_telno=032-440-3963 + +#정보시스템 ID(필수) +lvis.info_sys.id=28-230 +#정보시스템 IP(필수) +lvis.info_sys.ip=101.0.115.13 +#정보시스템 MAC 어드레스 +lvis.info_sys.macaddress=EC:EB:B8:97:F2:14 + +#암호화키 +lvis.enc.key=0BCE7F19897CEA91 +#암호화키 그룹 +lvis.enc.key_group=1 +#암호화키 번호 +lvis.enc.key_no=1 + +#lvis 사용 서비스 (production || test || local) +lvis.host.active=local +#lvis 운영 서비스 주소 +lvis.host.production=http://auto.car.go.kr:39700/lvis/services/WsFrontController +#lvis 테스트 서비스 주소 +lvis.host.test=http://10.98.198.199:9700/lvis/services/WsFrontController + +#자동차 기본사항 조회 로그 저장 여부(true || false) +lvis.log.basicInfo=true \ No newline at end of file diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml deleted file mode 100644 index e2e2826..0000000 --- a/src/main/resources/log4j2.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml new file mode 100644 index 0000000..d48c1d4 --- /dev/null +++ b/src/main/resources/logback.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + ${LOG_PATTERN} + + + + + ${LOG_PATH}/${LOG_FILE_NAME}.log + + ${LOG_PATTERN} + + + + + ${LOG_PATH}/${LOG_FILE_NAME}.%d{yyyy-MM-dd}_%i.log + + 10MB + + + 30 + + + + + + + error + ACCEPT + DENY + + + ${LOG_PATH}/${ERR_LOG_FILE_NAME}.log + + ${LOG_PATTERN} + + + + + ${LOG_PATH}/${ERR_LOG_FILE_NAME}.%d{yyyy-MM-dd}_%i.log + + + 10MB + + + 60 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/properties/xit-lvis.properties b/src/main/resources/properties/xit-lvis.properties deleted file mode 100644 index ce124c2..0000000 --- a/src/main/resources/properties/xit-lvis.properties +++ /dev/null @@ -1,34 +0,0 @@ -#\uc2dc\uad70\uad6c\ucf54\ub4dc(\ud544\uc218) -lvis.sigungu.code=28000 -#\ub2f4\ub2f9\uc790 \uc8fc\ubbfc\ub4f1\ub85d\ubc88\ud638 -lvis.charger.ihinum= -#\ub2f4\ub2f9\uc790 IP \uc5b4\ub4dc\ub808\uc2a4 -lvis.charger.ip_adres= -#\ub2f4\ub2f9\uc790\uba85 -lvis.charger.nm=\uc774\uad11\uc9c4 -#\ub2f4\ub2f9\uc790 \uc5f0\ub77d\ucc98 -lvis.charger.wrc_telno=032-440-3963 - -#\uc815\ubcf4\uc2dc\uc2a4\ud15c ID(\ud544\uc218) -lvis.info_sys.id=28-230 -#\uc815\ubcf4\uc2dc\uc2a4\ud15c IP(\ud544\uc218) -lvis.info_sys.ip=101.0.115.13 -#\uc815\ubcf4\uc2dc\uc2a4\ud15c MAC \uc5b4\ub4dc\ub808\uc2a4 -lvis.info_sys.macaddress=EC:EB:B8:97:F2:14 - -#\uc554\ud638\ud654\ud0a4 -lvis.enc.key=0BCE7F19897CEA91 -#\uc554\ud638\ud654\ud0a4 \uadf8\ub8f9 -lvis.enc.key_group=1 -#\uc554\ud638\ud654\ud0a4 \ubc88\ud638 -lvis.enc.key_no=1 - -#lvis \uc0ac\uc6a9 \uc11c\ube44\uc2a4 (production || test || local) -lvis.host.active=local -#lvis \uc6b4\uc601 \uc11c\ube44\uc2a4 \uc8fc\uc18c -lvis.host.production=http://auto.car.go.kr:39700/lvis/services/WsFrontController -#lvis \ud14c\uc2a4\ud2b8 \uc11c\ube44\uc2a4 \uc8fc\uc18c -lvis.host.test=http://10.98.198.199:9700/lvis/services/WsFrontController - -#\uc790\ub3d9\ucc28 \uae30\ubcf8\uc0ac\ud56d \uc870\ud68c \ub85c\uadf8 \uc800\uc7a5 \uc5ec\ubd80(true || false) -lvis.log.basicInfo=true \ No newline at end of file diff --git a/src/main/resources/spring/context-common.xml b/src/main/resources/spring/context-common.xml index 11e55da..d1dec5c 100644 --- a/src/main/resources/spring/context-common.xml +++ b/src/main/resources/spring/context-common.xml @@ -56,7 +56,7 @@ - + diff --git a/src/main/resources/sql/mapper/lvis/vehicleInfo-mapper.xml b/src/main/resources/sql/mapper/lvis/vehicleInfo-mapper.xml index 3c0c580..9be4f6a 100644 --- a/src/main/resources/sql/mapper/lvis/vehicleInfo-mapper.xml +++ b/src/main/resources/sql/mapper/lvis/vehicleInfo-mapper.xml @@ -182,11 +182,12 @@ SELECT PRYE , FRST_MXMM_LDG , PROCESS_IMPRTY_RESN_CODE , PROCESS_IMPRTY_RESN_DTLS - FROM TB_CAR_BSC_MTTR + FROM TB_CAR_BSC_MTTR + WHERE CNTC_INFO_CODE = 'A01' AND MBER_SE_NO = #{owner_mber_no} - AND VIN = #{vin} - AND VHRNO = #{vhrno} - + AND DMND_VIN = #{vin} + AND DMND_VHRNO = #{vhrno} + /* vehicleInfoMapper.selectExtInfo(자동차 연료제원 포함 기본사항 조회) */ +SELECT PRYE + , REGIST_DE + , ERSR_REGIST_SE_CODE + , ERSR_REGIST_SE_NM + , ERSR_REGIST_DE + , REGIST_DETAIL_CODE + , DSPLVL + , USE_STRNGHLD_LEGALDONG_CODE + , USE_STRNGHLD_ADSTRD_CODE + , USE_STRNGHLD_MNTN + , USE_STRNGHLD_LNBR + , USE_STRNGHLD_HO + , USE_STRNGHLD_ADRES_NM + , USE_STRNGHLD_ROAD_NM_CODE + , USGSRHLD_UNDGRND_BULD_SE_CODE + , USE_STRNGHLD_BULD_MAIN_NO + , USE_STRNGHLD_BULD_SUB_NO + , USGSRHLD_ADRES_FULL + , MBER_SE_CODE + , MBER_NM + , MBER_SE_NO + , TELNO + , OWNER_LEGALDONG_CODE + , OWNER_ADSTRD_CODE + , OWNER_MNTN + , OWNER_LNBR + , OWNER_HO + , OWNER_ADRES_NM + , OWNER_ROAD_NM_CODE + , OWNER_UNDGRND_BULD_SE_CODE + , OWNER_BULD_MAIN_NO + , OWNER_BULD_SUB_NO + , OWNER_ADRES_FULL + , AFTR_VHRNO + , USE_FUEL_CODE + , PRPOS_SE_CODE + , MTRS_FOM_NM + , FRNT_VHRNO + , VHRNO + , VIN + , CNM + , VHCLE_TOT_WT + , CAAG_ENDDE + , CHANGE_DE + , VHCTY_ASORT_CODE + , VHCTY_TY_CODE + , VHCTY_SE_CODE + , MXMM_LDG + , VHCTY_ASORT_NM + , VHCTY_TY_NM + , VHCTY_SE_NM + , FRST_REGIST_DE + , FOM_NM + , ACQS_DE + , ACQS_END_DE + , YBL_MD + , TRANSR_REGIST_DE + , SPCF_REGIST_STTUS_CODE + , COLOR_NM + , MRTG_CO + , SEIZR_CO + , STMD_CO + , NMPL_CSDY_AT + , NMPL_CSDY_REMNR_DE + , ORIGIN_SE_CODE + , NMPL_STNDRD_CODE + , ACQS_AMOUNT + , INSPT_VALID_PD_BGNDE + , INSPT_VALID_PD_ENDDE + , CHCK_VALID_PD_BGNDE + , CHCK_VALID_PD_ENDDE + , USE_STRNGHLD_GRC_CODE + , TKCAR_PSCAP_CO + , SPMNNO + , TRVL_DSTNC + , FRST_REGIST_RQRCNO + , VLNT_ERSR_PRVNTC_NTICE_DE + , REGIST_INSTT_NM + , VIMS_PRPOS_SE_CODE + , VIMS_VHCTY_ASORT_CODE + , VIMS_VHCTY_TY_CODE + , VIMS_VHCTY_SE_CODE + , CBD_LT + , CBD_BT + , CBD_HG + , FRST_MXMM_LDG + , FUEL_CNSMP_RT + , ELCTY_CMPND_FUEL_CNSMP_RT + , PROCESS_IMPRTY_RESN_CODE + , PROCESS_IMPRTY_RESN_DTLS + FROM TB_CAR_BSC_MTTR + WHERE CNTC_INFO_CODE = 'AC1_AW0_76' + AND DMND_VIN = #{vin} + AND DMND_VHRNO = #{vhrno} + + +/* vehicleInfoMapper.insertExtInfo(자동차 연료제원 포함 기본사항 조회 로그 등록) */ + +SELECT CONCAT( + + , LPAD(IFNULL(SUBSTRING(MAX(BSC_MTTR_ID), 9) + 1, 1), 22, '0') + ) NEW_ID + FROM TB_CAR_BSC_MTTR TCBM + WHERE BSC_MTTR_ID LIKE CONCAT(, '%') +INSERT INTO TB_CAR_BSC_MTTR ( + BSC_MTTR_ID + , MESSAGEID + , MESSAGENAME + , MESSAGEREASON + , MESSAGEREMARK + , EXCEPTIONSTACKTRACE + , CNTC_INFO_CODE + + , DMND_LEVY_STDDE + , DMND_INQIRE_SE_CODE + , DMND_VHRNO + , DMND_VIN + + , PRYE + , REGIST_DE + , ERSR_REGIST_SE_CODE + , ERSR_REGIST_SE_NM + , ERSR_REGIST_DE + , REGIST_DETAIL_CODE + , DSPLVL + , USE_STRNGHLD_LEGALDONG_CODE + , USE_STRNGHLD_ADSTRD_CODE + , USE_STRNGHLD_MNTN + , USE_STRNGHLD_LNBR + , USE_STRNGHLD_HO + , USE_STRNGHLD_ADRES_NM + , USE_STRNGHLD_ROAD_NM_CODE + , USGSRHLD_UNDGRND_BULD_SE_CODE + , USE_STRNGHLD_BULD_MAIN_NO + , USE_STRNGHLD_BULD_SUB_NO + , USGSRHLD_ADRES_FULL + , MBER_SE_CODE + , MBER_NM + , MBER_SE_NO + , TELNO + , OWNER_LEGALDONG_CODE + , OWNER_ADSTRD_CODE + , OWNER_MNTN + , OWNER_LNBR + , OWNER_HO + , OWNER_ADRES_NM + , OWNER_ROAD_NM_CODE + , OWNER_UNDGRND_BULD_SE_CODE + , OWNER_BULD_MAIN_NO + , OWNER_BULD_SUB_NO + , OWNER_ADRES_FULL + , AFTR_VHRNO + , USE_FUEL_CODE + , PRPOS_SE_CODE + , MTRS_FOM_NM + , FRNT_VHRNO + , VHRNO + , VIN + , CNM + , VHCLE_TOT_WT + , CAAG_ENDDE + , CHANGE_DE + , VHCTY_ASORT_CODE + , VHCTY_TY_CODE + , VHCTY_SE_CODE + , MXMM_LDG + , VHCTY_ASORT_NM + , VHCTY_TY_NM + , VHCTY_SE_NM + , FRST_REGIST_DE + , FOM_NM + , ACQS_DE + , ACQS_END_DE + , YBL_MD + , TRANSR_REGIST_DE + , SPCF_REGIST_STTUS_CODE + , COLOR_NM + , MRTG_CO + , SEIZR_CO + , STMD_CO + , NMPL_CSDY_AT + , NMPL_CSDY_REMNR_DE + , ORIGIN_SE_CODE + , NMPL_STNDRD_CODE + , ACQS_AMOUNT + , INSPT_VALID_PD_BGNDE + , INSPT_VALID_PD_ENDDE + , CHCK_VALID_PD_BGNDE + , CHCK_VALID_PD_ENDDE + , USE_STRNGHLD_GRC_CODE + , TKCAR_PSCAP_CO + , SPMNNO + , TRVL_DSTNC + , FRST_REGIST_RQRCNO + , VLNT_ERSR_PRVNTC_NTICE_DE + , REGIST_INSTT_NM + , VIMS_PRPOS_SE_CODE + , VIMS_VHCTY_ASORT_CODE + , VIMS_VHCTY_TY_CODE + , VIMS_VHCTY_SE_CODE + , CBD_LT + , CBD_BT + , CBD_HG + , FRST_MXMM_LDG + , FUEL_CNSMP_RT + , ELCTY_CMPND_FUEL_CNSMP_RT + , PROCESS_IMPRTY_RESN_CODE + , PROCESS_IMPRTY_RESN_DTLS + + , REG_DT + , RGTR +) VALUES ( + #{info.bsc_mttr_id} + , #{resp.cntc_result_code} + , #{resp.cntc_result_dtls} + , NULL + , NULL + , NULL + , 'AC1_AW0_76' + + , #{req.levy_stdde} + , #{req.inqire_se_code} + , #{req.vhrno} + , #{req.vin} + + , #{info.prye} + , #{info.regist_de} + , #{info.ersr_regist_se_code} + , #{info.ersr_regist_se_nm} + , #{info.ersr_regist_de} + , #{info.regist_detail_code} + , #{info.dsplvl} + , #{info.use_strnghld_legaldong_code} + , #{info.use_strnghld_adstrd_code} + , #{info.use_strnghld_mntn} + , #{info.use_strnghld_lnbr} + , #{info.use_strnghld_ho} + , #{info.use_strnghld_adres_nm} + , #{info.use_strnghld_road_nm_code} + , #{info.usgsrhld_undgrnd_buld_se_code} + , #{info.use_strnghld_buld_main_no} + , #{info.use_strnghld_buld_sub_no} + , #{info.usgsrhld_adres_full} + , #{info.mber_se_code} + , #{info.mber_nm} + , #{info.mber_se_no} + , #{info.telno} + , #{info.owner_legaldong_code} + , #{info.owner_adstrd_code} + , #{info.owner_mntn} + , #{info.owner_lnbr} + , #{info.owner_ho} + , #{info.owner_adres_nm} + , #{info.owner_road_nm_code} + , #{info.owner_undgrnd_buld_se_code} + , #{info.owner_buld_main_no} + , #{info.owner_buld_sub_no} + , #{info.owner_adres_full} + , #{info.aftr_vhrno} + , #{info.use_fuel_code} + , #{info.prpos_se_code} + , #{info.mtrs_fom_nm} + , #{info.frnt_vhrno} + , #{info.vhrno} + , #{info.vin} + , #{info.cnm} + , #{info.vhcle_tot_wt} + , #{info.caag_endde} + , #{info.change_de} + , #{info.vhcty_asort_code} + , #{info.vhcty_ty_code} + , #{info.vhcty_se_code} + , #{info.mxmm_ldg} + , #{info.vhcty_asort_nm} + , #{info.vhcty_ty_nm} + , #{info.vhcty_se_nm} + , #{info.frst_regist_de} + , #{info.fom_nm} + , #{info.acqs_de} + , #{info.acqs_end_de} + , #{info.ybl_md} + , #{info.transr_regist_de} + , #{info.spcf_regist_sttus_code} + , #{info.color_nm} + , #{info.mrtg_co} + , #{info.seizr_co} + , #{info.stmd_co} + , #{info.nmpl_csdy_at} + , #{info.nmpl_csdy_remnr_de} + , #{info.origin_se_code} + , #{info.nmpl_stndrd_code} + , #{info.acqs_amount} + , #{info.inspt_valid_pd_bgnde} + , #{info.inspt_valid_pd_endde} + , #{info.chck_valid_pd_bgnde} + , #{info.chck_valid_pd_endde} + , #{info.use_strnghld_grc_code} + , #{info.tkcar_pscap_co} + , #{info.spmnno} + , #{info.trvl_dstnc} + , #{info.frst_regist_rqrcno} + , #{info.vlnt_ersr_prvntc_ntice_de} + , #{info.regist_instt_nm} + , #{info.vims_prpos_se_code} + , #{info.vims_vhcty_asort_code} + , #{info.vims_vhcty_ty_code} + , #{info.vims_vhcty_se_code} + , #{info.cbd_lt} + , #{info.cbd_bt} + , #{info.cbd_hg} + , #{info.frst_mxmm_ldg} + , #{info.fuel_cnsmp_rt} + , #{info.elcty_cmpnd_fuel_cnsmp_rt} + , #{info.process_imprty_resn_code} + , #{info.process_imprty_resn_dtls} + + , + , #{currentUser.id} +) + \ No newline at end of file diff --git a/src/test/java/cokr/xit/interfaces/lvis/service/BasicInfoExtTest.java b/src/test/java/cokr/xit/interfaces/lvis/service/BasicInfoExtTest.java new file mode 100644 index 0000000..dfc6971 --- /dev/null +++ b/src/test/java/cokr/xit/interfaces/lvis/service/BasicInfoExtTest.java @@ -0,0 +1,185 @@ +package cokr.xit.interfaces.lvis.service; + +import java.util.List; + +import javax.annotation.Resource; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import cokr.xit.foundation.data.JSON; +import cokr.xit.foundation.test.TestSupport; +import cokr.xit.interfaces.lvis.service.bean.VehicleInfoBean; +import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtRequest; +import cokr.xit.interfaces.lvis.service.reg.BasicInfoExtResponse; +import cokr.xit.interfaces.publicinfo.ServiceMessage; + +public class BasicInfoExtTest extends TestSupport { + @Resource(name = "vehicleInfoService") + private VehicleInfoService service; + + private JSON json = new JSON().configure(objectMapper -> + objectMapper.setPropertyNamingStrategy( + new JSON.CustomPropertyNames().customize(p -> "record".equals(p) ? p : p.toUpperCase()) + ) + ); + + private String str = "{\r\n" + + " \"data\": [\r\n" + + " {\r\n" + + " \"record\": [\r\n" + + " {\r\n" + + " \"VHRNO\": \"\",\r\n" + + " \"VIN\": \"\",\r\n" + + " \"PRYE\": \"\",\r\n" + + " \"REGIST_DE\": \"\",\r\n" + + " \"ERSR_REGIST_SE_CODE\": \"\",\r\n" + + " \"ERSR_REGIST_SE_NM\": \"\",\r\n" + + " \"ERSR_REGIST_DE\": \"\",\r\n" + + " \"REGIST_DETAIL_CODE\": \"\",\r\n" + + " \"DSPLVL\": \"\",\r\n" + + " \"USE_STRNGHLD_LEGALDONG_CODE\": \"\",\r\n" + + " \"USE_STRNGHLD_ADSTRD_CODE\": \"\",\r\n" + + " \"USE_STRNGHLD_MNTN\": \"\",\r\n" + + " \"USE_STRNGHLD_LNBR\": \"\",\r\n" + + " \"USE_STRNGHLD_HO\": \"\",\r\n" + + " \"USE_STRNGHLD_ADRES_NM\": \"\",\r\n" + + " \"USE_STRNGHLD_ROAD_NM_CODE\": \"\",\r\n" + + " \"USGSRHLD_UNDGRND_BULD_SE_CODE\": \"\",\r\n" + + " \"USE_STRNGHLD_BULD_MAIN_NO\": \"\",\r\n" + + " \"USE_STRNGHLD_BULD_SUB_NO\": \"\",\r\n" + + " \"USGSRHLD_ADRES_FULL\": \"*** *** *** ***** **, ***동 ***호(***, *****)\",\r\n" + + " \"MBER_SE_CODE\": \"\",\r\n" + + " \"MBER_NM\": \"***\",\r\n" + + " \"MBER_SE_NO\": \"*************\",\r\n" + + " \"TELNO\": \"\",\r\n" + + " \"OWNER_LEGALDONG_CODE\": \"\",\r\n" + + " \"OWNER_ADSTRD_CODE\": \"\",\r\n" + + " \"OWNER_MNTN\": \"\",\r\n" + + " \"OWNER_LNBR\": \"\",\r\n" + + " \"OWNER_HO\": \"\",\r\n" + + " \"OWNER_ADRES_NM\": \"\",\r\n" + + " \"OWNER_ROAD_NM_CODE\": \"\",\r\n" + + " \"OWNER_UNDGRND_BULD_SE_CODE\": \"\",\r\n" + + " \"OWNER_BULD_MAIN_NO\": \"\",\r\n" + + " \"OWNER_BULD_SUB_NO\": \"\",\r\n" + + " \"OWNER_ADRES_FULL\": \"\",\r\n" + + " \"AFTR_VHRNO\": \"\",\r\n" + + " \"USE_FUEL_CODE\": \"\",\r\n" + + " \"PRPOS_SE_CODE\": \"\",\r\n" + + " \"MTRS_FOM_NM\": \"\",\r\n" + + " \"FRNT_VHRNO\": \"\",\r\n" + + " \"CNM\": \"*****\",\r\n" + + " \"VHCLE_TOT_WT\": \"\",\r\n" + + " \"CAAG_ENDDE\": \"\",\r\n" + + " \"CHANGE_DE\": \"\",\r\n" + + " \"VHCTY_ASORT_CODE\": \"\",\r\n" + + " \"VHCTY_TY_CODE\": \"\",\r\n" + + " \"VHCTY_SE_CODE\": \"\",\r\n" + + " \"MXMM_LDG\": \"\",\r\n" + + " \"VHCTY_ASORT_NM\": \"**\",\r\n" + + " \"VHCTY_TY_NM\": \"\",\r\n" + + " \"VHCTY_SE_NM\": \"\",\r\n" + + " \"FRST_REGIST_DE\": \"\",\r\n" + + " \"FOM_NM\": \"\",\r\n" + + " \"ACQS_DE\": \"\",\r\n" + + " \"ACQS_END_DE\": \"\",\r\n" + + " \"YBL_MD\": \"\",\r\n" + + " \"TRANSR_REGIST_DE\": \"\",\r\n" + + " \"SPCF_REGIST_STTUS_CODE\": \"\",\r\n" + + " \"COLOR_NM\": \"\",\r\n" + + " \"MRTG_CO\": \"\",\r\n" + + " \"SEIZR_CO\": \"\",\r\n" + + " \"STMD_CO\": \"\",\r\n" + + " \"NMPL_CSDY_AT\": \"\",\r\n" + + " \"NMPL_CSDY_REMNR_DE\": \"\",\r\n" + + " \"ORIGIN_SE_CODE\": \"\",\r\n" + + " \"NMPL_STNDRD_CODE\": \"\",\r\n" + + " \"ACQS_AMOUNT\": \"\",\r\n" + + " \"INSPT_VALID_PD_BGNDE\": \"\",\r\n" + + " \"INSPT_VALID_PD_ENDDE\": \"\",\r\n" + + " \"USE_STRNGHLD_GRC_CODE\": \"\",\r\n" + + " \"TKCAR_PSCAP_CO\": \"\",\r\n" + + " \"SPMNNO\": \"\",\r\n" + + " \"TRVL_DSTNC\": \"\",\r\n" + + " \"FRST_REGIST_RQRCNO\": \"\",\r\n" + + " \"VLNT_ERSR_PRVNTC_NTICE_DE\": \"\",\r\n" + + " \"REGIST_INSTT_NM\": \"\",\r\n" + + " \"PROCESS_IMPRTY_RESN_CODE\": \"**\",\r\n" + + " \"PROCESS_IMPRTY_RESN_DTLS\": \"****\",\r\n" + + " \"CBD_LT\": \"\",\r\n" + + " \"CBD_BT\": \"\",\r\n" + + " \"CBD_HG\": \"\",\r\n" + + " \"FRST_MXMM_LDG\": \"\",\r\n" + + " \"FUEL_CNSMP_RT\": \"15.0\",\r\n" + + " \"ELCTY_CMPND_FUEL_CNSMP_RT\": \"\"\r\n" + + " }\r\n" + + " ],\r\n" + + " \"CNTC_RESULT_CODE\": \"MSG50000\",\r\n" + + " \"CNTC_RESULT_DTLS\": \"정상\"\r\n" + + " }\r\n" + + " ]\r\n" + + "}"; + + @Test + void parse() { + String s = ServiceMessage.Support.peel(str); + System.out.println(s); + BasicInfoExtResponse resp = json.parse(s, BasicInfoExtResponse.class); + System.out.println(resp); + } + + @Resource(name="vehicleInfoBean") + private VehicleInfoBean bean; + + @Test + void parse2() { + BasicInfoExtRequest req = new BasicInfoExtRequest(); + req.setLevy_stdde("20231031"); + req.setVhrno("18도7733"); + req.validate(); + + String str = "{\"data\":[{\"record\":[{\"VHRNO\":\"\",\"VIN\":\"\",\"PRYE\":\"\",\"REGIST_DE\":\"\",\"ERSR_REGIST_SE_CODE\":\"\",\"ERSR_REGIST_SE_NM\":\"\",\"ERSR_REGIST_DE\":\"\",\"REGIST_DETAIL_CODE\":\"\",\"DSPLVL\":\"\",\"USE_STRNGHLD_LEGALDONG_CODE\":\"\",\"USE_STRNGHLD_ADSTRD_CODE\":\"\",\"USE_STRNGHLD_MNTN\":\"\",\"USE_STRNGHLD_LNBR\":\"\",\"USE_STRNGHLD_HO\":\"\",\"USE_STRNGHLD_ADRES_NM\":\"\",\"USE_STRNGHLD_ROAD_NM_CODE\":\"\",\"USGSRHLD_UNDGRND_BULD_SE_CODE\":\"\",\"USE_STRNGHLD_BULD_MAIN_NO\":\"\",\"USE_STRNGHLD_BULD_SUB_NO\":\"\",\"USGSRHLD_ADRES_FULL\":\"경 기도 수원시 장안구 정자로19번길 18, 505동 809호(천천동, 일성아파트)\",\"MBER_SE_CODE\":\"\",\"MBER_NM\":\"서상종\",\"MBER_SE_NO\":\"8108141226621\",\"TELNO\":\"\",\"OWNER_LEGALDONG_CODE\":\"\",\"OWNER_ADSTRD_CODE\":\"\",\"OWNER_MNTN\":\"\",\"OWNER_LNBR\":\"\",\"OWNER_HO\":\"\",\"OWNER_ADRES_NM\":\"\",\"OWNER_ROAD_NM_CODE\":\"\",\"OWNER_UNDGRND_BULD_SE_CODE\":\"\",\"OWNER_BULD_MAIN_NO\":\"\",\"OWNER_BULD_SUB_NO\":\"\",\"OWNER_ADRES_FULL\":\"\",\"AFTR_VHRNO\":\"\",\"USE_FUEL_CODE\":\"\",\"PRPOS_SE_CODE\":\"\",\"MTRS_FOM_NM\":\"\",\"FRNT_VHRNO\":\"\",\"CNM\":\"싼타페(SANTAFE)\",\"VHCLE_TOT_WT\":\"\",\"CAAG_ENDDE\":\"\",\"CHANGE_DE\":\"\",\"VHCTY_ASORT_CODE\":\"\",\"VHCTY_TY_CODE\":\"\",\"VHCTY_SE_CODE\":\"\",\"MXMM_LDG\":\"\",\"VHCTY_ASORT_NM\":\"승용\",\"VHCTY_TY_NM\":\"\",\"VHCTY_SE_NM\":\"\",\"FRST_REGIST_DE\":\"\",\"FOM_NM\":\"\",\"ACQS_DE\":\"\",\"ACQS_END_DE\":\"\",\"YBL_MD\":\"\",\"TRANSR_REGIST_DE\":\"\",\"SPCF_REGIST_STTUS_CODE\":\"\",\"COLOR_NM\":\"\",\"MRTG_CO\":\"\",\"SEIZR_CO\":\"\",\"STMD_CO\":\"\",\"NMPL_CSDY_AT\":\"\",\"NMPL_CSDY_REMNR_DE\":\"\",\"ORIGIN_SE_CODE\":\"\",\"NMPL_STNDRD_CODE\":\"\",\"ACQS_AMOUNT\":\"\",\"INSPT_VALID_PD_BGNDE\":\"\",\"INSPT_VALID_PD_ENDDE\":\"\",\"USE_STRNGHLD_GRC_CODE\":\"\",\"TKCAR_PSCAP_CO\":\"\",\"SPMNNO\":\"\",\"TRVL_DSTNC\":\"\",\"FRST_REGIST_RQRCNO\":\"\",\"VLNT_ERSR_PRVNTC_NTICE_DE\":\"\",\"REGIST_INSTT_NM\":\"\",\"PROCESS_IMPRTY_RESN_CODE\":\"00\",\"PROCESS_IMPRTY_RESN_DTLS\":\"운행차량\",\"CBD_LT\":\"\",\"CBD_BT\":\"\",\"CBD_HG\":\"\",\"FRST_MXMM_LDG\":\"\",\"FUEL_CNSMP_RT\":\"15.0\",\"ELCTY_CMPND_FUEL_CNSMP_RT\":\"\"}],\"CNTC_RESULT_CODE\":\"MSG50000\",\"CNTC_RESULT_DTLS\":\"정상\"}]}"; + String s = ServiceMessage.Support.peel(str); + System.out.println(s); + BasicInfoExtResponse resp = json.parse(s, BasicInfoExtResponse.class); + System.out.println(resp); + + bean.create(req, resp); + + BasicInfoExtResponse found = bean.getBasicInfo(req); + System.out.println(found); + } + + @Test + void stringify() { + BasicInfoExtResponse.ExtInfo detail = new BasicInfoExtResponse.ExtInfo(); + detail.setUsgsrhld_adres_full("*** *** *** ***** **, ***동 ***호(***, *****)"); + detail.setMber_nm("***"); + detail.setMber_se_no("*************"); + detail.setCnm("*****"); + detail.setProcess_imprty_resn_code("**"); + detail.setProcess_imprty_resn_dtls("****"); + detail.setFuel_cnsmp_rt("15.0"); + BasicInfoExtResponse resp = new BasicInfoExtResponse(); + resp.setRecord(List.of(detail)); + resp.setCntc_result_code("MSG50000"); + resp.setCntc_result_dtls("정상"); + + String str = json.stringify(resp, true); + System.out.println(str); + + BasicInfoExtResponse parsed = json.parse(str, BasicInfoExtResponse.class); + System.out.println(parsed); + } + + @Test + void getEVInfo() { + BasicInfoExtRequest req = new BasicInfoExtRequest(); + Assertions.assertThrows(IllegalArgumentException.class, () -> service.getBasicInfo(req)); + + req.setLevy_stdde("20231026"); + req.setVhrno("18도7733"); + service.getBasicInfo(req); + } +} \ No newline at end of file