insert into owner_car(parking_location, car_brand, car_num, ps_id, remark, owner_id, car_type_cd, user_id, car_id, car_color,
car_type, road_name, floor_num, unit_num, room_num, start_time, end_time, state, community_id, member_id, b_id,lease_type,
first_payment_date, payment_deadline_date, unit_price_per_month, annual_receivable_amount, parking_type)
values (#{parkingLocation}, #{carBrand}, #{carNum}, #{psId}, #{remark}, #{ownerId}, #{carTypeCd}, #{userId}, #{carId}, #{carColor},
#{carType},#{roadName},#{floorNum},#{unitNum},#{roomNum},
NULL
#{startTime}
,
NULL
#{endTime}
,
#{state}, #{communityId}, #{memberId}, '-1',#{leaseType},
#{firstPaymentDate}, #{paymentDeadlineDate}, #{unitPricePerMonth}, #{annualReceivableAmount}, #{parkingType})
update owner_car t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.car_brand= #{carBrand}
, t.car_num= #{carNum}
, t.ps_id= #{psId}
, t.remark= #{remark}
, t.owner_id= #{ownerId}
, t.user_id= #{userId}
, t.car_color= #{carColor}
, t.car_type= #{carType}
, t.start_time= #{startTime}
, t.end_time= #{endTime}
, t.state= #{state}
, t.lease_type= #{leaseType}
, t.first_payment_date= #{firstPaymentDate}
, t.payment_deadline_date= #{paymentDeadlineDate}
, t.unit_price_per_month= #{unitPricePerMonth}
, t.annual_receivable_amount= #{annualReceivableAmount}
where 1=1
and t.b_id= #{bId}
and t.car_id= #{carId}
and t.member_id= #{memberId}
and t.community_id= #{communityId}
and t.car_type_cd= #{carTypeCd}