단속자료검사 조회조건 수정

main
이범준 1 year ago
parent c804573d8b
commit d3a8a1ca98

@ -217,6 +217,16 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
<if test="crdnSttsCd != null"> <if test="crdnSttsCd != null">
AND C.CRDN_STTS_CD = #{crdnSttsCd} AND C.CRDN_STTS_CD = #{crdnSttsCd}
</if> </if>
<if test="schDateFrom != null or schDateTo != null">
<if test="schDateOpt == 'regDt'">
<if test="schDateFrom != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ >= ]]> #{schDateFrom} </if>
<if test="schDateTo != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ <= ]]> #{schDateTo} </if>
</if>
<if test="schDateOpt == 'mdfcnDt'">
<if test="schDateFrom != null">AND SUBSTR(C.MDFCN_DT,1,8) <![CDATA[ >= ]]> #{schDateFrom} </if>
<if test="schDateTo != null">AND SUBSTR(C.MDFCN_DT,1,8) <![CDATA[ <= ]]> #{schDateTo} </if>
</if>
</if>
<include refid="utility.orderBy" /> <include refid="utility.orderBy" />
<include refid="utility.paging-suffix"/> <include refid="utility.paging-suffix"/>
</select> </select>
@ -276,6 +286,16 @@ SELECT GROUP_CONCAT(C.CRDN_ID) AS CRDN_ID_LIST <!-- 단속 ID -->
<if test="crdnSttsCd != null"> <if test="crdnSttsCd != null">
AND C.CRDN_STTS_CD = #{crdnSttsCd} AND C.CRDN_STTS_CD = #{crdnSttsCd}
</if> </if>
<if test="schDateFrom != null or schDateTo != null">
<if test="schDateOpt == 'regDt'">
<if test="schDateFrom != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ >= ]]> #{schDateFrom} </if>
<if test="schDateTo != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ <= ]]> #{schDateTo} </if>
</if>
<if test="schDateOpt == 'mdfcnDt'">
<if test="schDateFrom != null">AND SUBSTR(C.MDFCN_DT,1,8) <![CDATA[ >= ]]> #{schDateFrom} </if>
<if test="schDateTo != null">AND SUBSTR(C.MDFCN_DT,1,8) <![CDATA[ <= ]]> #{schDateTo} </if>
</if>
</if>
GROUP BY C.VHRNO<if test="schOnlySamePlace == 'on'">, C.CRDN_STDG_NM </if> GROUP BY C.VHRNO<if test="schOnlySamePlace == 'on'">, C.CRDN_STDG_NM </if>
HAVING COUNT(*) <![CDATA[ >= ]]> HAVING COUNT(*) <![CDATA[ >= ]]>
<choose> <choose>

Loading…
Cancel
Save