|
|
|
@ -6,6 +6,7 @@
|
|
|
|
|
/* 통합 자료 목록 조회(integrationSearchMapper.selectIntegrationDataList) */
|
|
|
|
|
SELECT C.CRDN_ID /* 단속 ID */
|
|
|
|
|
, C.SGG_CD /* 시군구 코드 */
|
|
|
|
|
, (SELECT SGG_NM FROM TB_SGG_INFO WHERE SGG_CD = C.SGG_CD) AS SGG_NM /* 시군구 명 */
|
|
|
|
|
, C.TASK_SE_CD /* 업무 구분 코드 */
|
|
|
|
|
, (SELECT GET_CODE_NM('FIM054', C.TASK_SE_CD) FROM DUAL) AS TASK_SE_NM /* 업무 구분 코드 명 */
|
|
|
|
|
, C.CRDN_REG_SE_CD /* 단속 등록 구분 코드 */
|
|
|
|
@ -114,27 +115,169 @@
|
|
|
|
|
, L.RDCAMT_ADAMT /* 감액 가산금 */
|
|
|
|
|
, L.RDCAMT_PCPTAX + L.RDCAMT_ADAMT AS REDUC_AMT /* 감액 금액 */
|
|
|
|
|
, L.SUM_AMT /* 합계 금액 */
|
|
|
|
|
, VI.TXITM_NM /* 세목 명 */
|
|
|
|
|
, VI.TXITM_NM /* 세목 명 */
|
|
|
|
|
, (CASE
|
|
|
|
|
WHEN R.RCVMT_ID IS NOT NULL AND R.RCVMT_ID != ''
|
|
|
|
|
THEN 'Y'
|
|
|
|
|
ELSE 'N'
|
|
|
|
|
END) AS RCVMT_YN
|
|
|
|
|
FROM TB_CRDN C /* 단속 대장 */
|
|
|
|
|
INNER JOIN TB_CRDN_ADI CA ON (C.CRDN_ID = CA.CRDN_ID) /* 단속 부가 정보 */
|
|
|
|
|
INNER JOIN TB_VLTN_INFO VI ON (C.VLTN_ID = VI.VLTN_ID) /* 위반 정보 */
|
|
|
|
|
LEFT OUTER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID) /* 납부자 대장 */
|
|
|
|
|
LEFT OUTER JOIN TB_LEVY L ON (C.CRDN_ID = L.CRDN_ID AND L.DEL_YN = 'N') /* 부과 대장 */
|
|
|
|
|
LEFT OUTER JOIN TB_RCVMT R ON (L.LEVY_ID = R.LEVY_ID AND R.DEL_YN = 'N')
|
|
|
|
|
WHERE C.DEL_YN = 'N'
|
|
|
|
|
<if test="vhrno != null">
|
|
|
|
|
AND C.VHRNO = #{vhrno} /* 차량번호 */
|
|
|
|
|
FROM TB_CRDN C /* 단속 대장 */
|
|
|
|
|
INNER JOIN TB_CRDN_ADI CA ON (C.CRDN_ID = CA.CRDN_ID) /* 단속 부가 정보 */
|
|
|
|
|
INNER JOIN TB_VLTN_INFO VI ON (C.VLTN_ID = VI.VLTN_ID) /* 위반 정보 */
|
|
|
|
|
LEFT OUTER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID) /* 단속 민원 대장 */
|
|
|
|
|
LEFT OUTER JOIN TB_ESB_INTERFACE EI ON (CC.CVLCPT_LINK_ID = EI.INTERFACE_SEQ_N) /* 국민신문고 민원 연계 */
|
|
|
|
|
LEFT OUTER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID) /* 납부자 대장 */
|
|
|
|
|
LEFT OUTER JOIN TB_LEVY L ON (C.CRDN_ID = L.CRDN_ID AND L.DEL_YN = 'N') /* 부과 대장 */
|
|
|
|
|
LEFT OUTER JOIN TB_RCVMT R ON (L.LEVY_ID = R.LEVY_ID AND R.DEL_YN = 'N') /* 수납 대장 */
|
|
|
|
|
WHERE C.DEL_YN = 'N'
|
|
|
|
|
AND C.SGG_CD = #{sggCd}
|
|
|
|
|
<if test="taskSeCd != null">
|
|
|
|
|
AND C.TASK_SE_CD = #{taskSeCd}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="rtpyrNo != null">
|
|
|
|
|
AND P.RTPYR_NO = #{rtpyrNo} /* 납부자 번호 */
|
|
|
|
|
|
|
|
|
|
<!-- 통합조회 키워드 -->
|
|
|
|
|
<if test="ischKeywordSet != null">
|
|
|
|
|
<foreach collection="ischKeywordSet" item="item">
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="item.name == 'vhrno'">
|
|
|
|
|
AND (C.VHRNO = #{item.value} OR '테이블.대체차량번호컬럼' = #{item.value})
|
|
|
|
|
</when>
|
|
|
|
|
<when test="item.name == 'rpmSzrVhrno'">
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="item.similar != null">
|
|
|
|
|
AND '테이블.대체차량번호컬럼' LIKE CONCAT ('%' || #{item.value} || '%')
|
|
|
|
|
</when>
|
|
|
|
|
<otherwise>
|
|
|
|
|
AND '테이블.대체차량번호컬럼' = #{item.value}
|
|
|
|
|
</otherwise>
|
|
|
|
|
</choose>
|
|
|
|
|
</when>
|
|
|
|
|
<when test="item.name == 'crdnVhrno'">
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="item.similar != null">
|
|
|
|
|
AND C.VHRNO LIKE CONCAT ('%' || #{item.value} || '%')
|
|
|
|
|
</when>
|
|
|
|
|
<otherwise>
|
|
|
|
|
AND C.VHRNO = #{item.value}
|
|
|
|
|
</otherwise>
|
|
|
|
|
</choose>
|
|
|
|
|
</when>
|
|
|
|
|
<when test="item.name == 'rtpyrNm'">
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="item.similar != null">
|
|
|
|
|
AND P.RTPYR_NM LIKE CONCAT ('%' || #{item.value} || '%')
|
|
|
|
|
</when>
|
|
|
|
|
<otherwise>
|
|
|
|
|
AND P.RTPYR_NM = #{item.value}
|
|
|
|
|
</otherwise>
|
|
|
|
|
</choose>
|
|
|
|
|
</when>
|
|
|
|
|
<when test="item.name == 'rtpyrNo'">
|
|
|
|
|
AND P.RTPYR_NO = #{item.value}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="item.name == 'cvlcptAplcntNm'">
|
|
|
|
|
AND CC.CVLCPT_APLCNT_NM = #{item.value}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="item.name == 'crdnYmd'">
|
|
|
|
|
<if test="item.from != null">
|
|
|
|
|
AND C.CRDN_YMD <![CDATA[ >= ]]> #{item.from}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="item.to != null">
|
|
|
|
|
AND C.CRDN_YMD <![CDATA[ <= ]]> #{item.to}
|
|
|
|
|
</if>
|
|
|
|
|
</when>
|
|
|
|
|
<when test="item.name == 'crdnTm'">
|
|
|
|
|
<if test="item.from != null">
|
|
|
|
|
AND C.CRDN_TM <![CDATA[ >= ]]> #{item.from}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="item.to != null">
|
|
|
|
|
AND C.CRDN_TM <![CDATA[ <= ]]> #{item.to}
|
|
|
|
|
</if>
|
|
|
|
|
</when>
|
|
|
|
|
<when test="item.name == 'rtpyrAddr'">
|
|
|
|
|
AND P.ADDR LIKE CONCAT ('%' || #{item.value} || '%')
|
|
|
|
|
</when>
|
|
|
|
|
<when test="item.name == 'rtpyrDtlAddr'">
|
|
|
|
|
AND P.DTL_ADDR LIKE CONCAT ('%' || #{item.value} || '%')
|
|
|
|
|
</when>
|
|
|
|
|
<when test="item.name == 'gojiNo'">
|
|
|
|
|
AND CONCAT(L.FYR, '-', L.LEVY_NO) = #{item.value}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="item.name == 'epayno'">
|
|
|
|
|
AND L.EPAYNO = #{item.value}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="item.name == 'crdnSttsCd'">
|
|
|
|
|
AND C.CRDN_STTS_CD = #{item.value}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="item.name == 'crdnRegSeCd'">
|
|
|
|
|
AND C.CRDN_REG_SE_CD = #{item.value}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="item.name == 'crdnInptSeCd'">
|
|
|
|
|
AND C.CRDN_INPT_SE_CD = #{item.value}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="item.name == 'crdnStdgNm'">
|
|
|
|
|
AND C.CRDN_STDG_NM = #{item.value}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="item.name == 'crdnPlc'">
|
|
|
|
|
AND C.CRDN_PLC LIKE CONCAT ('%' || #{item.value} || '%')
|
|
|
|
|
</when>
|
|
|
|
|
<when test="item.name == 'cvlcptListNo'">
|
|
|
|
|
AND CC.CVLCPT_LIST_NO = #{item.value}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="item.name == 'celNoV'">
|
|
|
|
|
AND EI.CEL_NO_V = #{item.value}
|
|
|
|
|
</when>
|
|
|
|
|
|
|
|
|
|
</choose>
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<!-- 특정자료만 조회 -->
|
|
|
|
|
<if test="ischOnlyDataSet != null">
|
|
|
|
|
<foreach collection="ischOnlyDataSet" item="item">
|
|
|
|
|
<choose>
|
|
|
|
|
<!-- 미납자료만 조회 -->
|
|
|
|
|
<when test="item == 'minap'">
|
|
|
|
|
AND L.LEVY_ID IS NULL
|
|
|
|
|
</when>
|
|
|
|
|
|
|
|
|
|
</choose>
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<!-- 특정자료 제외 -->
|
|
|
|
|
<if test="ischExclDataSet != null">
|
|
|
|
|
<foreach collection="ischExclDataSet" item="item">
|
|
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<!-- 특정자료 포함 -->
|
|
|
|
|
<if test="ischInclDataSet != null">
|
|
|
|
|
<foreach collection="ischInclDataSet" item="item">
|
|
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="rtpyrNm != null">
|
|
|
|
|
AND P.RTPYR_NM = #{rtpyrNm} /* 납부자 명 */
|
|
|
|
|
|
|
|
|
|
<!-- 동적 검색 -->
|
|
|
|
|
<if test="by != null and by != '' and term != null">
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="mainOption == 'codeValue' or mainOption == 'match' or mainOption == 'ymd'">
|
|
|
|
|
<include refid="dynamicSearch.start" />
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="by == 'crdnInptSeCd'">C.CRDN_INPT_SE_CD</when>
|
|
|
|
|
<when test="by == 'crdnYmd'">C.CRDN_YMD</when>
|
|
|
|
|
<when test="by == 'vhrno'">C.VHRNO</when>
|
|
|
|
|
<when test="by == 'crdnStdgNm'">C.CRDN_STDG_NM</when>
|
|
|
|
|
<when test="by == 'atchFileCnt'">C.ATCH_FILE_CNT</when>
|
|
|
|
|
<when test="by == 'crdnSn'">CA.CRDN_SN</when>
|
|
|
|
|
</choose>
|
|
|
|
|
<include refid="dynamicSearch.center" />#{term}<include refid="dynamicSearch.end" />
|
|
|
|
|
</when>
|
|
|
|
|
<otherwise>
|
|
|
|
|
|
|
|
|
|
</otherwise>
|
|
|
|
|
</choose>
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<include refid="utility.sortBy" />
|
|
|
|
|