insert into charge_machine_factory_spec( spec_id,spec_name,factory_id,remark ) values ( #{specId},#{specName},#{factoryId},#{remark} ) update charge_machine_factory_spec t set t.status_cd = #{statusCd} ,t.b_id = #{newBId} , t.spec_name= #{specName} , t.remark= #{remark} where 1=1 and t.spec_id= #{specId} and t.factory_id= #{factoryId}