INSERT INTO wms_order ( order_code, customer_id, customer_name, sales_manager, order_status, remark, tax_amount, no_tax_amount, del_flag, create_by, update_by ) VALUES ( #{orderCode}, #{customerId}, #{customerName}, #{salesManager}, #{orderStatus}, #{remark}, #{taxAmount}, #{noTaxAmount}, 0, #{createBy}, #{updateBy} ) INSERT INTO wms_order_detail ( order_id, product_id, quantity, unit, remark, tax_price, no_tax_price, group_id, del_flag, create_by, update_by ) VALUES ( #{orderId}, #{productId}, #{quantity}, #{unit}, #{remark}, #{taxPrice}, #{noTaxPrice}, #{groupId}, IFNULL(#{delFlag}, 0), #{createBy}, #{updateBy} ) INSERT INTO wms_schedule_plan ( plan_code, version, order_id, status, remark, del_flag, create_by, update_by, priority, start_date, end_date ) VALUES ( #{planCode}, #{version}, #{orderId}, #{status}, #{remark}, #{delFlag}, #{createBy}, #{updateBy}, #{priority}, #{startDate}, #{endDate} ) INSERT INTO wms_schedule_plan_detail ( plan_id, line_id, task_id, product_id, quantity, start_date, end_date, remark, del_flag, create_by, update_by ) VALUES ( #{planId}, #{lineId}, #{taskId}, #{productId}, #{quantity}, #{startDate}, #{endDate}, #{remark}, #{delFlag}, #{createBy}, #{updateBy} )