프로젝트관리 검색필터

This commit is contained in:
leeheejin
2025-12-19 16:33:30 +09:00
parent d8472dd5a1
commit 787a077a2f
3 changed files with 106 additions and 0 deletions

View File

@@ -4243,6 +4243,38 @@
<if test="setup != null and !''.equals(setup)">
AND UPPER(SETUP) LIKE UPPER('%${setup}%')
</if>
<!-- 국내/해외 필터 -->
<if test="area_cd != null and area_cd != ''">
AND CODE_NAME(AREA_CD) = #{area_cd}
</if>
<!-- 유/무상 필터 -->
<if test="free_of_charge != null and free_of_charge != ''">
AND (SELECT
CASE
WHEN O.PAID_TYPE = 'paid' THEN '유상'
WHEN O.PAID_TYPE = 'free' THEN '무상'
ELSE O.PAID_TYPE
END
FROM CONTRACT_MGMT AS O WHERE O.OBJID = T.CONTRACT_OBJID) = #{free_of_charge}
</if>
<!-- 품번 필터 -->
<if test="product_item_code != null and product_item_code != ''">
AND UPPER(T.PART_NO) LIKE UPPER('%' || #{product_item_code} || '%')
</if>
<!-- 품명 필터 -->
<if test="product_item_name != null and product_item_name != ''">
AND UPPER(T.PART_NAME) LIKE UPPER('%' || #{product_item_name} || '%')
</if>
<!-- S/N 필터 -->
<if test="serial_no != null and serial_no != ''">
AND EXISTS (
SELECT 1 FROM CONTRACT_ITEM AS I
LEFT JOIN CONTRACT_ITEM_SERIAL AS S ON S.ITEM_OBJID = I.OBJID AND S.STATUS = 'ACTIVE'
WHERE I.CONTRACT_OBJID = T.CONTRACT_OBJID
AND I.PART_OBJID = T.PART_OBJID
AND UPPER(S.SERIAL_NO) LIKE UPPER('%' || #{serial_no} || '%')
)
</if>
ORDER BY SUBSTRING(PROJECT_NO,POSITION('-' IN PROJECT_NO)+1) DESC, OVERHAUL_ORDER DESC NULLS LAST
</select>