From 0f4e9e78de364cfa63b8a9740cacca18671f473f Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Mon, 22 Jan 2024 10:29:12 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B0=A8=EC=A0=81=EC=A1=B0=ED=9A=8C=20mapper?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/interfaces/vehicleInfo-mapper.xml | 468 +++++++++++++++++- 1 file changed, 442 insertions(+), 26 deletions(-) diff --git a/src/main/resources/sql/mapper/interfaces/vehicleInfo-mapper.xml b/src/main/resources/sql/mapper/interfaces/vehicleInfo-mapper.xml index 4410fae0..6a595345 100644 --- a/src/main/resources/sql/mapper/interfaces/vehicleInfo-mapper.xml +++ b/src/main/resources/sql/mapper/interfaces/vehicleInfo-mapper.xml @@ -182,37 +182,35 @@ 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} + + CASE WHEN BSNO IS NULL OR BSNO = 0 THEN CONCAT(CTPV_NM, ' ', SGG_NM, ' ', STDG_NM, ' ', ROAD_NM, ' ', BMNO) + ELSE CONCAT(CTPV_NM, ' ', SGG_NM, ' ', STDG_NM, ' ', ROAD_NM, ' ', BMNO, '-', BSNO) + END + ELSE CASE WHEN BSNO IS NULL OR BSNO = 0 THEN CONCAT(CTPV_NM, ' ', SGG_NM, ' ', ROAD_NM, ' ', BMNO) + ELSE CONCAT(CTPV_NM, ' ', SGG_NM, ' ', ROAD_NM, ' ', BMNO, '-', BSNO) + END + END ROAD_NM_ADRES + , ZIP + FROM TB_ROAD_ADDR + WHERE ROAD_NM_CD = #{roadNmCd} + AND BMNO = #{bmno} + AND BSNO = #{bsno} /* vehicleInfoMapper.insertBasicInfo(자동차 기본사항 조회 로그 등록) */ SELECT CONCAT( - , LPAD(IFNULL(SUBSTRING(MAX(BSC_MTTR_ID), 9) + 1, 1), 22, '0') + , LPAD(NVL(SUBSTRING(MAX(BSC_MTTR_ID), 9) + 1, 1), 22, '0') ) NEW_ID - FROM TB_CAR_BSC_MTTR TCBM + FROM TB_CAR_BSC_MTTR TCBM WHERE BSC_MTTR_ID LIKE CONCAT(, '%') INSERT INTO TB_CAR_BSC_MTTR ( BSC_MTTR_ID @@ -221,12 +219,13 @@ INSERT INTO TB_CAR_BSC_MTTR ( , MESSAGEREASON , MESSAGEREMARK , EXCEPTIONSTACKTRACE - + , CNTC_INFO_CODE + , DMND_LEVY_STDDE , DMND_INQIRE_SE_CODE , DMND_VHRNO , DMND_VIN - + , PRYE , REGIST_DE , ERSR_REGIST_SE_CODE @@ -314,7 +313,7 @@ INSERT INTO TB_CAR_BSC_MTTR ( , FRST_MXMM_LDG , PROCESS_IMPRTY_RESN_CODE , PROCESS_IMPRTY_RESN_DTLS - + , REG_DT , RGTR ) VALUES ( @@ -324,12 +323,13 @@ INSERT INTO TB_CAR_BSC_MTTR ( , #{msg.messageReason} , #{msg.messageRemark} , #{msg.exceptionStackTrace} - + , 'A01' + , #{req.levy_stdde} , #{req.inqire_se_code} , #{req.vhrno} , #{req.vin} - + , #{info.prye} , #{info.regist_de} , #{info.ersr_regist_se_code} @@ -417,7 +417,423 @@ INSERT INTO TB_CAR_BSC_MTTR ( , #{info.frst_mxmm_ldg} , #{info.process_imprty_resn_code} , #{info.process_imprty_resn_dtls} + + , + , #{currentUser.id} +) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/* vehicleInfoMapper.insertExtInfo(자동차 연료제원 포함 기본사항 조회 로그 등록) */ + +SELECT CONCAT( + + , LPAD(NVL(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} )