select work_order_id, sales_order_number, work_order_number, line, process_dept, enterprise_code, enterprise_name, finish_product_code, finish_product_name, specification_model, type_machine, inventory_unit, order_quantity, delivery_order_quantity, begin_order_quantity, not_begin_order_quantity, customer_factory, begin_date, end_date, billing_time, delivery_time, version_number, sales_explain, work_order_class, first_add_time, update_info_time, close_case_flag, close_case_person, close_case_time, standby_one, standby_two from work_order_info
insert into work_order_info
sales_order_number,
work_order_number,
line,
process_dept,
enterprise_code,
enterprise_name,
finish_product_code,
finish_product_name,
specification_model,
type_machine,
inventory_unit,
order_quantity,
delivery_order_quantity,
begin_order_quantity,
not_begin_order_quantity,
customer_factory,
begin_date,
end_date,
billing_time,
delivery_time,
version_number,
sales_explain,
work_order_class,
first_add_time,
update_info_time,
close_case_flag,
close_case_person,
close_case_time,
standby_one,
standby_two,
first_add_time,
#{salesOrderNumber},
#{workOrderNumber},
#{line},
#{processDept},
#{enterpriseCode},
#{enterpriseName},
#{finishProductCode},
#{finishProductName},
#{specificationModel},
#{typeMachine},
#{inventoryUnit},
#{orderQuantity},
#{deliveryOrderQuantity},
#{beginOrderQuantity},
#{notBeginOrderQuantity},
#{customerFactory},
#{beginDate},
#{endDate},
#{billingTime},
#{deliveryTime},
#{versionNumber},
#{salesExplain},
#{workOrderClass},
#{firstAddTime},
#{updateInfoTime},
#{closeCaseFlag},
#{closeCasePerson},
#{closeCaseTime},
#{standbyOne},
#{standbyTwo},
now(),
update work_order_info
sales_order_number = #{salesOrderNumber},
work_order_number = #{workOrderNumber},
line = #{line},
process_dept = #{processDept},
enterprise_code = #{enterpriseCode},
enterprise_name = #{enterpriseName},
finish_product_code = #{finishProductCode},
finish_product_name = #{finishProductName},
specification_model = #{specificationModel},
type_machine = #{typeMachine},
inventory_unit = #{inventoryUnit},
order_quantity = #{orderQuantity},
delivery_order_quantity = #{deliveryOrderQuantity},
begin_order_quantity = #{beginOrderQuantity},
not_begin_order_quantity = #{notBeginOrderQuantity},
customer_factory = #{customerFactory},
begin_date = #{beginDate},
end_date = #{endDate},
billing_time = #{billingTime},
delivery_time = #{deliveryTime},
version_number = #{versionNumber},
sales_explain = #{salesExplain},
work_order_class = #{workOrderClass},
first_add_time = #{firstAddTime},
update_info_time = #{updateInfoTime},
close_case_flag = #{closeCaseFlag},
close_case_person = #{closeCasePerson},
close_case_time = #{closeCaseTime},
standby_one = #{standbyOne},
standby_two = #{standbyTwo},
update_info_time = CONCAT_WS(',',NOW(),update_info_time),
where work_order_id = #{workOrderId}
delete from work_order_info where work_order_id = #{workOrderId}
delete from work_order_info where work_order_id in
#{workOrderId}