select obj_id, work_unit_code, parent_id, work_unit_name, work_unit_address, ancestors, work_unit_sort, product_line_code, work_unit_type, is_flag, created_by, created_time, updated_by, updated_time from base_work_unit
SELECT seq_report_day_dnb.NEXTVAL as objId FROM DUAL
insert into base_work_unit
obj_id,
work_unit_code,
parent_id,
work_unit_name,
work_unit_address,
ancestors,
work_unit_sort,
product_line_code,
work_unit_type,
is_flag,
created_by,
created_time,
updated_by,
updated_time,
#{objId},
#{workUnitCode},
#{parentId},
#{workUnitName},
#{workUnitAddress},
#{ancestors},
#{workUnitSort},
#{productLineCode},
#{workUnitType},
#{isFlag},
#{createdBy},
#{createdTime},
#{updatedBy},
#{updatedTime},
update base_work_unit
work_unit_code = #{workUnitCode},
parent_id = #{parentId},
work_unit_name = #{workUnitName},
work_unit_address = #{workUnitAddress},
ancestors = #{ancestors},
work_unit_sort = #{workUnitSort},
product_line_code = #{productLineCode},
work_unit_type = #{workUnitType},
is_flag = #{isFlag},
created_by = #{createdBy},
created_time = #{createdTime},
updated_by = #{updatedBy},
updated_time = #{updatedTime},
where obj_id = #{objId}
delete from base_work_unit where obj_id = #{objId}
delete from base_work_unit where obj_id in
#{objId}