ldpl.order_package_reservation_status = 10 and ldpl.order_package_freeze_status = 10 AND ldpl.order_package_loading_status = 10 AND order_package_status IN (10,20)
and ldpl.stock_article_id = #{param.id} and ldpl.warehouse_id = #{warehouseId}
<iftest="param.waybillNumber != null and param.waybillNumber != ''">
and ldpl.waybill_number like concat('%',#{param.waybillNumber},'%')
</if>
<iftest="param.serviceNumber != null and param.serviceNumber != ''">
and ldpl.service_number like concat('%',#{param.serviceNumber},'%')
</if>
<iftest="param.orderCode != null and param.orderCode != ''">
and ldpl.order_code like concat('%',#{param.orderCode},'%')
</if>
<iftest="param.orderCode != null and param.orderCode != ''">
and ldpl.order_code like concat('%',#{param.orderCode},'%')
</if>
<iftest="param.orderPackageCode != null and param.orderPackageCode != ''">
and ldpl.order_package_code like concat('%',#{param.orderPackageCode},'%')
</if>
<iftest="param.warehouse != null and param.warehouse != ''">
and ldpl.warehouse like concat('%',#{param.warehouse},'%')
</if>
<iftest="param.warehouse != null and param.warehouse != ''">
and ldpl.warehouse like concat('%',#{param.warehouse},'%')
</if>
<iftest="param.sendWarehouseName != null and param.sendWarehouseName != ''">
and ldpl.send_warehouse_name like concat('%',#{param.sendWarehouseName},'%')
</if>
<iftest="param.firsts != null and param.firsts != ''">
and ldpl.firsts like concat('%',#{param.firsts},'%')
</if>
<iftest="param.second != null and param.second != ''">
and ldpl.second like concat('%',#{param.second},'%')
</if>
<iftest="param.thirdProduct != null and param.thirdProduct != ''">
and ldpl.third_product like concat('%',#{param.thirdProduct},'%')