select factory_id, factory_no, factory_name, factory_rg_ratio, factory_wj_ratio, factory_fl_ratio, factory_df_ratio, factory_trq_ratio, factory_ys_ratio, factory_pj_ratio, factory_total_ratio from c_factory
insert into c_factory
factory_id,
factory_no,
factory_name,
factory_rg_ratio,
factory_wj_ratio,
factory_fl_ratio,
factory_df_ratio,
factory_trq_ratio,
factory_ys_ratio,
factory_pj_ratio,
factory_total_ratio,
#{factoryId},
#{factoryNo},
#{factoryName},
#{factoryRgRatio},
#{factoryWjRatio},
#{factoryFlRatio},
#{factoryDfRatio},
#{factoryTrqRatio},
#{factoryYsRatio},
#{factoryPjRatio},
#{factoryTotalRatio},
update c_factory
factory_no = #{factoryNo},
factory_name = #{factoryName},
factory_rg_ratio = #{factoryRgRatio},
factory_wj_ratio = #{factoryWjRatio},
factory_fl_ratio = #{factoryFlRatio},
factory_df_ratio = #{factoryDfRatio},
factory_trq_ratio = #{factoryTrqRatio},
factory_ys_ratio = #{factoryYsRatio},
factory_pj_ratio = #{factoryPjRatio},
factory_total_ratio = #{factoryTotalRatio},
where factory_id = #{factoryId}
delete from c_factory where factory_id = #{factoryId}
delete from c_factory where factory_id in
#{factoryId}
delete from c_material_type_factory where factory_id in
#{factoryId}
delete from c_material_type_factory where factory_id = #{factoryId}
insert into c_material_type_factory(type_no, type_name, factory_id) values
(#{item.typeNo}, #{item.typeName}, #{item.factoryId})