| | |
| | | <!-- 保存车辆信息 add by wuxw 2018-07-03 --> |
| | | <!-- 新增字段:first_payment_date、payment_deadline_date、unit_price_per_month、annual_receivable_amount --> |
| | | <insert id="saveOwnerCarInfo" parameterType="Map"> |
| | | insert into owner_car(car_brand, car_num, ps_id, remark, owner_id, car_type_cd, user_id, car_id, car_color, |
| | | car_type, 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) |
| | | values (#{carBrand}, #{carNum}, #{psId}, #{remark}, #{ownerId}, #{carTypeCd}, #{userId}, #{carId}, #{carColor}, |
| | | #{carType}, #{startTime}, #{endTime}, #{state}, #{communityId}, #{memberId}, '-1',#{leaseType}, |
| | | #{firstPaymentDate}, #{paymentDeadlineDate}, #{unitPricePerMonth}, #{annualReceivableAmount}) |
| | | 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}, |
| | | <!-- 正确处理start_time:为空则赋值NULL,否则取参数值 --> |
| | | <choose> |
| | | <when test="startTime == null or startTime == ''">NULL</when> |
| | | <otherwise>#{startTime}</otherwise> |
| | | </choose>, |
| | | <!-- 正确处理end_time:为空则赋值NULL,否则取参数值 --> |
| | | <choose> |
| | | <when test="endTime == null or endTime == ''">NULL</when> |
| | | <otherwise>#{endTime}</otherwise> |
| | | </choose>, |
| | | #{state}, #{communityId}, #{memberId}, '-1',#{leaseType}, |
| | | #{firstPaymentDate}, #{paymentDeadlineDate}, #{unitPricePerMonth}, #{annualReceivableAmount}, #{parkingType}) |
| | | </insert> |
| | | |
| | | |
| | |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="parkingType !=null and parkingType != ''"> |
| | | and t.parking_type= #{parkingType} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |