INSERT INTO leave_apply_wechat(uuid, user_id, user_name, org_id, org_name, type, 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,
host_user_name, remark
, leave_form_id, submit_id, examine_status, is_plateau, plateau_subsidy,is_update,is_sync)
VALUES (#{uuid}, #{userId}, #{userName}, #{orgId}, #{orgName}, '出差', '出差', #{leaveReason},
#{leaveStartDate},
#{leaveStartInterval},
#{leaveEndDate},
#{leaveEndInterval},
#{leaveDuration}, #{source}, #{createUserId}, #{isAgree}, #{location}, #{hostUserId}, #{hostUserName},
#{remark},
#{leaveFormId}, #{createUserId}, '1', #{isPlateau}, #{plateauSubsidy},'0','0')
INSERT INTO leave_apply_wechat(uuid, user_id, user_name, org_id, org_name, leave_type, 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,
host_user_name, remark, examine_status,is_update,is_sync)
VALUES (#{uuid}, #{userId}, #{userName}, #{orgId}, #{orgName}, #{leaveType}, '请假', #{leaveReason},
#{leaveStartDate},
#{leaveStartInterval},
#{leaveEndDate},
#{leaveEndInterval},
#{leaveDuration}, #{source}, #{createUserId}, #{isAgree}, #{location}, #{hostUserId}, #{hostUserName},
#{remark}, '1','0','0')
INSERT INTO leave_apply_wechat(uuid, user_id, user_name, org_id, org_name, leave_type, 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,
host_user_name, remark, examine_status,is_update,is_sync,is_business)
VALUES (#{uuid}, #{userId}, #{userName}, #{orgId}, #{orgName}, #{leaveType}, #{type}, #{leaveReason},
#{leaveStartDate},
#{leaveStartInterval},
#{leaveEndDate},
#{leaveEndInterval},
#{leaveDuration}, #{source}, #{createUserId}, #{isAgree}, #{location}, #{hostUserId}, #{hostUserName},
#{remark}, '0','0','0',#{isBusiness})
update sys_user_wechat
set password = #{password}
where user_id = #{userId}
UPDATE leave_apply_wechat
user_id = #{userId},
user_name = #{userName},
org_id = #{orgId},
org_name = #{orgName},
leave_type = #{leaveType},
`type` = #{type},
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},
is_agree = #{isAgree},
location = #{location},
host_user_id = #{hostUserId},
remark = #{remark},
is_update = '1',
is_business = #{isBusiness},
examine_status = '0'
where uuid = #{uuid}
update leave_apply_wechat SET is_active = '0',is_update = '1' WHERE uuid = #{uuid}
UPDATE leave_apply_wechat
user_id = #{userId},
user_name = #{userName},
org_id = #{orgId},
org_name = #{orgName},
leave_type = #{leaveType},
type = #{type},
leave_reason = #{leaveReason},
leave_start_date = #{leaveStartDate},
leave_start_interval = #{leaveStartInterval},
leave_end_date = #{leaveEndDate},
leave_end_interval = #{leaveEndInterval},
leave_duration = #{leaveDuration},
source = #{source},
update_user_id = #{updateUserId},
is_agree = #{isAgree},
location = #{location},
host_user_id = #{hostUserId},
host_user_name = #{hostUserName},
remark = #{remark},
is_update = '1'
where uuid = #{uuid}
UPDATE leave_apply_wechat
user_id = #{userId},
user_name = #{userName},
org_id = #{orgId},
org_name = #{orgName},
leave_reason = #{leaveReason},
leave_start_date = #{leaveStartDate},
leave_start_interval = #{leaveStartInterval},
leave_end_date = #{leaveEndDate},
leave_end_interval = #{leaveEndInterval},
leave_duration = #{leaveDuration},
source = #{source},
update_user_id = #{updateUserId},
is_agree = #{isAgree},
location = #{location},
host_user_id = #{hostUserId},
host_user_name = #{hostUserName},
remark = #{remark},
is_update = '1'
where leave_form_id = #{uuid}
update leave_apply_wechat SET is_active = '0',is_update = '1' WHERE leave_form_id = #{uuid}