人员信息岗位查询

Signed-off-by: lSun <15893999301@qq.com>
This commit is contained in:
lSun 2025-02-25 17:21:28 +08:00
parent f8ccb1875a
commit 25a07cdd10
3 changed files with 39 additions and 11 deletions

View File

@ -100,6 +100,12 @@ public class SysUserController extends BaseController {
}
}
}
if(com.bonus.common.core.utils.StringUtils.isNotNull(bean.getPostId())){
Long postIds = Long.valueOf(bean.getPostId());
String postId = userMapper.selectPostIdByIds(postIds);
bean.setPostId(postId);
}
startPage();
List<SysUser> list = userService.selectUserList(bean);
return getDataTable(list);

View File

@ -164,6 +164,13 @@ public interface SysUserMapper
*/
String selectPostIdById(Long postId);
/**
* 根据岗位ID获取岗位ID
* @param postId
* @return
*/
String selectPostIdByIds(Long postId);
/**
* 获取组织列表
* @param

View File

@ -58,7 +58,9 @@
</delete>
<!--删除人员数据后,同步删除考勤组数据-->
<delete id="delAttGroupPersonRelation">
UPDATE att_group_person_relation SET is_active = '0' WHERE user_id = #{userId}
UPDATE att_group_person_relation
SET is_active = '0'
WHERE user_id = #{userId}
</delete>
<update id="deleteUserById">
update sys_user
@ -103,7 +105,9 @@
and org_id = #{oldOrgId};
</update>
<update id="updateOrgIdByUserId">
UPDATE leave_apply SET org_id = #{orgId},org_name = #{orgName}
UPDATE leave_apply
SET org_id = #{orgId},
org_name = #{orgName}
WHERE user_id = #{userId}
</update>
<update id="updateOrgIdByUserIdWithOutSame">
@ -171,6 +175,9 @@
<if test="params.orgId != null and params.orgId != ''">
AND suo.org_id = #{params.orgId}
</if>
<if test="params.postId !=null and params.postId !=''">
and sup.post_id = #{params.postId}
</if>
<if test="params.phone != null and params.phone != ''">
AND su.phone = #{params.phone}
</if>
@ -184,9 +191,9 @@
</foreach>
)
</if>
<!-- <if test="roleType =='2' || roleType == 2 ">-->
<!-- and suo.org_id in (#{orgListId})-->
<!-- </if>-->
<!-- <if test="roleType =='2' || roleType == 2 ">-->
<!-- and suo.org_id in (#{orgListId})-->
<!-- </if>-->
<if test="params.isAttend =='1' || params.isAttend == 1 ">
and agpr.user_id is not null
</if>
@ -243,6 +250,15 @@
and dict_type = 'post_list'
and status = '0' limit 1
</select>
<select id="selectPostIdByIds" resultType="java.lang.String">
select dict_code as postId
from sys_dict_data
where dict_value = #{postId}
and dict_type = 'post_list'
and status = '0'
</select>
<select id="getOrgList" resultType="com.bonus.system.holiday.entity.HolidayKeyBean">
SELECT id,
org_name as `name`
@ -335,7 +351,7 @@
<select id="getOrg" resultType="java.lang.String">
SELECT GROUP_CONCAT(suo.org_id SEPARATOR ', ') AS orgName
FROM `sys_user` su
LEFT JOIN sys_user_org suo on suo.user_id = su.user_id and suo.is_active = 1
LEFT JOIN sys_user_org suo on suo.user_id = su.user_id and suo.is_active = 1
WHERE su.is_active = 1
AND su.user_id = #{userId}
</select>
@ -352,11 +368,10 @@
SELECT *
FROM sys_organization_head
WHERE is_active = '1'
AND org_id in (
SELECT org_id FROM sys_organization_head
WHERE is_active = '1'
AND user_id = #{userId}
)
AND org_id in (SELECT org_id
FROM sys_organization_head
WHERE is_active = '1'
AND user_id = #{userId})
</select>
<select id="findOrgByOrgId" resultType="com.bonus.system.basic.domain.SysOrg">
SELECT org_name as orgName