INSERT INTO leave_apply(user_id, user_name, org_id, org_name, leave_type, leave_reason,
leave_start_date, leave_start_interval, leave_end_date, leave_end_interval,
leave_duration, source, create_user_id, is_agree, location, host_user_id, remark
, leave_form_id, submit_id,examine_status)
VALUES (#{userId}, #{userName}, #{orgId}, #{orgName}, '出差报备', #{leaveReason},
#{leaveStartDate}, #{leaveStartInterval}, #{leaveEndDate}, #{leaveEndInterval},
#{leaveDuration}, #{source}, #{createUserId}, #{isAgree}, #{location}, #{hostUserId}, #{remark},
#{uuid}, #{createUserId},'1')
UPDATE leave_apply
user_id = #{userId},
user_name = #{userName},
org_id = #{orgId},
org_name = #{orgName},
type = #{type},
host_user_id = #{hostUserId},
location = #{location},
is_agree = #{isAgree},
remark = #{remark},
leave_reason = #{leaveReason},
leave_start_date = #{leaveStartDate},
leave_start_interval = #{leaveStartInterval},
leave_end_date = #{leaveEndDate},
leave_end_interval = #{leaveEndInterval},
leave_duration = #{leaveDuration},
update_user_id = #{updateUserId}
where leave_form_id = #{uuid}
update leave_apply
SET is_active = '0'
WHERE leave_form_id = #{uuid}