a.review_order_id AS review_order_id,
a.review_order_number,
a.out_order_id,
a.out_order_number,
a.organization_id,
a.organization_name,
a.top_organization_id,
a.review_status,
a.issued_flag,
a.issued_time,
a.warehouse_id,
a.warehouse_code,
a.warehouse_name,
a.customer_id,
a.customer_code,
a.customer_name,
a.shipper_id,
a.shipper_code,
a.shipper_name,
a.receive_time,
a.remark,
a.create_by,
a.create_by_name,
a.create_time,
a.update_by,
a.update_by_name,
a.update_time,
a.del_flag
and a.review_order_id = #{reviewOrderId}
and a.review_order_number like concat('%', #{reviewOrderNumber}, '%')
and a.out_order_number like concat('%', #{outOrderNumber}, '%')
and a.review_status = #{reviewStatus}
and a.review_status < #{ltReviewStatus}
and a.issued_flag = #{issuedFlag}
and a.organization_id = #{organizationId}
and a.top_organization_id = #{topOrganizationId}
and a.warehouse_id = #{warehouseId}
and a.review_order_id in
#{item}
and a.customer_name like concat('%', #{customerName}, '%')
and a.shipper_name like concat('%', #{shipperName}, '%')
and a.shipper_id like concat('%', #{shipperId}, '%')
and date_format(a.create_time, '%Y-%m-%d') >= #{createTimeStart}
and date_format(a.create_time, '%Y-%m-%d') <= #{createTimeEnd}
and date_format(a.receive_time, '%Y-%m-%d') >= #{receiveTimeStart}
and date_format(a.receive_time, '%Y-%m-%d') <= #{receiveTimeEnd}
and a.receive_time is not null
and a.del_flag = #{delFlag}
and a.del_flag = 1
d.review_material_detail_id,
d.review_order_id,
d.review_order_number,
d.out_order_number,
d.out_unique_id,
d.material_detail_id,
d.material_base_info_id,
d.material_code,
d.material_name,
d.bar_code,
d.SIZE,
d.unit_code,
d.unit_name,
d.pending_review_qty,
d.reviewed_qty,
d.cancel_qty,
d.material_plan_qty,
d.receipt_order_number,
d.lot_no,
d.batch_number,
d.production_date,
d.expiry_date,
d.inventory_date,
d.batch_ref_no,
d.sheet_ref_no,
d.box_pallet_no,
d.ext_attr_1,
d.ext_attr_2,
d.ext_attr_3,
d.ext_attr_4,
d.review_qty_ea,
d.net_weight_kg,
d.gross_weight_kg,
d.volume_cbm,
d.area_sqm,
d.remark,
d.create_by,
d.create_by_name,
d.create_time,
d.update_by,
d.update_by_name,
d.update_time,
d.del_flag,
d.pack_id, d.pack_code, d.pack_name, d.pack_detail_id