insert into business_resource_store_use_record(unit_price, create_user_id, quantity, rsur_id, repair_id, create_user_name, remark, store_id, res_id, resource_store_name, operate, b_id, community_id, state) values (#{unitPrice}, #{createUserId}, #{quantity}, #{rsurId}, #{repairId}, #{createUserName}, #{remark}, #{storeId}, #{resId}, #{resourceStoreName}, #{operate}, #{bId}, #{communityId}, #{state}) insert into resource_store_use_record( unit_price,create_user_id,quantity,rsur_id,repair_id,create_user_name,status_cd,remark,store_id,res_id,resource_store_name,b_id,community_id,state ) select t.unit_price,t.create_user_id,t.quantity,t.rsur_id,t.repair_id,t.create_user_name,'0',t.remark,t.store_id,t.res_id,t.resource_store_name,t.b_id,t.community_id,t.state from business_resource_store_use_record t where 1=1 and t.unit_price= #{unitPrice} and t.create_user_id= #{createUserId} and t.quantity= #{quantity} and t.rsur_id= #{rsurId} and t.repair_id= #{repairId} and t.create_user_name= #{createUserName} and t.remark= #{remark} and t.store_id= #{storeId} and t.res_id= #{resId} and t.state= #{state} and t.resource_store_name= #{resourceStoreName} and t.operate= 'ADD' and t.b_id= #{bId} and t.community_id= #{communityId} update resource_store_use_record t set t.status_cd = #{statusCd} ,t.b_id = #{newBId} , t.unit_price= #{unitPrice} , t.create_user_id= #{createUserId} , t.quantity= #{quantity} , t.repair_id= #{repairId} , t.create_user_name= #{createUserName} , t.remark= #{remark} , t.store_id= #{storeId} , t.res_id= #{resId} , t.state= #{state} , t.resource_store_name= #{resourceStoreName} , t.community_id= #{communityId} where 1=1 and t.rsur_id= #{rsurId} and t.b_id= #{bId}