insert into pm_org_info
name,
level,
parent_id,
user_name,
user_id,
id_card,
sex,
user_phone,
org_type,
lk_id,
table_source,
is_completion,
status
#{name},
#{level},
#{parentId},
#{userName},
#{userId},
#{idCard},
#{sex},
#{userPhone},
#{orgType},
#{lkId},
#{tableSource},
#{isCompletion},
1
insert into gs_exam.pm_dept(NAME, PARENT_ID, IS_ACTIVE, create_time, data_source)
values (#{name}, #{parentId}, 1, now(), 1)
insert into gs_exam.pm_user(NAME, id_card, dept_id, LOGIN_NAME, SEX, TELPHONE, data_source, CREATE_TIME,
IS_ACTIVE, SALT, PASSWD)
values (#{userName}, #{idCard}, #{addId}, #{idCard}, #{sex}, #{userPhone}, 1, now(), 1, #{salt}, #{password})
update gs_exam.pm_user
set NAME=#{userName},
SEX=#{sex},
TELPHONE=#{userPhone},
UPDATE_TIME=now(),
id_card=#{idCard}
where LOGIN_NAME = #{idCard}
insert into pt_dept_lk(dep_id, sub_id)
values (#{parentId}, #{tableId})
update pm_org_info
set name=#{name},
user_name=#{userName},
user_phone=#{userPhone},
sex=#{sex},
id_card=#{idCard}
WHERE id = #{id}
update pm_org_info
set status = 0,p_parent_id = #{pParentId}
where id = #{id}
update gs_exam.pm_user
set dept_id=#{deptId}
where LOGIN_NAME = #{idCard}
UPDATE gs_exam.pm_dept
SET IS_ACTIVE=0
where id = #{deptId}
update pm_org_info
set status = 1
where id = (select team_id from pt_team_exit where id = #{id})
update pm_org_info
set name=#{name}
where id = #{id}
UPDATE pm_org_info
name = #{teamGroupName},
level = #{level},
user_name = #{name},
id_card = #{idCard},
sex = #{sex},
user_phone = #{phone},
table_source = #{tableSource},
p_parent_id = #{subContractor},
audit_status = #{auditStatus},
info_file_url = #{infoFileUrl},
apply_man = #{applyMan},
create_time = sysdate()
WHERE id = #{id}
update team_group_type
set team_type = #{teamType}
where team_group_id = #{id}
delete
from pm_user_outsource
where LOGIN_NAME = #{idCard}
delete
from pt_team_exit
where id = #{id}
delete from team_person where team_id = #{id} and is_team_leader = 1
delete from team_person WHERE team_id = #{id} and is_team_leader = 0
insert into pm_user_outsource(NAME, LOGIN_NAME, SEX, TELPHONE, dept_id, is_active, CREATE_TIME, UPDATE_TIME)
values (#{userName}, #{idCard}, #{sex}, #{userPhone}, #{tableId}, 1, now(), now())
insert into pt_team_exit(team_id, parent_id, team_name, phone, sub_id, sub_name, pro_id, pro_name, id_card,
user_name, org_rel_id)
values (#{teamId}, #{parentId}, #{teamName}, #{phone}, #{subId}, #{subName}, #{proId}, #{proName}, #{idCard},
#{userName}, #{orgRelId})
insert into team_group_type(team_group_id,team_type)
values (#{id}, #{teamType})
insert into team_person(team_id, name, id_card, phone,sex,work_type,face_url,is_team_leader)
values (#{id}, #{userName},#{idCard}, #{userPhone}, #{sex}, #{workType}, #{faceUrl}, #{isTeamLeader})
insert into pm_org_info
name,
level,
parent_id,
user_name,
user_id,
id_card,
sex,
user_phone,
org_type,
lk_id,
table_source,
p_parent_id,
status
#{name},
#{level},
#{parentId},
#{userName},
#{userId},
#{idCard},
#{sex},
#{userPhone},
#{orgType},
#{lkId},
#{tableSource},
#{id},
0
insert into pm_org_info
name,
level,
user_name,
id_card,
sex,
user_phone,
table_source,
p_parent_id,
audit_status,
info_file_url,
apply_man,
create_time,
status,
#{teamGroupName},
#{level},
#{name},
#{idCard},
#{sex},
#{phone},
#{tableSource},
#{subContractor},
#{auditStatus},
#{infoFileUrl},
#{applyMan},
sysdate(),
0
insert into team_person(team_id, name, id_card, phone,sex,work_type,face_url,is_team_leader)
values (#{id}, #{name},#{idCard}, #{phone}, #{sex}, #{workType}, #{faceUrl}, #{isTeamLeader})
insert into team_person(team_id, name, id_card, phone,sex,work_type,face_url,is_team_leader)
values (#{id}, #{name},#{idCard}, #{phone}, #{sex}, #{workType}, #{faceUrl}, #{isTeamLeader})