insert into business_pay_fee_detail( operate,prime_rate,detail_id, receivable_amount,cycles,remark, received_amount,community_id,b_id,fee_id,state,start_time,end_time,payable_amount,open_invoice ,create_time ) values ( #{operate},#{primeRate},#{detailId},#{receivableAmount}, #{cycles},#{remark},#{receivedAmount},#{communityId},#{bId},#{feeId},#{state},#{startTime},#{endTime},#{payableAmount},#{openInvoice} ,#{createTime} ) insert into pay_fee_detail( prime_rate,detail_id,receivable_amount,cycles,remark,status_cd,received_amount,community_id,b_id,fee_id,state,start_time,end_time,create_time,payable_amount) select t.prime_rate,t.detail_id,t.receivable_amount,t.cycles,t.remark,'0',t.received_amount,t.community_id,t.b_id,t.fee_id,state,t.start_time,t.end_time, t.create_time,t.payable_amount from business_pay_fee_detail t where 1=1 and t.operate= 'ADD' and t.prime_rate= #{primeRate} and t.detail_id= #{detailId} and t.receivable_amount= #{receivableAmount} and t.cycles= #{cycles} and t.remark= #{remark} and t.received_amount= #{receivedAmount} and t.payable_amount= #{payableAmount} and t.community_id= #{communityId} and t.b_id= #{bId} and t.fee_id= #{feeId} update pay_fee_detail t set t.status_cd = #{statusCd} ,t.b_id = #{newBId} , t.prime_rate= #{primeRate} , t.receivable_amount= #{receivableAmount} , t.cycles= #{cycles} , t.remark= #{remark} , t.received_amount= #{receivedAmount} , t.payable_amount= #{payableAmount} , t.community_id= #{communityId} , t.state= #{state} , t.fee_id= #{feeId} , t.open_invoice= #{openInvoice} where 1=1 and t.detail_id= #{detailId} and t.b_id= #{bId} insert into pay_fee_detail( prime_rate,detail_id,receivable_amount,cycles,remark,received_amount,community_id, fee_id,state,start_time,end_time,payable_amount,cashier_name,cashier_id,open_invoice ,create_time ) values(#{primeRate},#{detailId},#{receivableAmount},#{cycles},#{remark},#{receivedAmount},#{communityId},#{feeId},#{state}, #{startTime},#{endTime},#{payableAmount},#{cashierName},#{cashierId},#{openInvoice} ,#{createTime} )