bb_person_base
bb_person_temporary
insert into
(
id ,
orgId ,
officeId ,
no ,
cardId ,
userId ,
userName ,
name ,
mnemonicCode ,
gender ,
nation ,
phone ,
type ,
compactType ,
registerAddress ,
distributionIds ,
distributionNames ,
photos ,
faceIds ,
createBy ,
createTime ,
updateBy ,
updateTime ,
remarks ,
delFlag ,
rev_json1
)
values
(
#{id} ,
#{orgId} ,
#{officeId} ,
#{no,jdbcType=VARCHAR} ,
#{cardId} ,
#{userId} ,
#{userName} ,
#{name} ,
#{mnemonicCode} ,
#{gender} ,
#{nation} ,
#{phone} ,
#{type} ,
#{compactType,jdbcType=VARCHAR} ,
#{registerAddress} ,
#{distributionIds} ,
#{distributionNames},
#{photos} ,
#{faceIds} ,
#{createBy} ,
#{createTime} ,
#{updateBy} ,
#{updateTime} ,
#{remarks} ,
#{delFlag} ,
#{revJson1}
)
insert into
(
id ,
orgId ,
officeId ,
cardId ,
name ,
mnemonicCode ,
gender ,
nation ,
phone ,
type ,
registerAddress ,
distributionIds ,
distributionNames ,
photos ,
faceIds ,
createBy ,
createTime ,
updateBy ,
updateTime ,
remarks ,
delFlag ,
rev_json1
)
values
(
#{id} ,
#{orgId} ,
#{officeId} ,
#{cardId} ,
#{name} ,
#{mnemonicCode} ,
#{gender} ,
#{nation} ,
#{phone} ,
#{type} ,
#{registerAddress} ,
#{distributionIds} ,
#{distributionNames},
#{photos} ,
#{faceIds} ,
#{createBy} ,
#{createTime} ,
#{updateBy} ,
#{updateTime} ,
#{remarks} ,
#{delFlag} ,
#{revJson1}
)
update
set
id = #{id} ,
orgId = #{orgId} ,
officeId = #{officeId} ,
no = #{no} ,
cardId = #{cardId} ,
userId = #{userId} ,
userName = #{userName} ,
name = #{name} ,
gender = #{gender} ,
nation = #{nation} ,
phone = #{phone} ,
type = #{type} ,
registerAddress = #{registerAddress} ,
distributionIds = #{distributionIds} ,
distributionNames = #{distributionNames},
photos = #{photos} ,
faceIds = #{faceIds} ,
createBy = #{createBy} ,
createTime = #{createTime} ,
updateBy = #{updateBy} ,
updateTime = now() ,
remarks = #{remarks} ,
delFlag = #{delFlag} ,
rev_json1 = #{revJson1}
and orgId = #{orgId}
and id = #{id}
update
set
delFlag = '1',
updateTime = NOW()
and orgId = #{orgId}
and id = #{id}
update
bb_person_temporary
set
delFlag = '1',
updateTime = NOW()
id = #{id}
update
set
delFlag = '1'
and orgId = #{orgId}
and id in (${ids})
update
set
orgId = #{orgId} ,
officeId = #{officeId} ,
no = #{no} ,
cardId = #{cardId} ,
userId = #{userId} ,
userName = #{userName} ,
name = #{name} ,
gender = #{gender} ,
nation = #{nation} ,
type = #{type} ,
compactType = #{compactType} ,
registerAddress = #{registerAddress} ,
distributionIds = #{distributionIds} ,
distributionNames = #{distributionNames},
photos = #{photos} ,
faceIds = #{faceIds} ,
createBy = #{createBy} ,
createTime = #{createTime} ,
updateBy = #{updateBy} ,
updateTime = #{updateTime} ,
remarks = #{remarks} ,
delFlag = #{delFlag} ,
rev_json1 = #{revJson1}
and orgId = #{orgId}
and phone = #{phone}
update bb_employee
orgId = #{orgId,jdbcType=INTEGER},
no = #{no,jdbcType=VARCHAR},
officeId = #{officeId,jdbcType=INTEGER},
cardId = #{cardId,jdbcType=VARCHAR},
userId = #{userId,jdbcType=INTEGER},
userName = #{userName,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
mnemonicCode = #{mnemonicCode,jdbcType=VARCHAR},
gender = #{gender,jdbcType=VARCHAR},
nation = #{nation,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
compactType = #{compactType,jdbcType=VARCHAR},
registerAddress = #{registerAddress,jdbcType=VARCHAR},
distributionIds = #{distributionIds,jdbcType=VARCHAR},
distributionNames = #{distributionNames,jdbcType=VARCHAR},
photos = #{photos,jdbcType=VARCHAR},
faceIds = #{faceIds,jdbcType=VARCHAR},
createBy = #{createBy,jdbcType=VARCHAR},
createTime = #{createTime,jdbcType=TIMESTAMP},
updateBy = #{updateBy,jdbcType=VARCHAR},
updateTime = #{updateTime,jdbcType=TIMESTAMP},
remarks = #{remarks,jdbcType=VARCHAR},
delFlag = #{delFlag,jdbcType=VARCHAR},
rev_json1 = #{revJson1,jdbcType=CHAR},
and orgId = #{orgId}
and phone = #{phone}
update bb_person_base
no = #{no,jdbcType=VARCHAR},
officeId = #{officeId,jdbcType=INTEGER},
cardId = #{cardId,jdbcType=VARCHAR},
userId = #{userId,jdbcType=INTEGER},
userName = #{userName,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
phone = #{phone,jdbcType=VARCHAR},
mnemonicCode = #{mnemonicCode,jdbcType=VARCHAR},
gender = #{gender,jdbcType=VARCHAR},
nation = #{nation,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
registerAddress = #{registerAddress,jdbcType=VARCHAR},
distributionIds = #{distributionIds,jdbcType=VARCHAR},
distributionNames = #{distributionNames,jdbcType=VARCHAR},
photos = #{photos,jdbcType=VARCHAR},
faceIds = #{faceIds,jdbcType=VARCHAR},
createBy = #{createBy,jdbcType=VARCHAR},
createTime = #{createTime,jdbcType=TIMESTAMP},
updateBy = #{updateBy,jdbcType=VARCHAR},
updateTime = #{updateTime,jdbcType=TIMESTAMP},
remarks = #{remarks,jdbcType=VARCHAR},
delFlag = #{delFlag,jdbcType=VARCHAR},
rev_json1 = #{revJson1,jdbcType=CHAR},
id = #{id}
id ,
orgId ,
officeId ,
no ,
cardId ,
userId ,
userName ,
name ,
gender ,
nation ,
phone ,
type ,
registerAddress ,
distributionIds ,
distributionNames ,
photos ,
faceIds ,
createBy ,
createTime ,
updateBy ,
updateTime ,
remarks ,
delFlag ,
rev_json1
UPDATE merge_from
SET delFlag = '1'
WHERE personId = #{personId,jdbcType=VARCHAR}
update
set distributionIds =
CASE WHEN distributionIds is NULL or distributionIds = '' THEN
CONCAT(""
#{cluInfo1,jdbcType=VARCHAR}
ELSE
CONCAT(distributionIds
IF(distributionIds LIKE CONCAT('%',#{cluInfo2,jdbcType=VARCHAR},'%'),'',#{cluInfo2,jdbcType=VARCHAR})
END
WHERE id = #{personId,jdbcType=VARCHAR}
1=1
and phone=#{phone}
and orgId=#{orgId}
and type = #{type}
and name = #{name}
and delFlag = 0
LIMIT #{start}, #{length}
update bb_employee
officeId = #{updateOfficeId,jdbcType=CHAR},
orgId = #{updateOrgId,jdbcType=CHAR},
orgNamesJson = #{orgNamesJson,jdbcType=CHAR},
and officeId in (
SELECT id
from sys_organization
where parentIds LIKE CONCAT("%,",#{officeId},",%") and delFlag=0
)
and id in (${employeeIds})
and orgId = #{orgId}