left join plm_routing_detail as b on a.site = b.site and a.part_no = b.part_no and a.routing_revision = b.routing_revision and a.routing_type = b.routing_type and a.alternative_no = b.alternative_no
<where>
site = #{site} and part_no = #{partNo}
a.site = #{site} and a.part_no = #{partNo}
<iftest ="routingRevision != null and routingRevision != ''">
AND a.routing_revision = #{routingRevision}
</if>
<iftest ="routingType != null and routingType != ''">
AND a.routing_type = #{routingType}
</if>
<iftest ="alternativeNo != null and alternativeNo != ''">
AND a.alternative_no = #{alternativeNo}
</if>
<iftest ="operationNo != null and operationNo != ''">
AND a.operation_no = #{operationNo}
</if>
<iftest ="operationName != null and operationName != ''">
AND operation_name like #{operationName}
AND a.operation_name like #{operationName}
</if>
<iftest ="operationId != null and operationId != ''">