@ -1192,4 +1192,25 @@
JOIN Z_ABNORMAL_BILL_DISPOSE ZABD ON ZABD.ABNORMAL_BILL_BO= ZAB.HANDLE
WHERE zab.SITE=#{site} AND zab.STATUS='G' AND zab."TYPE"='Z' AND s.QTY>1 AND (ZABD.ABNORMAL_METHOD='F' OR ZABD.ABNORMAL_METHOD='C') ORDER BY ZABD.CLOSED_DATE_TIME DESC
</select>
<select id= "getAbnormalByConditional" resultMap= "BaseResultMap" >
SELECT zab.ABNORMAL_NO ABNORMAL_NO,zab.PB_DESCRIPTION PB_DESCRIPTION
FROM Z_ABNORMAL_BILL zab
INNER JOIN Z_ABNORMAL_BILL_DISPOSE zabd ON zab.HANDLE = zabd.ABNORMAL_BILL_BO
<where >
zab.SITE = #{paramMap.site}
AND zab.SFC IS NOT NULL
<if test= "paramMap.abnormalMethod != null and paramMap.abnormalMethod != ''" >
AND zabd.ABNORMAL_METHOD = #{paramMap.abnormalMethod}
</if>
<if test= "paramMap.type != null and paramMap.type != ''" >
AND zab.TYPE = #{paramMap.type}
</if>
<if test= "keyword != null and keyword != ''" >
AND (zab.ABNORMAL_NO LIKE '%${keyword}%'
OR zab.PB_DESCRIPTION LIKE '%${keyword}%')
</if>
</where>
ORDER BY zab.CREATED_DATE_TIME DESC
</select>
</mapper>