组织架构考勤规则修改二次提交
This commit is contained in:
parent
c37469da74
commit
8ba8ed30b8
|
|
@ -113,4 +113,14 @@ public class SysUser extends BaseEntity {
|
|||
@Excel(name = "是否干部",readConverterExp = "0=否,1=是")
|
||||
private String isCadre;
|
||||
|
||||
/**
|
||||
* 考勤组编号
|
||||
*/
|
||||
private Long attGroupId;
|
||||
|
||||
/**
|
||||
* 考勤组名称
|
||||
*/
|
||||
private String attGroupName;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,5 +103,15 @@ public class OrgChangeBean {
|
|||
*/
|
||||
private Integer isActive;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private String startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private String endTime;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -187,6 +187,13 @@ public class SysUserController extends BaseController {
|
|||
// 组织集合
|
||||
List<MapVo> orgList = userService.getOrgByUserId(user);
|
||||
user.setOrgList(orgList);
|
||||
// 获取考勤组
|
||||
List<MapVo> attGroupList = userService.getAttGroupByUserId(user);
|
||||
if(!attGroupList.isEmpty()){
|
||||
user.setAttGroupId(attGroupList.get(0).getId());
|
||||
user.setAttGroupName(attGroupList.get(0).getName());
|
||||
}
|
||||
user.setOrgList(orgList);
|
||||
// 角色集合
|
||||
Set<String> roles = sysMenuService.getRolePermission(user);
|
||||
// 权限集合
|
||||
|
|
|
|||
|
|
@ -204,4 +204,6 @@ public interface SysUserMapper
|
|||
List<SysUser> selectUserByUserNames(String userName);
|
||||
|
||||
List<SysUser> getSelectUserCurrent(Long userId);
|
||||
|
||||
List<MapVo> getAttGroupByUserId(SysUser user);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,4 +123,6 @@ public interface SysUserService {
|
|||
AjaxResult updatePwd(SysUser user);
|
||||
|
||||
AjaxResult getSelectUserCurrent();
|
||||
|
||||
List<MapVo> getAttGroupByUserId(SysUser user);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -193,6 +193,11 @@ public class SysUserServiceImpl implements SysUserService
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MapVo> getAttGroupByUserId(SysUser user) {
|
||||
return userMapper.getAttGroupByUserId(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int deleteUserByIds(Long userId) {
|
||||
|
|
|
|||
|
|
@ -252,4 +252,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
is_active = 1
|
||||
AND user_name IS NOT NULL and user_id!=#{userId}
|
||||
</select>
|
||||
<select id="getAttGroupByUserId" resultType="com.bonus.system.api.domain.MapVo">
|
||||
SELECT
|
||||
ag.id,
|
||||
ag.group_name AS `name`
|
||||
FROM
|
||||
att_group_person_relation agpr
|
||||
LEFT JOIN att_group ag ON agpr.group_id = ag.id
|
||||
AND ag.is_active = '1'
|
||||
WHERE
|
||||
agpr.user_id = #{userId} and agpr.is_active = '1' and ag.id is not null
|
||||
LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue