select id, plan_factory_code, order_type, order_code, prod_code, prod_desc, quantity, quantity_split, unit, worker_order, plan_pro_date, plan_complete, atrr1, atrr2, atrr3, status, parent_order, create_by, create_time, update_by, update_time, prod_type, factory_code, prod_spc from pro_order insert into pro_order id, plan_factory_code, factory_code, order_type, order_code, prod_code, prod_desc, quantity, quantity_split, unit, worker_order, plan_pro_date, plan_complete, atrr1, atrr2, atrr3, status, parent_order, create_by, create_time, update_by, update_time, prod_type, prod_spc, #{id}, #{planFactoryCode}, #{factoryCode}, #{orderType}, #{orderCode}, #{prodCode}, #{prodDesc}, #{quantity}, #{quantitySplit}, #{unit}, #{workerOrder}, #{planProDate}, #{planComplete}, #{atrr1}, #{atrr2}, #{atrr3}, #{status}, #{parentOrder}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{prodType}, #{prodSpc}, update pro_order plan_factoryCode = #{planFactoryCode}, factory_code = #{factoryCode}, order_type = #{orderType}, order_code = #{orderCode}, prod_code = #{prodCode}, prod_desc = #{prodDesc}, quantity = #{quantity}, quantity_split = #{quantitySplit}, unit = #{unit}, worker_order = #{workerOrder}, plan_pro_date = #{planProDate}, plan_complete = #{planComplete}, atrr1 = #{atrr1}, atrr2 = #{atrr2}, atrr3 = #{atrr3}, status = #{status}, parent_order = #{parentOrder}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, prod_type = #{prodType}, prod_spc = #{prodSpc}, where id = #{id} update pro_order quantity_split += #{atrr1}, quantity_split = #{atrr1}, update_by = #{updateBy}, update_time = #{updateTime}, status = #{status}, where id = #{id} update pro_order set quantity_split = quantity_split-#{worker.quantitySplit}, update_time = GETDATE() where id = #{worker.orderId} delete from pro_order where id = #{id} delete from pro_order where id in #{id}