insert into pay_fee_config(fee_type_cd, computing_formula, additional_amount, bill_type, computing_formula_text, square_price, payment_cd, is_default, config_id, fee_flag, fee_name, payment_cycle, start_time, end_time, community_id, deduct_from, pay_online, scale, decimal_place, units, prepayment_period,state,secondary_fee_type_cd) values (#{feeTypeCd}, #{computingFormula}, #{additionalAmount}, #{billType}, #{computingFormulaText}, #{squarePrice}, #{paymentCd}, #{isDefault}, #{configId}, #{feeFlag}, #{feeName}, #{paymentCycle}, #{startTime}, #{endTime}, #{communityId}, #{deductFrom}, #{payOnline}, #{scale}, #{decimalPlace}, #{units}, #{prepaymentPeriod},#{state},#{secondaryFeeTypeCd}) update pay_fee_config t set t.status_cd = #{statusCd} ,t.b_id = #{newBId} , t.fee_type_cd= #{feeTypeCd} , t.secondary_fee_type_cd= #{secondaryFeeTypeCd} , t.computing_formula= #{computingFormula} , t.additional_amount= #{additionalAmount} , t.bill_type= #{billType} , t.computing_formula_text= #{computingFormulaText} , t.square_price= #{squarePrice} , t.payment_cd= #{paymentCd} , t.is_default= #{isDefault} , t.fee_flag= #{feeFlag} , t.fee_name= #{feeName} , t.payment_cycle= #{paymentCycle} , t.start_time= #{startTime} , t.end_time= #{endTime} , t.deduct_from= #{deductFrom} , t.pay_online= #{payOnline} , t.scale= #{scale} , t.decimal_place= #{decimalPlace} , t.units= #{units} , t.prepayment_period = #{prepaymentPeriod} , t.state = #{state} where 1=1 and t.config_id= #{configId} and t.community_id in (#{communityId}, '9999')