|
|
@ -16,41 +16,46 @@ |
|
|
FROM |
|
|
FROM |
|
|
plm_rfq_header |
|
|
plm_rfq_header |
|
|
<where> |
|
|
<where> |
|
|
<if test="query.buNo != null and query.buNo != ''"> |
|
|
|
|
|
AND bu_no = #{query.buNo} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.rfqNo != null and query.rfqNo != ''"> |
|
|
|
|
|
AND rfq_no like #{query.rfqNo} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.customerNo != null and query.customerNo != ''"> |
|
|
|
|
|
AND customer_no like #{query.customerNo} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.customerDesc != null and query.customerDesc != ''"> |
|
|
|
|
|
AND dbo.plm_get_customer_desc ( site, customer_no ) like #{query.customerDesc} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.requesterName != null and query.requesterName != ''"> |
|
|
|
|
|
AND dbo.get_requester_name(site,requester) like #{query.requesterName} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.quoterName != null and query.quoterName != ''"> |
|
|
|
|
|
AND dbo.get_quoter_name(site,quoter) like #{query.quoterName} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.priorityLevel != null and query.priorityLevel != ''"> |
|
|
|
|
|
AND priority_level = #{query.priorityLevel} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.status != null and query.status != ''"> |
|
|
|
|
|
AND status = #{query.status} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.requestStartDate != null"> |
|
|
|
|
|
AND request_date >= #{query.requestStartDate} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.requestEndDate != null"> |
|
|
|
|
|
AND #{query.requestEndDate} >= request_date |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.requiredCompletionStartDate != null"> |
|
|
|
|
|
AND required_completion_date >= #{query.requiredCompletionStartDate} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.requiredCompletionEndDate != null"> |
|
|
|
|
|
AND #{query.requiredCompletionEndDate} >= required_completion_date |
|
|
|
|
|
|
|
|
<if test="query.id != null"> |
|
|
|
|
|
AND id = #{query.id} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.id == null"> |
|
|
|
|
|
<if test="query.buNo != null and query.buNo != ''"> |
|
|
|
|
|
AND bu_no = #{query.buNo} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.rfqNo != null and query.rfqNo != ''"> |
|
|
|
|
|
AND rfq_no like #{query.rfqNo} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.customerNo != null and query.customerNo != ''"> |
|
|
|
|
|
AND customer_no like #{query.customerNo} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.customerDesc != null and query.customerDesc != ''"> |
|
|
|
|
|
AND dbo.plm_get_customer_desc ( site, customer_no ) like #{query.customerDesc} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.requesterName != null and query.requesterName != ''"> |
|
|
|
|
|
AND dbo.get_requester_name(site,requester) like #{query.requesterName} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.quoterName != null and query.quoterName != ''"> |
|
|
|
|
|
AND dbo.get_quoter_name(site,quoter) like #{query.quoterName} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.priorityLevel != null and query.priorityLevel != ''"> |
|
|
|
|
|
AND priority_level = #{query.priorityLevel} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.status != null and query.status != ''"> |
|
|
|
|
|
AND status = #{query.status} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.requestStartDate != null"> |
|
|
|
|
|
AND request_date >= #{query.requestStartDate} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.requestEndDate != null"> |
|
|
|
|
|
AND #{query.requestEndDate} >= request_date |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.requiredCompletionStartDate != null"> |
|
|
|
|
|
AND required_completion_date >= #{query.requiredCompletionStartDate} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="query.requiredCompletionEndDate != null"> |
|
|
|
|
|
AND #{query.requiredCompletionEndDate} >= required_completion_date |
|
|
|
|
|
</if> |
|
|
</if> |
|
|
</if> |
|
|
</where> |
|
|
</where> |
|
|
</select> |
|
|
</select> |
|
|
|