select * from ( select aowh.id, aowh.inspection_item_class, aowh.inspection_item, aowh.inspection_item_subclass, aowh.overtime_order_no, aowh.overtime_work_time, aowh.overtime_amount, aowh.order_no, aowh.work_time, aowh.amount, aowh.output_work_time, aowh.date_time, aowh.week, aowh.week_day, user.name, aowh.sample, aowh.price, aowh.man_hour_group, ip.cable_tag FROM auxiliary_output_working_hours aowh left join ins_product ip on ip.id = aowh.ins_product_id left join user on user.id=aowh.`check` WHERE 1=1 and `check` in #{val} ) A ${ew.customSqlSegment}